Package com.logicaldoc.ocr
Class OCR
java.lang.Object
com.logicaldoc.ocr.OCR
- Direct Known Subclasses:
- OCRWebService,- PowerPDF,- Tesseract
This OCR engine is capable of recognizing characters (letter and numbers)
 accurately
- Author:
- Alessandro Gasparini
- 
Method SummaryModifier and TypeMethodDescriptionvoidextractPDFText(File pdffile, String lang, String tenant, StringBuilder buffer, OCRHistory transaction) Extracts the text from PDF filevoidextractText(File imgfile, String lang, String tenant, StringBuilder sb, OCRHistory transaction) getParameter(String name) intgetResolutionThreshold(String tenant) booleanstatic booleanvoid
- 
Method Details- 
loadParameterspublic void loadParameters()
- 
getParameters
- 
getParameter
- 
getParameterNames
- 
isAvailablepublic boolean isAvailable()
- 
extractPDFTextpublic void extractPDFText(File pdffile, String lang, String tenant, StringBuilder buffer, OCRHistory transaction) throws IOException Extracts the text from PDF file- Parameters:
- pdffile- the file to ocr
- lang- the language in which the document is written
- tenant- name of the tenant
- buffer- the buffer to store the extracted text
- transaction- informations about the indexing transaction
- Throws:
- IOException- In case of OCR error
 
- 
extractTextpublic void extractText(File imgfile, String lang, String tenant, StringBuilder sb, OCRHistory transaction) throws IOException - Throws:
- IOException
 
- 
getResolutionThreshold
- 
isWindowspublic static boolean isWindows()
 
-