---
title: "OCR [used with ocrimagepdf or tifftopdf/ mergetifftopdf]"
canonical_url: "https://www.nutrient.io/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/ocr-used-with-ocrimagepdf-or-tifftopdf-mergetifftopdf/"
md_url: "https://www.nutrient.io/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/ocr-used-with-ocrimagepdf-or-tifftopdf-mergetifftopdf.md"
last_updated: "2026-06-09T10:25:14.364Z"
description: "This table outlines various PDF processing parameters for generating compliant files, including OCR options, image handling, and compression settings."
---

# OCR [used with ocrimagepdf or tifftopdf/ mergetifftopdf]

| Parameter             | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **/pdfa**             | Use this flag to generate a PDF/A compliant file, below are the possible values it can take.

- 1 (Generates a PDF/A-1b file, for example, /pdfa=1)

- 2 (Generates a PDF/A-2b file)

- 3 (Generates a PDF/A-3b file)                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **/ocr**              | Set to true if a searchable PDF is required.
 **Note**: This will work with the tifftopdf and mergetifftopdf steps only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **/password**         | Source PDF password
 **Note**: This will work with the ocrimagepdf step only                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **/NonImagePDF**      | This allows control over the treatment of non-image PDFs, for example, PDFs that have some text in them as well as images. The options are:

- **OCR**: The document will be OCRed using the image method defined by “Image Method”

- **Raise Error**: The task will terminate with an error. If “On Error Continue” is set this then behaves as Skip. This is the default.

- **Skip**: The document will not be processed.

- **Pass Through**: The file will not be processed, but a copy of the document will be made and named as if the processing had occurred.
 **Note**: This will work with the ocrimagepdf step only. |
| **/RemoveHiddenText** | When set to true this will not include any searchable text layers that already exist from the source document. Such functionality might be useful if the source document was created by OCR of an image only PDF or other image file and the quality of the text from the previous OCR is poor.
 **Note**:

- There is no way to distinguish text added as a result of OCR from text added by other means and as a result, this option should be used with care.

- This will work with the ocrimagepdf step only.                                                                                                                              |
| **/deskew**           | When set to true this will straightens the image.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **/despeckle**        | Removes dots below the specified pixel size, the possible input values range from 0-9.
 **Note**: To carry over the despeckled image to the output file, set the SavePreDespeckle flag explained below to false.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **/SavePreDespeckle** | If set to true and despeckle is also set to true, the pre-despeckled image is added in the output PDF document. Other pre-processing settings such as line removal and morph are not maintained in the output PDF document if enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **/autorotate**       | Rotates the page image if required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/language**         | OCR Language dictionary to be used. The default is English. For more information on language and flag values, see "Language" table below.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **/graphicsproc**     | - **all**: Treat all Graphics Areas as Text.

- **box**: Remove Box Lines in OCR Processing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/extractimages**    | One of the following:

- **Auto**: TIFF Junction will select the most appropriate method.

- **Convert to TIFF**: The PDF is rasterized using conversion to PDF.

- **Native**                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/PDFDPI**           | An integer value representing the resolution of the rasterized Tiff file if “Convert to TIFF” is used above.
 **Note**: This setting will only work if extractimages is set to Convert to TIFF.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **/TIFFCompression**  | Sets the Compression for the TIFF file used if the “Convert To TIFF” Option above is used.

- Auto (Selects Group 4 if the page is Black AND White else it uses LZW Compression)

- Group 4 (Black and White)

- LZW (Colored)
 **Note**: This setting will only work if extractimages is set to Convert to TIFF                                                                                                                                                                                                                                                                                                                         |
| **/RetainBookmarks**  | Set to true to retain bookmarks from the original PDF. They are copied to the searchable result PDF.
 **Note**: This setting will only work if extractimages is set to **Convert to TIFF** and operation is set to **ocrimagepdf**.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **/RetainMetadata**   | Set to true to retain metadata from the original PDF. They are copied to the searchable result PDF.
 **Note**: This setting will only work if extractimages is set to **Convert to TIFF** and operation is set to **ocrimagepdf**                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **/mrc**              | This enables Mixed Raster Compression which can dramatically reduce the output size of PDFs comprising color scans.
 **Note**: This setting will only work if **extractimages** is set to **Convert to TIFF**                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **/JBIG2**            | This is a compression used for Bitonal images.
 **Note**: This setting will only work if extractimages is set to **Convert to TIFF**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **/OCRTextFile**      | This option tells Document Automation Server (DAS) that text found in the document should also be written to a text output file. The output file can be of 4 different types, use the `/TextFile` flag below to specify.

- **true**: produce text output
 **false**: do not produce text output                                                                                                                                                                                                                                                                                                                                                       |
| **/TextFile**         | This flag must be used together with the `/OCRTextFile` flag above. It specifies the type of text file to be produced as follows:
 “plain text” - txt, pdf
 “plain text (no pdf)” - txt only
 “rtf” - rtf, pdf
 “html” - html, pdf                                                                                                                                                                                                                                                                                                                                                                                                    |
| **/optimiseocr**      | See the [Advanced Pre-Processing](/guides/document-automation-server/document-conversion/ocr-properties-file-and-the-advanced-pre-processing-option.md#advanced-pre-processing) for a full explanation of this option.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## Language

| Language            | Flag Value |
| ------------------- | ---------- |
| **English**         | 0          |
| **German**          | 1          |
| **French**          | 2          |
| **Russian**         | 3          |
| **Swedish**         | 4          |
| **Spanish**         | 5          |
| **Italian**         | 6          |
| **Russian English** | 7          |
| **Ukrainian**       | 8          |
| **Serbian**         | 9          |
| **Croatian**        | 10         |
| **Polish**          | 11         |
| **Danish**          | 12         |
| **Portuguese**      | 13         |
| **Dutch**           | 14         |
| **Czech**           | 15         |
| **Roman**           | 16         |
| **Hungarian**       | 17         |
| **Bulgar**          | 18         |
| **Slovenian**       | 19         |
| **Latvian**         | 20         |
| **Lithuanian**      | 21         |
| **Estonian**        | 22         |
| **Turkish**         | 23         |

---

## Related pages

- [Streamline tasks with the command-line interface](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface.md)
- [Effortlessly merge PDFs with advanced features](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/merge-pdf--used-with-mergepdf.md)
- [Create XML property file – [used with getxmlpdf]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/create-xml-property-file--used-with-getxmlpdf.md)
- [Streamline Azure file downloads with automation](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/azure-uploaddownload--used-with-azuredownload-and-azureupload.md)
- [Streamline PDF text extraction with ease](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/extract-text-download--used-with-extracttext.md)
- [Document automation: Convert and redact files easily](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/examples.md)
- [Effortlessly convert any file to PDF with OCR](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/ocr-any-file-to-pdf-used-with-ocranyfile-or-ocranyfileex.md)
- [Efficient job control in document automation](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/general-job-options.md)
- [Optimize your documents with extended OCR steps](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/extended-ocr-steps.md)
- [[PDF to TIFF [used with pdftotiff]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/pdf-to-tiff-used-with-pdftotiff.md)
- [PDF conversion options [used with topdf operations]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/pdf-conversion-options-used-with-topdf-operations.md)
- [Sharepoint settings – [used with sharepointdownload and sharepointupload]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/sharepoint-settings--used-with-sharepointdownload-and-sharepointupload.md)
- [PDF output file settings – [used with pdfprops]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/pdf-output-file-settings--used-with-pdfprops.md)
- [Split parameters [used with splittiff and splitpdf operations]](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/split-parameters-used-with-splittiff-and-splitpdf-operations.md)
- [Efficient document automation with barcode processing](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/tiffpdf-barcode--used-with-barcode.md)
- [Customize PDF stamping options easily](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/stamp-pdf--used-with-stamppdf.md)
- [Document conversion with the GdPicture CLI](/guides/document-automation-server/document-conversion/autobahn-dx-command-line-interface/gdpicture-steps.md)

