Package com.logicaldoc.ocr
Class OCR
- java.lang.Object
-
- com.logicaldoc.ocr.OCR
-
- Direct Known Subclasses:
Advanced
,OCRWebService
,PowerPDF
,Tesseract
public abstract class OCR extends Object
This OCR engine is capable of recognizing characters (letter and numbers) accurately- Author:
- Alessandro Gasparini
-
-
Constructor Summary
Constructors Constructor Description OCR()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extractPDFText(File pdffile, String lang, String tenant, StringBuffer buffer)
Extracts the text from PDF filevoid
extractText(File imgfile, String lang, String tenant, StringBuffer sb)
String
getParameter(String name)
List<String>
getParameterNames()
Map<String,String>
getParameters()
int
getResolutionThreshold(String tenant)
boolean
isAvailable()
static boolean
isWindows()
void
loadParameters()
-
-
-
Method Detail
-
loadParameters
public void loadParameters()
-
isAvailable
public boolean isAvailable()
-
extractPDFText
public void extractPDFText(File pdffile, String lang, String tenant, StringBuffer buffer) throws IOException
Extracts the text from PDF file- Parameters:
pdffile
- the file to ocrlang
- the language in which the document is writtentenant
- name of the tenantbuffer
- the buffer to store the extracted text- Throws:
IOException
- In case of OCR error
-
extractText
public void extractText(File imgfile, String lang, String tenant, StringBuffer sb) throws IOException
- Throws:
IOException
-
getResolutionThreshold
public int getResolutionThreshold(String tenant)
-
isWindows
public static boolean isWindows()
-
-