Package com.itextpdf.pdfocr.tesseract4
Class Tesseract4LibOcrEngine
java.lang.Object
com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine
com.itextpdf.pdfocr.tesseract4.Tesseract4LibOcrEngine
- All Implemented Interfaces:
-
IOcrEngine
,IProductAware
The implementation of
AbstractTesseract4OcrEngine
for tesseract OCR. This class provides possibilities to use features of "tesseract" using tess4j. Please note that this class is not thread-safe, in other words this Tesseract engine cannot be used for multithreaded processing. You should create one instance per thread
-
Constructor Summary
ConstructorDescriptionTesseract4LibOcrEngine
(Tesseract4OcrEngineProperties tesseract4OcrEngineProperties) Creates a newTesseract4LibOcrEngine
instance. -
Method Summary
Modifier and TypeMethodDescriptionnet.sourceforge.tess4j.ITesseract
Gets tesseract instance.void
initializeTesseract
(OutputFormat outputFormat) Initializes instance of tesseract if it haven't been already initialized or it have been disposed and sets all the required properties.Methods inherited from class com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine
createTxtFile, createTxtFile, doImageOcr, doImageOcr, doImageOcr, doImageOcr, doTesseractOcr, doTesseractOcr, getLanguagesAsString, getMetaInfoContainer, getProductData, getTesseract4OcrEngineProperties, identifyOsType, isWindows, setTesseract4OcrEngineProperties, validateLanguages
-
Constructor Details
-
Tesseract4LibOcrEngine
Creates a newTesseract4LibOcrEngine
instance.- Parameters:
-
tesseract4OcrEngineProperties
- set of properteis
-
-
Method Details
-
getTesseractInstance
public net.sourceforge.tess4j.ITesseract getTesseractInstance()Gets tesseract instance.- Returns:
-
initialized
ITesseract
instance
-
initializeTesseract
Initializes instance of tesseract if it haven't been already initialized or it have been disposed and sets all the required properties.- Parameters:
-
outputFormat
- selectedOutputFormat
for tesseract
-