Foxit PDF SDK
com.foxit.sdk.addon.ocr.OCR Class Reference
Inheritance diagram for com.foxit.sdk.addon.ocr.OCR:
com.foxit.sdk.common.Base

Public Member Functions

 OCR () throws com.foxit.sdk.PDFException
 Constructor.
 
 OCR (OCR other)
 Constructor, with another ocr object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
void oCRPDFDocument (PDFDoc pdf_doc, boolean is_editable) throws com.foxit.sdk.PDFException
 OCR each page of a PDF document. More...
 
void oCRPDFDocuments (OCRSettingDataArray settingdata_array)
 OCR multiple pages of multiple PDF documents. More...
 
void oCRPDFPage (PDFPage pdf_page, boolean is_editable) throws com.foxit.sdk.PDFException
 OCR a PDF page. More...
 
- Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void delete ()
 Clean up related resources immediately. More...
 

Detailed Description

This class is used to do OCR for a PDF page or a PDF document. Please ensure OCR engine has been initialized before using this class.

See also
OCREngine

Constructor & Destructor Documentation

◆ OCR()

com.foxit.sdk.addon.ocr.OCR.OCR ( OCR  other)

Constructor, with another ocr object.

Parameters
[in]otherAnother ocr object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.ocr.OCR.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ isEmpty()

boolean com.foxit.sdk.addon.ocr.OCR.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ oCRPDFDocument()

void com.foxit.sdk.addon.ocr.OCR.oCRPDFDocument ( PDFDoc  pdf_doc,
boolean  is_editable 
) throws com.foxit.sdk.PDFException

OCR each page of a PDF document.

After this function succeeds, the PDF page content may be changed. It is better to parse or re-parse PDF pages in the input PDF document before using these pages.

Parameters
[in]pdf_docA valid PDF document object.
[in]is_editabletrue means the OCR result is editable. false means the OCR result can only be searched but not be edited.
Returns
None.

◆ oCRPDFDocuments()

void com.foxit.sdk.addon.ocr.OCR.oCRPDFDocuments ( OCRSettingDataArray  settingdata_array)

OCR multiple pages of multiple PDF documents.

This function can be used to batch process multiple documents or pages. Users can set documents and page ranges via OCRSettingDataArray . The time performance of this function will be better than calling or OCR.oCRPDFPage multiple times when dealing with a large number of documents or pages. After successful execution, the page content may be changed, it is better to parse or re-parse the PDF pages before using these pages.

Parameters
[in]settingdata_arrayAn array of OCRSettingData objects, if the parameter page_range of OCRSettingData object is empty, that means OCR each page of the PDF document.
Returns
None.

◆ oCRPDFPage()

void com.foxit.sdk.addon.ocr.OCR.oCRPDFPage ( PDFPage  pdf_page,
boolean  is_editable 
) throws com.foxit.sdk.PDFException

OCR a PDF page.

After this function succeeds, the PDF page content may be changed and the input PDF page is recommended to be re-parsed.

Parameters
[in]pdf_pageA valid PDF page object. This PDF page should have been parsed.
[in]is_editabletrue means the OCR result is editable. false means the OCR result can only be searched but not be edit.
Returns
None.