OCREngine Class Documentation
classOCREngine : SystemIDisposableNamespace:Datalogics::PDFL
- Inherits from:
SystemIDisposable
Detailed Description
Represents an OCR Engine and its configuration.
Create an OCREngine object once, and reuse it to convert multiple images to Form objects to avoid repeating the sometimes expensive initialization of the engine. The configuration of the engine can't be changed after it's created; if you need to do that, create another OCREngine object.
Constructor & Destructor Documentation
OCREngine
OCREngine(OCREnginerhs, InternalConstructsignifier)Parameters
rhs: OCREnginesignifier: InternalConstruct
OCREngine
OCREngine()Create an OCR engine.
OCREngine
OCREngine(OCRParamsocrParams)Parameters
ocrParams: OCRParamsthe configuration to use
Create an OCR engine with a specified configuration.
~OCREngine
~OCREngine()Property Documentation
AvailableLanguages
System.Collections.Generic.IList< Language >AvailableLanguages[get]Member Function Documentation
ConstructorRetrieve
static OCREngineConstructorRetrieve(System.IntPtrignored)Parameters
ignored: System.IntPtr
Returns:
OCREngineDispose
voidDispose()Returns:
voidDisposeChildren
voidDisposeChildren()Returns:
voidIsLanguageAvailable
boolIsLanguageAvailable(Languagelanguage)Parameters
language: Languagethe language to check
Returns:
true if the language is available, false otherwiseQuery if a language for OCR is available for use.
PlaceTextUnder
Parameters
image: ImageThe image in which to recognize text.
Returns:
a Form element containing the image with text underneath.Recognize text in the image, returning a form element with the image and the text underneath.
Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream.
This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts.
PlaceTextUnder
Parameters
Returns:
a Form element containing the image with text underneath.Recognize text in the image, returning a form element with the image and the text underneath.
Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream.
The form will be created in the specified document, sharing fonts with the results of recognizing text in other images.
This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts.
PlaceTextUnder
Parameters
Returns:
a Form element containing the image with text underneath.Recognize text in the image of the known resolution, returning a form element with the image and the text underneath. Knowing the image's resolution can enhance recognition.
NOTE: Determining the resolution of the image is the caller's responsibility.
Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream.
The form will be created in the specified document, sharing fonts with the results of recognizing text in other images.
If a font that will represent all the characters in a word can't be found, an exception will be raised.
PlaceTextUnder
FormPlaceTextUnder(Imageimage, DocumentinDocument, doubleresolution, MissingFontStrategymissingFontStrategy)Parameters
image: ImageThe image in which to recognize text.
inDocument: DocumentThe destination document for the created form.
resolution: doubleThe resolution of the Image being recognized.
missingFontStrategy: MissingFontStrategyThe behavior to use if a Font can't be found to represent the recognized text.
Returns:
a Form element containing the image with text underneath.Recognize text in the image of the known resolution, returning a form element with the image and the text underneath. Knowing the image's resolution can enhance recognition.
NOTE: Determining the resolution of the image is the caller's responsibility.
Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream.
The form will be created in the specified document, sharing fonts with the results of recognizing text in other images.
If a font that will represent all the characters in a word can't be found, the missingFontStrategy will determine the behavior to employ.
PlaceTextUnder
FormPlaceTextUnder(Imageimage, DocumentinDocument, MissingFontStrategymissingFontStrategy)Parameters
image: ImageThe image in which to recognize text.
inDocument: DocumentThe destination document for the created form.
missingFontStrategy: MissingFontStrategyThe behavior to use if a Font can't be found to represent the recognized text.
Returns:
a Form element containing the image with text underneath.Recognize text in the image, returning a form element with the image and the text underneath. Knowing the image's resolution can enhance recognition.
Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream.
The form will be created in the specified document, sharing fonts with the results of recognizing text in other images.
If a font that will represent all the characters in a word can't be found, the missingFontStrategy will determine the behavior to employ.