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))
foxit::Object
CFX_Object Object
Object type.
Definition:
fs_basictypes.h:217
fs_pdfdoc.h
Header file for PDF document related definitions and classes.
foxit::addon::ocr::OCREngine::SetLogFile
static void SetLogFile(const char *log_file_path)
Set log file for OCR engine.
foxit::addon::ocr::OCR::operator==
bool operator==(const OCR &other) const
Equal operator.
foxit::pdf::PDFDoc
Definition:
fs_pdfdoc.h:389
foxit::addon::ocr::OCREngine::Initialize
static ErrorCode Initialize(const wchar_t *ocr_resource_path)
Initialize OCR engine.
foxit::addon::ocr::OCR::OCRPDFDocument
void OCRPDFDocument(pdf::PDFDoc pdf_doc, bool is_editable)
OCR each page of a PDF document.
foxit::addon::ocr::OCREngine
Definition:
fs_ocr.h:47
foxit::addon::ocr::OCR::OCRPDFPage
void OCRPDFPage(pdf::PDFPage pdf_page, bool is_editable)
OCR a PDF page.
foxit::addon::ocr::OCR
Definition:
fs_ocr.h:134
foxit::ErrorCode
ErrorCode
Enumeration for error code.
Definition:
fs_basictypes.h:233
foxit::addon::ocr::OCR::~OCR
~OCR()
Destructor.
foxit::pdf::PDFPage
Definition:
fs_pdfpage.h:367
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition:
fs_basictypes.h:214
fs_common.h
Header file for common definitions and classes.
foxit::Base
Definition:
fs_basictypes.h:397
fs_pdfpage.h
Header file for PDF page related definitions and classes.
foxit::addon::ocr::OCREngine::SetLanguages
static void SetLanguages(const wchar_t *languages)
Set the name of languages which would be included in the language database for doing OCR.
foxit
Foxit namespace.
Definition:
fs_compare.h:27
foxit::addon::ocr::OCR::operator !=
bool operator !=(const OCR &other) const
Not equal operator.
foxit::addon::ocr::OCR::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::addon::ocr::OCR::operator=
OCR & operator=(const OCR &other)
Assign operator.
foxit::addon::ocr::OCR::OCR
OCR()
Constructor.
foxit::addon::ocr::OCREngine::Release
static void Release()
Release OCR engine.
@2020 Foxit Software Incorporated. All rights reserved.