Work with profiles
Pdftools OCR Service lets you fine-tune the OCR engine using various parameters. You can specify parameters for image preprocessing, analysis, recognition, and synthesis to obtain the optimal speed and quality of processing.
Predefined profiles
The Pdftools OCR Service lets you set predefined profiles designed for the main usage scenarios (the specifications of all predefined profiles are described in PredefinedProfiles references). The settings provided in these profiles are best suited for their respective situations. Often, a profile comes in two versions: one optimized for the highest quality of the resulting document and the other optimized for the fastest processing speed.
Custom profiles
You can also create your own profile file. These profile files use INI file syntax. You can add comments in an INI file by starting a line with a semicolon (;
).
The sections contain the names of the objects whose properties can be specified. The keys contain the properties with their values. The special section called UserData
can contain any user-defined keys. The values of Boolean properties are represented by the strings true
or false
, while enumeration properties are represented by corresponding constants, for example:
[PrepareImageMode]
DiscardColorImage = true
[PDFExportParams]
TextExportMode = PEM_ImageOnText
; This line is a comment
[RecognizerParams]
FastMode = true
The Profile
parameter lets you load a custom profile file. After this file is loaded, the created objects will have the new values specified in the file. Loading parameters from a profile is similar to specifying the corresponding properties in the code. If an empty string is passed to the Profile
parameter, the standard default values will be used.
The objects in the square brackets (for example, [RecognizerParams]
) represent INI file sections. You may include various parameters only under certain INI file sections. For more details, review Custom profiles.
To configure a custom profile for specific OCR processing behavior, follow these steps:
- Create a custom profile INI file.
- In the Conversion Service Configurator, go to Workflows & Profiles.
- Click the pen icon next to the workflow profile you want to edit.
- Navigate to the OCR Settings section.
- Next to Engine, click the pen icon in the Pdftools OCR Service (3H Legacy Compatible) section.
- In the Parameters input field, include a path to your INI file, for example:
Profile="C:\ocr\profiles\document_conversion_high_accuracy.ini"
- After editing your configuration, click Apply.
The INI file must be on the same machine as the Pdftools OCR Service Manager node. If both Profile
and PredefinedProfile
are set, the custom Profile
overrides the predefined profile.
Using both predefined and custom profiles
You can load one predefined profile and one custom profile simultaneously. The custom profile has priority over the predefined profile. For example, if a custom profile sets the same parameter as a predefined profile, the value from the custom profile will be used.
If you load one more predefined profile, this new profile replaces the previous predefined profile. Similarly, a new custom profile replaces the previous custom profile.