1 #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__) 118 static ErrorCode Initialize(
const wchar_t* ocr_resource_path,
bool is_shared_cpu_cores_mode);
141 static void SetLogFile(
const char* log_file_path);
154 static void SetLogFile(
const wchar_t* log_file_path);
441 typedef enum _OCRConvertFormat {
443 e_OCRConvertFormatDOCX = 0,
445 e_OCRConvertFormatDOC = 1,
447 e_OCRConvertFormatRTF = 2,
449 e_OCRConvertFormatXLSX = 3,
451 e_OCRConvertFormatXLS = 4,
453 e_OCRConvertFormatPPTX = 5,
455 e_OCRConvertFormatHTML = 6
482 OCR& operator = (
const OCR& other);
498 bool operator != (
const OCR& other)
const;
507 bool IsEmpty()
const;
521 void OCRPDFPage(
pdf::PDFPage pdf_page,
bool is_editable);
550 void OCRPDFDocument(
pdf::PDFDoc pdf_doc,
bool is_editable);
584 void OCRConvertTo(OCRConvertFormat format,
const wchar_t* src_pdf_path,
const wchar_t* password,
const wchar_t* saved_file_path,
common::Range page_range,
bool is_retain_flowing_text);
604 void OCRConvertTo(OCRConvertFormat format,
const wchar_t* src_pdf_path,
const wchar_t* password,
const wchar_t* saved_file_path,
common::Range page_range,
bool is_retain_flowing_text,
const OCRConfig& config);
606 #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__) 644 #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__)
bool is_detect_pictures
Decide whether to detect pictures. true means the pictures will be detected during analysis process....
Definition: fs_ocr.h:274
Definition: fs_common.h:1348
CFX_Object Object
Object type.
Definition: fs_basictypes.h:221
bool is_editable
Decide whether the OCR result is editable. true means the OCR result is editable. false means the OCR...
Definition: fs_ocr.h:399
Header file for PDF document related definitions and classes.
static void SetLogFile(const char *log_file_path)
Set log file for OCR engine.
OCRSettingData(pdf::PDFDoc pdf_doc, const common::Range &page_range, bool is_editable, const OCRConfig &ocr_config)
Constructor, with parameters.
Definition: fs_ocr.h:337
virtual bool NeedToCancelNow(const wchar_t *info)=0
A callback function used to cancel current OCR progress.
WIDE STRING CLASS.
Definition: fx_string.h:1461
Definition: fs_pdfdoc.h:772
OCRConfig()
Constructor.
Definition: fs_ocr.h:195
void Set(pdf::PDFDoc pdf_doc, const common::Range &page_range, bool is_editable, const OCRConfig &ocr_config)
Set value.
Definition: fs_ocr.h:354
static ErrorCode Initialize(const wchar_t *ocr_resource_path)
Initialize OCR engine.
OCRConfig(bool is_detect_pictures, bool is_remove_noise, bool is_correct_skew, bool is_enable_text_extraction_mode, bool is_sequentially_process)
Constructor, with parameters.
Definition: fs_ocr.h:210
void Set(bool is_detect_pictures, bool is_remove_noise, bool is_correct_skew, bool is_enable_text_extraction_mode, bool is_sequentially_process)
Set value.
Definition: fs_ocr.h:229
OCRSettingData()
Constructor.
Definition: fs_ocr.h:327
WString suspect_words
Suspicious words after OCR recognition.
Definition: fs_ocr.h:422
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
OCRSettingData & operator=(const OCRSettingData &data)
Assign operator.
Definition: fs_ocr.h:368
bool is_sequentially_process
Decide whether the OCR engine will process pages sequentially on one process.
Definition: fs_ocr.h:318
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:237
OCRConfig & operator=(const OCRConfig &other)
Assign operator.
Definition: fs_ocr.h:244
foxit::RectF words_rect
The box rectangle, in PDF coordinate system for suspicious words.
Definition: fs_ocr.h:419
pdf::PDFDoc pdf_doc
A valid PDF document that need to be OCR.
Definition: fs_ocr.h:390
Definition: fs_pdfpage.h:412
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
int page_index
The index of page.
Definition: fs_ocr.h:416
Header file for common definitions and classes.
bool operator!=(const OCRSettingData &data)
Not equal operator.
Definition: fs_ocr.h:383
Definition: fs_basictypes.h:449
bool operator!=(const OCRConfig &other)
Not equal operator.
Definition: fs_ocr.h:260
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.
bool is_correct_skew
Decide whether to enable skew correction. true means to enable skew correction. false means not to en...
Definition: fs_ocr.h:293
Foxit namespace.
Definition: fs_taggedpdf.h:27
bool is_remove_noise
Decide whether to remove noise of the image of PDF. It can be useful if the image of the PDF contains...
Definition: fs_ocr.h:284
bool is_enable_text_extraction_mode
Decide whether to enable text extraction mode.
Definition: fs_ocr.h:306
static void SetOCRCallback(OCRCallback *callback)
Set the callback object used to cancel OCR progress.
common::Range page_range
The range of pages that need to be OCR.
Definition: fs_ocr.h:393
OCRConfig ocr_config
The OCRConfig object.
Definition: fs_ocr.h:402
static void Release()
Release OCR engine.
Definition: fx_coordinates.h:771