Foxit PDF SDK
foxit::addon::ocr::OCR Class Reference
Inheritance diagram for foxit::addon::ocr::OCR:
foxit::Base

Public Member Functions

 OCR ()
 Constructor.
 
 OCR (const OCR &other)
 Constructor, with another ocr object. More...
 
 ~OCR ()
 Destructor.
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
void OCRPDFDocument (pdf::PDFDoc pdf_doc, bool is_editable)
 OCR each page of a PDF document. More...
 
void OCRPDFPage (pdf::PDFPage pdf_page, bool is_editable)
 OCR a PDF page. More...
 
bool operator != (const OCR &other) const
 Not equal operator. More...
 
OCRoperator= (const OCR &other)
 Assign operator. More...
 
bool operator== (const OCR &other) const
 Equal operator. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. 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()

foxit::addon::ocr::OCR::OCR ( const OCR other)

Constructor, with another ocr object.

Parameters
[in]otherAnother ocr object.

Member Function Documentation

◆ IsEmpty()

bool foxit::addon::ocr::OCR::IsEmpty ( ) const

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 foxit::addon::ocr::OCR::OCRPDFDocument ( pdf::PDFDoc  pdf_doc,
bool  is_editable 
)

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 use 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 edit.
Returns
None.

◆ OCRPDFPage()

void foxit::addon::ocr::OCR::OCRPDFPage ( pdf::PDFPage  pdf_page,
bool  is_editable 
)

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.

◆ operator !=()

bool foxit::addon::ocr::OCR::operator != ( const OCR other) const

Not equal operator.

Parameters
[in]otherAnother ocr object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

OCR& foxit::addon::ocr::OCR::operator= ( const OCR other)

Assign operator.

Parameters
[in]otherAnother ocr object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::addon::ocr::OCR::operator== ( const OCR other) const

Equal operator.

Parameters
[in]otherAnother ocr object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.