OCREngine Class Documentation
classOCREngineNamespace:com::datalogics::PDFL
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.
Referenced by
Constructor & Destructor Documentation
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voidfinalize
voidfinalize()Returns:
voidgetAvailableLanguages
java.util.List< Language >getAvailableLanguages()Returns:
the list of languages supported, or null if that list can't be determined.Get a list of languages this OCREngine can use.
isLanguageAvailable
booleanisLanguageAvailable(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
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, the missingFontStrategy will determine the behavior to employ.
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.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.