Click or drag to resize
Pdftools logo

Engine Class

OCR engine

An OCR engine is required for most OCR processing operations. Engines can be created using the static method Create(String).

OCR engines can be reused to process multiple files. However, one OCR engine can only be used to process one file at a time.

Note that some OCR engines must be disposed in the same thread where they have been created. Note that of some OCR engines only one instance can be created per process.

Inheritance Hierarchy
SystemObject
  PdfTools.InternalNativeBase
    PdfTools.InternalNativeObject
      PdfTools.OcrEngine

Namespace: PdfTools.Ocr
Assembly: PdfTools (in PdfTools.dll) Version: 1.16.0+362ed17524d0f96db0bdf45362ca9dfd8e1a4428
Syntax
C#
public class Engine : NativeObject, IDisposable

The Engine type exposes the following members.

Properties
 NameDescription
Public propertyLanguages

The OCR language settings

Set the languages used for recognition to improve detection accuracy. Note that for some engines it is crucial to set the used languages correctly. For example, ABBYY FineReader will only detect characters used in the specified languages.

Multiple languages can be specified as a comma-separated list, e.g. "German,English".

Default value: (engine default)

Public propertyParameters

Engine-specific parameters

OCR engine-specific parameters can be set to optimize performance or activate optional recognition features.

Parameters are specified as semicolon-separated key=value pairs, e.g. "PredefinedProfile=Default;Profile=/path/to/profile.ini". The available parameters depend on the OCR engine. Commonly supported parameters include: - "PredefinedProfile": Name of a predefined recognition profile (default: "Default"). - "Profile": Path to a custom profile file. Applied after the predefined profile.

Parameter keys are case-sensitive.

Default value:

Top
Methods
 NameDescription
Public methodStatic memberCreate

Create a new OCR engine

Optionally the name argument may be followed by "@" and engine creation parameters, e.g. "service@http://localhost:7982/"
Public methodDispose

Close the engine

Release all native resources associated with the OCR engine.
Public methodEquals
(Inherited from NativeObject)
Public methodGetHashCode
(Inherited from NativeObject)
Top
See Also