Skip to main content
This object represents a collection of user-defined pictures added to a PDF document (PDFPicture objects). It contains methods for getting the number of pictures in the collection, accessing a single element of the collection and iterating through the collection. The collection is accessible via the PDFExportParams object.
When exporting to PDF, ABBYY FineReader Engine does not preserve the picture transparency.
  • The indexing of ABBYY FineReader Engine collections starts with 0.
  • The foreach statement in C# (for each in Visual Basic .NET) can be used to manipulate the collection.

Properties

NameTypeDescription
ApplicationEngine, read-onlyReturns the Engine object.
Countint, read-onlyStores the number of elements in the collection.
ElementPDFPicture, read-onlyProvides access to a single element of the collection.

Methods

NameDescription
AddNewCreates a new PDFPicture object and adds it into the collection.
DeleteAllRemoves all the elements from the collection.
DeleteAtRemoves an element from the collection.
ItemProvides access to a single element of the collection.
PDFPictures Object Diagram

Samples

This sample illustrates how to export pictures to PDF format.
// Create the PDF export parameters
CSafePtr<IPDFExportParams> pdfExportParams;
CheckResult( FREngine->CreatePDFExportParams( &pdfExportParams ) );
// Get the PDF pictures collection
CSafePtr<IPDFPictures> pictures;
CheckResult( pdfExportParams->get_PDFPictures( &pictures ) );
// Add a PDF picture to existing collection
CSafePtr<IPDFPicture> picture;
CheckResult( pictures->AddNew( &picture ) );
// Set the offset
CSafePtr<IPoint> offset;
CheckResult( FREngine->CreatePoint( 10, 10, &offset ) );
CheckResult( picture->SetLocation( offset, 0 ) );
// Get an image document from the picture
CSafePtr<IFRDocument> pictureDocument;
CheckResult( FREngine->CreateFRDocument( &pictureDocument ) );
CheckResult( pictureDocument->AddImageFile( pictureFilePath ) );
CSafePtr<IFRPages> frPages;
CheckResult( pictureDocument->get_Pages( &frPages ) );
CSafePtr<IFRPage> frPage;
CheckResult( frPages->get_Element( 0, &frPage ) );
CSafePtr<IImageDocument> imageDocument;
CheckResult( frPage->get_ImageDocument( &imageDocument ) );
// Set the image document
CheckResult( picture->put_Image( imageDocument ) );
// Export to PDF
CheckResult( frDocument->Export( resultFilePath, FEF_PDF, pdfExportParams ) );

See also

PDFPicture Working with Collections Working with Properties