> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HTMLExportParams Object (IHTMLExportParams Interface)

This object provides functionality for tuning parameters of recognized text export in HTML format by means of 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. For more information about the default value of this or that property, see the description of the corresponding property.

The HTMLExportParams object is a persistent object. This means that the object's current state can be written to persistent storage. Later, the object can be re-created by reading the object's state from the persistent storage. The following methods provide persistence of the object:

Linux: [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), and [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)

Windows [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method), [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method), and [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method).

## Properties

<table><thead><tr><th><p><strong>Name</strong></p></th><th><p><strong>Type</strong></p></th><th><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p><strong>Application</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/engine-object-iengine-interface">Engine</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Returns the <strong>Engine</strong> object.</p></td></tr><tr><td colspan="3"><p><em>Format settings</em></p></td></tr><tr><td><p><a name="htmlformatmode" /><strong>HTMLFormatMode</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/htmlformatmodeenum">HTMLFormatModeEnum</a></strong></p></td><td><p>Specifies the version of HTML used for export.</p><Note>If you set the value of this property to HFM\_Format40 or HFM\_Format50, the HTMLSynthesisMode and SeparatePages properties cannot be set to HSM\_PlainText and TRUE, respectively.</Note><p>The default value is HFM\_Format40.</p></td></tr><tr><td><p><a name="htmlsynthesismode" /><strong>HTMLSynthesisMode</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/htmlsynthesismodeenum">HTMLSynthesisModeEnum</a></strong></p></td><td><p>Specifies a mode of synthesizing HTML code from the recognized text. There exist four modes of synthesis: retain paragraphs only, retain paragraphs and fonts, retain the whole structure of the document, retain the exact copy of the document.</p><Note>If you set the value of this property to HSM\_PlainText, the value of the HTMLFormatMode property cannot be set to HFM\_Format40 or HFM\_Format50, and the value of the UseCss property must be set to FALSE.</Note><p>The default value is HSM\_FlexibleLayout, which means that the whole structure of the document is retained.</p></td></tr><tr><td><p><a name="usedocumentstructure" /><strong>UseDocumentStructure</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies whether the logical structure of the document should be used for recreating the structure of the output document. If this property is FALSE, the structure of the output document is recreated on the basis of the layout blocks.</p><Note>This property cannot be set to TRUE, if the value of the SeparatePages property is TRUE.</Note><p>This property is TRUE by default.</p></td></tr><tr><td><p><a name="separatepages" /><strong>SeparatePages</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>If this property is TRUE and several pages are exported to HTML format, \<HR> tag is inserted between pages, making the browser display a horizontal rule.</p><Note>If this property is TRUE:</Note><ul><li>the logical structure of the document is not retained (the <strong>UseDocumentStructure</strong> property cannot be set to TRUE).</li><li>the value of the <strong>HTMLFormatMode</strong> property cannot be set to HFM\_Format40 or HFM\_Format50.</li><li>the value of the <strong>UseCss</strong> property must be set to FALSE.</li></ul><p>The default value is FALSE.</p></td></tr><tr><td><p><a name="usecss" /><strong>UseCss</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Determines if a stylesheet should be created. It may be written into a separate .css file or into the head of the HTML document.</p><Note>This property cannot be set to TRUE, if the value of the SeparatePages property is TRUE.</Note><p>The default value of this property is TRUE.</p></td></tr><tr><td><p><a name="splitdocumenttofiles" /><strong>SplitDocumentToFiles</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/htmldocumentsplittingmodeenum">HTMLDocumentSplittingModeEnum</a></strong></p></td><td><p>Specifies the mode of splitting output document into files.</p><p>By default, this property is HDSM\_None.</p></td></tr><tr><td><p><a name="keeplines" /><strong>KeepLines</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies if original lines in recognized text are retained during export.</p><p>This property is FALSE by default.</p></td></tr><tr><td><p><a name="keeptextandbackgroundcolor" /><strong>KeepTextAndBackgroundColor</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies if original colors of text and background are retained during export of the recognized text in HTML format.</p><p>This property is TRUE by default.</p></td></tr><tr><td><p><a name="writerunningtitles" /><strong>WriteRunningTitles</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies whether the running titles should be saved to an output HTML file.</p><p>This property is TRUE by default.</p></td></tr><tr><td><p><a name="metadatawritingparams" /><strong>MetaDataWritingParams</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/parameter-objects/export-parameters/documentcontentinfowritingparams">DocumentContentInfoWritingParams</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>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 <strong><a href="/fine-reader/engine/api-reference/document-related-objects/documentcontentinfo">DocumentContentInfo</a> </strong>subobject of the <strong><a href="/fine-reader/engine/api-reference/document-related-objects/frdocument">FRDocument</a></strong> object.</p></td></tr><tr><td colspan="3"><p><em>Encoding</em></p></td></tr><tr><td><p><a name="encodingtype" /><strong>EncodingType</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/textencodingtypeenum">TextEncodingTypeEnum</a></strong></p></td><td><p>Specifies the encoding type of the output file in HTML format.</p><Note>If you want to change the value of this property to TET\_Simple, you should first set the correct code page (the CodePage property).</Note><p>The default value of this property is TET\_Auto. This means that encoding is selected depending on the constant which was used to specify the export format:</p><ul><li>for <a href="/fine-reader/engine/api-reference/enumerations/fileexportformatenum#fef_htmlversion10defaults">FEF\_HTMLVersion10Defaults</a> encoding is selected automatically, as in 10th version; if encoding could not be successfully determined, UTF-8 encoding is used.</li><li>for <a href="/fine-reader/engine/api-reference/enumerations/fileexportformatenum#fef_htmlunicodedefaults">FEF\_HTMLUnicodeDefaults</a> it is TET\_UTF8.</li></ul></td></tr><tr><td><p><a name="codepage" /><strong>CodePage</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/codepageenum">CodePageEnum</a></strong></p></td><td><p>This property specifies the code page to which the recognized text is exported. The value of this property is taken into account only when the <strong>EncodingType</strong> property has the value TET\_Simple<strong> </strong>(exported text is not Unicode), and in this case, the property must specify a valid code page (it cannot be CP\_Null).</p><Note>First, set the correct code page and only then change the value of the EncodingType property to TET\_Simple.</Note><p>By default, this property is CP\_Null.</p></td></tr><tr><td colspan="3"><p><em>Picture embedding</em></p></td></tr><tr><td><p><a name="writepictures" /><strong>WritePictures</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies whether pictures must be saved along with the file in HTML format. If pictures are not written, references to them in HTML files are also omitted.</p><p>The default value is TRUE.</p></td></tr><tr><td><p><a name="pictureexportparams" /><strong>PictureExportParams</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/parameter-objects/export-parameters/pictureexportparams">PictureExportParams</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Specifies the image format and JPEG quality which should be used for embedded pictures in the output file.</p></td></tr></tbody></table>

## Methods

| Name                                                                                                                                               | Description                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [CopyFrom](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/copyfrom-method)                              | Initializes properties of the current object with values of similar properties of another object. |
| [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)                                            | Restores the object contents from a file on disk.                                                 |
| [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method) <br /><br /> **Note:** *Windows only.* | Restores the object contents from the global memory.                                              |
| [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)                                                | Saves the object contents into a file on disk.                                                    |
| [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method) <br /><br /> **Note:** *Windows only.*     | Saves the object contents into the global memory.                                                 |

## Related objects

<img src="https://mintcdn.com/abbyy/lsETHFYUFiongXSm/images/fine-reader/engine/htmlexportparams.gif?s=f124b21a819d97fc03b91351e6f7bdc5" alt="HTMLExportParams" width="161" height="85" data-path="images/fine-reader/engine/htmlexportparams.gif" />[](/fine-reader/engine/api-reference/parameter-objects/export-parameters/documentcontentinfowritingparams)[](/fine-reader/engine/api-reference/parameter-objects/export-parameters/pictureexportparams)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Output parameter

This object is the output parameter of the [CreateHTMLExportParams](/fine-reader/engine/api-reference/engine-object-iengine-interface/creation-methods/createlessobjectgreater-methods) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object.

## Input parameter

This object is passed as the input parameter to the following methods:

* [Export](/fine-reader/engine/api-reference/document-related-objects/frdocument/export-method), [ExportPages](/fine-reader/engine/api-reference/document-related-objects/frdocument/exportpages-method), [ExportToMemory](/fine-reader/engine/api-reference/document-related-objects/frdocument/exporttomemory-method) methods of the [FRDocument](/fine-reader/engine/api-reference/document-related-objects/frdocument) object

* [Export](/fine-reader/engine/api-reference/document-related-objects/frpage/export-method) method of the [FRPage](/fine-reader/engine/api-reference/document-related-objects/frpage) object

* [RecognizeImageFile](/fine-reader/engine/api-reference/engine-object-iengine-interface/processing-methods/recognizeimagefile-method) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object

* [OnExportPages](/fine-reader/engine/visual-components-reference/idocumentviewerevents/onexportpages-method) method of the [IDocumentViewerEvents](/fine-reader/engine/visual-components-reference/idocumentviewerevents) interface for Windows Visual Components

* [OnSendToPages](/fine-reader/engine/visual-components-reference/idocumentviewerevents/onsendtopages-method) method of the [IDocumentViewerEvents](/fine-reader/engine/visual-components-reference/idocumentviewerevents) interface for Windows Visual Components

## Samples

The object is used in the following code samples: [CommandLineInterface](/fine-reader/engine/guided-tour/samples#commandlineinterface) (Windows and Linux).

## See also

[Tuning Export Parameters](/fine-reader/engine/guided-tour/advanced-techniques/tuning-export-parameters)

[Working with Profiles](/fine-reader/engine/guided-tour/advanced-techniques/working-with-profiles)

[Working with Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
