Package com.itextpdf.pdfocr.tesseract4
Class Tesseract4ExecutableOcrEngine
java.lang.Object
com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine
com.itextpdf.pdfocr.tesseract4.Tesseract4ExecutableOcrEngine
- All Implemented Interfaces:
-
IOcrEngine
,IProductAware
The implementation of
AbstractTesseract4OcrEngine
for tesseract OCR.
This class provides possibilities to use features of "tesseract" CL tool (optical character recognition engine for various operating systems). Please note that it's assumed that "tesseract" has already been installed locally.
-
Constructor Summary
ConstructorDescriptionTesseract4ExecutableOcrEngine
(Tesseract4OcrEngineProperties tesseract4OcrEngineProperties) Creates a newTesseract4ExecutableOcrEngine
instance.Tesseract4ExecutableOcrEngine
(String executablePath, Tesseract4OcrEngineProperties tesseract4OcrEngineProperties) Creates a newTesseract4ExecutableOcrEngine
instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Gets path to tesseract executable.final void
setPathToExecutable
(String path) Sets path to tesseract executable.Methods inherited from class com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine
createTxtFile, createTxtFile, doImageOcr, doImageOcr, doImageOcr, doImageOcr, doTesseractOcr, doTesseractOcr, getLanguagesAsString, getMetaInfoContainer, getProductData, getTesseract4OcrEngineProperties, identifyOsType, isTaggingSupported, isWindows, setTesseract4OcrEngineProperties, validateLanguages
-
Constructor Details
-
Tesseract4ExecutableOcrEngine
Creates a newTesseract4ExecutableOcrEngine
instance.- Parameters:
-
tesseract4OcrEngineProperties
- set of properties
-
Tesseract4ExecutableOcrEngine
public Tesseract4ExecutableOcrEngine(String executablePath, Tesseract4OcrEngineProperties tesseract4OcrEngineProperties) Creates a newTesseract4ExecutableOcrEngine
instance.- Parameters:
-
executablePath
- path to tesseract executable -
tesseract4OcrEngineProperties
- set of properties
-
-
Method Details
-
getPathToExecutable
Gets path to tesseract executable.- Returns:
- path to tesseract executable
-
setPathToExecutable
Sets path to tesseract executable. By default it's assumed that "tesseract" already exists in the "PATH".- Parameters:
-
path
- path to tesseract executable
-