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

# DocLangExportParams Object (IDocLangExportParams Interface)

> DocLangExportParams object (IDocLangExportParams interface) in the ABBYY FineReader Engine API — Tunes export of recognized text to DocLang format: format version, picture handling, archive output, and coordinates; persistent object savable to file/memory.

This object provides functionality for tuning parameters of recognized text export in DocLang format. A pointer to this object is passed into the export methods as an input parameter together with the FEF\_DocLang value of [FileExportFormatEnum](https://docs.abbyy.com/fine-reader/engine/api-reference/enumerations/fileexportformatenum.md), 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.

DocLang output is written either as a single XML file or, if the UseArchiveFormat property is TRUE, as a DocLang Archive (zipped) file.

The DocLangExportParams 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](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method.md), and [LoadFromFile](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method.md)

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

> [!NOTE]
>
> This object is available in FineReader Engine 12.8.4 and later. In earlier 12.8 releases, DocLang export did not have its own parameters object.

## Properties

| Name | Type | Description |
| - | - | - |
| Application | [Engine](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface.md), [read-only](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md#readonly_properties) | Returns the Engine object. |
| FormatVersion | [BSTR](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies the version of the DocLang format to be produced, for example "0.8". The value consists of two to four non-negative numbers separated by dots. Supported versions are 0.4, 0.8, and 0.9. If you specify a version that is not supported, it is replaced with the nearest supported version during export.  By default, this property is set to the latest supported version, "0.9". |
| PageWidthInAbstractUnits | int | Specifies the width of a page in the abstract units used to describe the locations of elements in the output. The value must be greater than 0.  By default, this property is set to 65536. |
| PageHeightInAbstractUnits | int | Specifies the height of a page in the abstract units used to describe the locations of elements in the output. The value must be greater than 0.  By default, this property is set to 65536. |
| PictureMode | [DocLangPictureModeEnum](https://docs.abbyy.com/fine-reader/engine/api-reference/enumerations/doclangpicturemodeenum.md) | Specifies how pictures are represented in the output.  By default, this property is set to DLPM\_Attach. |
| AttachmentNamePrefix | [BSTR](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies the prefix for the names of attached picture files. Every `*` character in the prefix is replaced with the name of the output file without its path and extension. The attachment number and the file extension are then appended to form the file name. The prefix may contain path separators, so attachments can be placed in subfolders. The `..` path component is not allowed: attachments cannot be placed outside the export destination folder.  Examples for the output file OutFileName.xml: "" gives 1.png, "img/" gives img/1.png, "\*-" gives OutFileName-1.png, "\*/img/" gives OutFileName/img/1.png.  This property is used only if PictureMode is DLPM\_Attach and UseArchiveFormat is FALSE. By default, this property is set to "\*-". |
| UseArchiveFormat | [VARIANT\_BOOL](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies whether the output is written in the DocLang Archive (zipped) format instead of plain XML.  This property is FALSE by default. |
| WritePageImages | [VARIANT\_BOOL](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies whether page images are included in the output.  This property is used only if UseArchiveFormat is TRUE. It is TRUE by default. |
| WriteCoordinates | [VARIANT\_BOOL](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies whether element coordinates are written to the output.  This property is TRUE by default. |
| WriteOriginalImageCoordinates | [VARIANT\_BOOL](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies whether coordinates are written for the original image instead of the preprocessed one.  This property has no effect if WriteCoordinates is FALSE. It is also ignored when UseArchiveFormat and WritePageImages are both TRUE: the coordinates then always correspond to the saved page images, which are preprocessed.  This property is FALSE by default. |
| ValidateOutput | [VARIANT\_BOOL](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md) | Specifies whether the output is validated against the DocLang schema.  This property is FALSE by default. |
| PictureExportParams | [PictureExportParams](https://docs.abbyy.com/fine-reader/engine/api-reference/parameter-objects/export-parameters/pictureexportparams.md), [read-only](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md#readonly_properties) | Provides access to the parameters of pictures written to the output: format, resolution, and quality. DocLang can only reference PNG and JPEG pictures. By default, color and grayscale pictures are saved as JPEG or PNG, and black-and-white pictures as PNG. |

## Methods

| Name | Description |
| - | - |
| [CopyFrom](https://docs.abbyy.com/fine-reader/engine/api-reference/parameter-objects/export-parameters/doclangexportparams/copyfrom-method.md) | Initializes properties of the current object with values of similar properties of another object. |
| [LoadFromFile](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method.md) | Restores the object contents from a file on disk. |
| [LoadFromMemory](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method.md)   **Note:** *Windows only.* | Restores the object contents from the global memory. |
| [SaveToFile](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method.md) | Saves the object contents into a file on disk. |
| [SaveToMemory](https://docs.abbyy.com/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method.md)   **Note:** *Windows only.* | Saves the object contents into the global memory. |

## Output parameter

This object is the output parameter of the [CreateDocLangExportParams](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface/creation-methods/createlessobjectgreater-methods.md) method of the [Engine](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface.md) object.

## Input parameter

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

* [Export](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument/export-method.md), [ExportPages](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument/exportpages-method.md), [ExportToMemory](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument/exporttomemory-method.md) methods of the [FRDocument](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument.md) object
* [Export](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frpage/export-method.md) method of the [FRPage](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frpage.md) object
* [RecognizeImageFile](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface/processing-methods/recognizeimagefile-method.md) method of the [Engine](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface.md) object

## Samples

> [accordion] C# code
>
> ```csharp theme={null}
> FREngine.IEngine engine;
> FREngine.IFRDocument frDocument;
> // Set up DocLang export parameters
> FREngine.IDocLangExportParams docLangParams = engine.CreateDocLangExportParams();
> docLangParams.FormatVersion = "0.8";
> docLangParams.PictureMode = FREngine.DocLangPictureModeEnum.DLPM_Embed;
> // Export the recognized document
> frDocument.Export( "C:\\Output\\Document.xml", FREngine.FileExportFormatEnum.FEF_DocLang, docLangParams );
> ```

## See also

[DocLangPictureModeEnum](https://docs.abbyy.com/fine-reader/engine/api-reference/enumerations/doclangpicturemodeenum.md)

[Tuning Export Parameters](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/tuning-export-parameters.md)

[Working with Profiles](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/working-with-profiles.md)

[Working with Properties](https://docs.abbyy.com/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties.md)
