Foxit PDF SDK
fs_ocr.h
Go to the documentation of this file.
1 #if (defined(_WIN32) || defined(_WIN64))
2 
16 #ifndef FS_OCR_H_
17 #define FS_OCR_H_
18 
19 #include "common/fs_common.h"
20 #include "pdf/fs_pdfdoc.h"
21 #include "pdf/fs_pdfpage.h"
22 
28 namespace foxit {
32 namespace addon {
36 namespace ocr {
47 class OCREngine FS_FINAL : public Object {
48  public:
68  static ErrorCode Initialize(const wchar_t* ocr_resource_path);
69 
78  static void Release();
79 
91  static void SetLogFile(const char* log_file_path);
92 
104  static void SetLogFile(const wchar_t* log_file_path);
105 
125  static void SetLanguages(const wchar_t* languages);
126 };
127 
134 class OCR FS_FINAL : public Base {
135  public:
139  OCR();
140 
146  OCR(const OCR& other);
147 
148  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
149  explicit OCR(FS_HANDLE handle);
151  ~OCR();
152 
160  OCR& operator = (const OCR& other);
168  bool operator == (const OCR& other) const;
176  bool operator != (const OCR& other) const;
177 
185  bool IsEmpty() const;
186 
199  void OCRPDFPage(pdf::PDFPage pdf_page, bool is_editable);
200 
213  void OCRPDFDocument(pdf::PDFDoc pdf_doc, bool is_editable);
214 };
215 
216 } // namespace ocr
217 } // namespace addon
218 } // namespace foxit
219 
220 #endif // FS_OCR_H_
221 
222 #endif // #if (defined(_WIN32) || defined(_WIN64))
CFX_Object Object
Object type.
Definition: fs_basictypes.h:217
Header file for PDF document related definitions and classes.
static void SetLogFile(const char *log_file_path)
Set log file for OCR engine.
bool operator==(const OCR &other) const
Equal operator.
Definition: fs_pdfdoc.h:389
static ErrorCode Initialize(const wchar_t *ocr_resource_path)
Initialize OCR engine.
void OCRPDFDocument(pdf::PDFDoc pdf_doc, bool is_editable)
OCR each page of a PDF document.
Definition: fs_ocr.h:47
void OCRPDFPage(pdf::PDFPage pdf_page, bool is_editable)
OCR a PDF page.
Definition: fs_ocr.h:134
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:233
Definition: fs_pdfpage.h:367
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
Definition: fs_basictypes.h:397
Header file for PDF page related definitions and classes.
static void SetLanguages(const wchar_t *languages)
Set the name of languages which would be included in the language database for doing OCR.
Foxit namespace.
Definition: fs_compare.h:27
bool operator !=(const OCR &other) const
Not equal operator.
bool IsEmpty() const
Check whether current object is empty or not.
OCR & operator=(const OCR &other)
Assign operator.
static void Release()
Release OCR engine.