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
Name Type Description Application Engine , read-only Returns the Engine object. Count int , read-onlyStores the number of elements in the collection. Element PDFPicture , read-only Provides access to a single element of the collection.
Methods
Name Description AddNew Creates a new PDFPicture object and adds it into the collection. DeleteAll Removes all the elements from the collection. DeleteAt Removes an element from the collection. Item Provides access to a single element of the collection.
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