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:

  1. 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.

  1. 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 on disk. 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, and LoadFromFile.

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):

  • IsEncryptionRequested property of the PDFEncryptionInfo subobject cannot be set to TRUE
  • PDFVersion property of the PDFExportFeatures subobject can be set only to PVN_Auto or PVN_Version14 for PDF/A-1a, PDF/A-1b
  • If the format is PDF/A-1a, PDF/A-2a, or PDF/A-3a, the WriteTaggedPDF property of the PDFExportFeatures subobject cannot be set to TSPV_No (the file is always tagged)
  • WriteXmpMetadata property of the PDFExportFeatures subobject cannot be set to TSPV_No
  • FontEmbeddingMode property of the PDFExportFeatures subobject cannot be set to FEM_DontEmbed
  • ColorPictureFormats property of the PDFPictureCompressionParams subobject cannot be set to CPF_J2K (for PDF/A-1a, PDF/A-1b only) or CPF_LZW
  • GrayPictureFormats property of the PDFPictureCompressionParams subobject cannot be set to GPF_J2K (for PDF/A-1a, PDF/A-1b only) or GPF_LZW
  • WriteSourceAttachments property of the PDFExportFeatures subobject cannot be set to TRUE for PDF/A-1a, PDF/A-1b, PDF/A-2a, PDF/A-2b, PDF/A-2u.

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:

  • as the absolute resolution (used for all pictures),
  • as the desired resolution (may be used only if the original resolution is above the desired, the program selects optimal dpi value nearest to the desired resolution),
  • or the value is ignored (and the original resolution is 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.
SaveToFile Saves the object contents into a file on disk.

Related objects

Object Diagram

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:

Samples

The object is used in the following code samples: Hello, CommandLineInterface.

See also

Tuning Export Parameters

Working with Profiles

Working with Properties

ZUGFeRD-compliant electronic invoices

03.07.2024 8:50:25

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.