public class TessJNI extends Object
Constructor and Description |
---|
TessJNI() |
Modifier and Type | Method and Description |
---|---|
String |
performOCR(String language,
BufferedImage image)
Performs OCR on an image and returns an hOCR result string.
|
String |
performOCR(String language,
PDFPage pdfPage,
int dpi)
Performs OCR on a PDF page and returns an hOCR result string.
|
String |
performOCR(String language,
PDFPage pdfPage,
int dpi,
OCROptions options)
Performs OCR on a PDF page and returns an hOCR result string.
|
public String performOCR(String language, BufferedImage image) throws OCRException
language
- The language to use in performing the OCR. This can be multiple languages separated by a plus character (ex. "eng+fra")image
- The image to processOCRException
public String performOCR(String language, PDFPage pdfPage, int dpi) throws PDFException, OCRException
language
- The language to use in performing the OCR. This can be multiple languages separated a plus character (ex. "eng+fra").pdfPage
- The PDF page to process.dpi
- Dots per inch at which to render the image.OCRException
PDFException
public String performOCR(String language, PDFPage pdfPage, int dpi, OCROptions options) throws PDFException, OCRException
language
- The language to use in performing the OCR. This can be multiple languages separated a plus character (ex. "eng+fra").pdfPage
- The PDF page to process.dpi
- Dots per inch at which to render the image.options
- The OCR options.PDFException
OCRException