RTFExportParams Object (IRTFExportParams Interface)
This object provides functionality for tuning parameters of recognized text export in RTF, DOCX, or ODT format by means of ABBYY FineReader Engine export methods. 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 noted below.
The RTFExportParams 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. |
Format settings | ||
PageSynthesisMode | RTFPageSynthesisModeEnum |
Specifies the mode of output file synthesis from the recognized text. This property is PSM_RTFEditableCopy by default. |
UseDocumentStructure | VARIANT_BOOL |
Specifies whether the logical structure of the document should be used for restoring the order of the output text. If this property is FALSE, the order of the output text is based on the order of the layout blocks. The value of this property is used only if the PageSynthesisMode property is set to PSM_RTFFormatParagraphs or PSM_RTFPlainText; otherwise, it is ignored. This property is TRUE by default. |
KeepPageBreaks | ThreeStatePropertyValueEnum |
Specifies if the page breaks must be retained in the output document. The default value of this property is TSPV_Auto, which means that for PageSynthesisMode = PSM_RTFEditableCopy the page breaks are not retained, for PageSynthesisMode = PSM_RTFExactCopy the page breaks are always retained. Notes:
|
KeepLines | VARIANT_BOOL |
Specifies if original lines in recognized text should be retained in the output file. This property is FALSE by default. |
RemoveSoftHyphens | VARIANT_BOOL |
Tells ABBYY FineReader Engine to remove optional hyphens in the output file. Notes:
By default, this property is FALSE. |
WriteRunningTitles | VARIANT_BOOL |
Specifies whether the running titles should be saved to the output file. This property is TRUE by default. |
MetaDataWritingParams | DocumentContentInfoWritingParams, read-only | Specifies if the author, subject, title, and keywords of the document should be written into the output file. These parameters of the document are defined in the DocumentContentInfo subobject of the FRDocument object. |
FilterSeparators | VARIANT_BOOL |
Specifies whether to apply separator filtration. This setting takes effect only when PageSynthesisMode is PSM_RTFExactCopy. When FilterSeparators is FALSE, more separators are retained in the output file. This property is TRUE by default. |
Color settings | ||
KeepTextColor | VARIANT_BOOL |
Specifies if original colors of text should be retained in the output file. Note: The text color can be retained during export only if the ISynthesisParamsForPage::DetectTextColor property was set to TSPV_Yes or TSPV_Auto during page synthesis. This property is TRUE by default. |
BackgroundColorMode | BackgroundColorModeEnum |
Specifies the mode of background color saving in the output file. Note: The background color can be retained during export only if the ISynthesisParamsForPage::DetectBackgroundColor property was set to TSPV_Yes or TSPV_Auto during page synthesis. This property is BCM_Color by default, which means background color should be saved. |
Picture embedding | ||
WritePictures | VARIANT_BOOL |
Specifies if pictures should be written into the output file. By default, this property is TRUE. |
PictureExportParams | PictureExportParams, read-only | Specifies the image format and JPEG quality which should be used for embedded pictures in the output file. |
Page size and orientation | ||
IncreasePaperSizeToFitContent | VARIANT_BOOL |
Specifies whether the page size should be increased automatically if the contents do not fit on the page. This property takes effect only when the IPaperSizeParams::PaperSizeMode property is set to PSM_UserDefined. By default, this property is FALSE. |
PageOrientation | PageOrientationEnum |
Specifies page orientation in the output file. The value of this property is ignored in the following cases:
If this is the case, portrait orientation is used. By default, the property is set to POM_Auto. |
PaperSizeParams | PaperSizeParams, read-only | Specifies paper height and width. |
PageMargins | PageMargins |
Specifies page margins in the output file. The property is only usable when the UseCustomPageMargins property is set to TRUE, or otherwise, the value of this property is ignored. |
UseCustomPageMargins | VARIANT_BOOL |
Specifies whether the values of the PageMargins property must be used in the output file. This property takes effect if the PageSynthesisMode property is set to PSM_RTFPlainText or PSM_RTFFormatParagraphs. By default, this property is FALSE. |
Error highlighting | ||
HighlightErrorsWithBackgroundColor | VARIANT_BOOL |
Specifies if uncertainly recognized symbols are highlighted with background color in the output file. The color with which to highlight the background of uncertainly recognized symbols is stored in the property ErrorBackgroundColor. This property is FALSE by default. |
HighlightErrorsWithTextColor | VARIANT_BOOL |
Specifies if uncertainly recognized symbols are highlighted with text color in the output file. The color with which to highlight the text of uncertainly recognized symbols is stored in the property ErrorTextColor. This property is FALSE by default. |
ErrorBackgroundColor | int |
Stores the value of color used to highlight uncertainly recognized symbols' background in the output file. This property is used only when the HighlightErrorsWithBackgroundColor property is TRUE. The value of this property can be -1, which means that the color is transparent.
Note: The int value is calculated from the RGB triplet using the formula: (red value) + (256 x green value) + (65536 x blue value), where red value is the first triplet component, green value is the second triplet component, blue value is the third triplet component. For example, the int value of the color white equals 16777215. By default, this property is set to 65280, i.e., (0,255,0) in RGB format, which corresponds to green color. |
ErrorTextColor | int |
Stores the value of color used to highlight uncertainly recognized symbols in the output file. This property is used only when the HighlightErrorsWithTextColor property is TRUE. The value of this property can be -1, which means that the color is transparent.
Note: The int value is calculated from the RGB triplet using the formula: (red value) + (256 x green value) + (65536 x blue value), where red value is the first triplet component, green value is the second triplet component, blue value is the third triplet component. For example, the int value of the color white equals 16777215. By default, this property is set to 65280, i.e., (0,255,0) in RGB format, which corresponds to green color. |
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
Output parameter
This object is the output parameter of the CreateRTFExportParams 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
Samples
The object is used in the following code samples: CommandLineInterface.
See also
7/3/2024 8:50:25 AM