PDFExportParams Object (IPDFExportParams Interface)
This object provides functionality for tuning the parameters of export of recognized text into PDF (PDF/A) format by means of the ABBYY FineReader Engine export functions. A pointer to this object is passed into the export methods as an input parameter, and thus affects the results of export. All properties of a newly created object of this type are set to reasonable defaults.
We recommend that you tune the parameters in the following order:
- Set the Scenario property at first. This property optimizes export for some parameters: quality, size of the file, or/and speed of export. When you select the value of this property, the properties of the PDFExportParams object and its subobjects are set to the values suitable for the selected task.
Note: The properties' settings can vary depending on the input data.
- After that, you may customize the additional parameters so that they suit your task the best. See Tuning Export Parameters for details.
Note: Properties of the PDFExportParams object have priority over the properties of its subobjects. This means that if you change the value of some property of the PDFExportParams object, the values of the properties of its subobjects can be automatically rewritten. On the contrary, if you change the value of a property of some subobject, the values of the PDFExportParams properties never change.
The PDFExportParams object is a persistent object. This means that the object's current state can be written to persistent storage: an area in the global memory or a disk file. Later, the object can be re-created by reading the object's state from persistent storage. The following methods provide persistence of the object: SaveToFile, LoadFromFile, SaveToMemory, and LoadFromMemory.
Properties
Name | Type | Description |
---|---|---|
Application | Engine, read-only | Returns the Engine object. |
Export scenario | ||
Scenario | PDFExportScenarioEnum |
Specifies the scenario of export to PDF (PDF/A) format, which optimizes export for some parameters: quality, size of the file, and/or speed of export. Note: If you change the value of this property, the FontEmbeddingMode, TextAndBackgroundColorMode, WriteXmpMetadata, WriteTaggedPDF properties of the PDFExportFeatures subobject and ColorPictureFormats, GrayPictureFormats, BwPictureFormats properties of the PDFPictureCompressionParams subobject are set to their default values. The default value is PES_Balanced. Please note that depending on the chosen scenario some inner export settings can change. This will have influence on the value of the next PDFExportParams properties:
|
Format settings | ||
PDFAComplianceMode | PDFAComplianceModeEnum |
Specifies the format of export: PDF, PDF/A-1a, PDF/A-1b, PDF/A-2a, PDF/A-2b, PDF/A-2u, PDF/A-3a, PDF/A-3b, or PDF/A-3u. The value of this property affects the settings that can be used during export. If the value of this property is not PCM_None (export to PDF/A format is performed):
If these requirements are not met, an error is returned. By default, the value is PCM_None, which means that export to PDF should be performed. |
TextExportMode | PDFExportModeEnum |
Specifies the mode of export of recognized text into PDF (PDF/A) format. It may be: text and pictures only, text over the page image, text under the page image, page image only, text only. Note: If this property is PEM_TextOnly, the values of the BwPictureFormats, ColorPictureFormats, and GrayPictureFormats properties of the PDFPictureCompressionParams subobject are ignored. This property is PEM_ImageOnText by default. |
MRCMode | PDFMRCModeEnum |
Specifies the mode of using Mixed Raster Content for output PDF (PDF/A) file. Note: The value of this property is ignored during export to black-and-white PDF. By default, the value of this property is MRC_Auto. |
PDFFeatures | PDFExportFeatures, read-only | Specifies the additional export parameters: encryption information, PDF version, etc. |
Color settings | ||
Colority | PictureColorityModeEnum |
Allows you to keep color of the output PDF (PDF/A) file or save it in gray or black-and-white. It may be useful to set this property to PCM_ForceToGray for color documents, if you do not need to save their colors and want to reduce the size of output files. Note: If the CorrectColorDepth property is set to TRUE, ABBYY FineReader Engine can additionally correct color depth of the document. For example, if you set Colority to PCM_ForceToGray and CorrectColorDepth is TRUE, FineReader Engine will change the color images to gray, then will detect color depth of gray images and, if necessary, will change some images to black-and-white. The default value for this property is PCM_KeepColority. |
CorrectColorDepth | VARIANT_BOOL |
This property set to TRUE enables ABBYY FineReader Engine to correct color depth of the document. If you set the property to FALSE, ABBYY FineReader Engine will save colors of the document as defined in the Colority property. By default, the value of this property is TRUE. |
Picture settings | ||
PDFPictures | PDFPictures | Returns the collection of the user-defined images attached to the output PDF file. To add an image to this collection, use the AddNew method of the PDFPictures object and set the image position on a page by the methods of the PDFPicture object. |
PictureCompressionParams | PDFPictureCompressionParams, read-only | Specifies the parameters of writing images to PDF (PDF/A) files, including MRC parameters. These parameters allow you to reset the parameters defined in the chosen export scenario. |
Resolution | int |
Specifies the picture resolution in dpi. The ResolutionType property specifies how the value of this property must be interpreted. Note: The specified resolution cannot be higher than the original resolution. The default value for the property is 300 dpi. |
ResolutionType | PDFResolutionTypeEnum |
Defines how to use the value of the picture resolution specified in the Resolution property. It may be used:
By default, the value of this property is PRT_Desired. |
Methods
Name | Description |
---|---|
CopyFrom | Initializes properties of the current object with values of similar properties of another object. |
LoadFromFile | Restores the object contents from a file on disk. |
LoadFromMemory | Restores the object contents from the global memory. |
SaveToFile | Saves the object contents into a file on disk. |
SaveToMemory | Saves the object contents into the global memory. |
Related objects
Output parameter
This object is the output parameter of the CreatePDFExportParams method of the Engine object.
Input parameter
This object is passed as the input parameter to the following methods:
- Export, ExportPages, ExportToMemory methods of the FRDocument object
- Export method of the FRPage object
- RecognizeImageFile method of the Engine object
- OnExportPages, OnSendToPages method of the IDocumentViewerEvents interface
Samples
C# code
The object is used in the following code samples: Hello, CommandLineInterface; and demo tools: BatchProcessingRecognition, MultiProcessingRecognition, PDFExportProfiles.
See also
17.09.2024 15:14:40