26 using namespace common;
30 namespace conversion {
34 namespace pdf2office {
40 : enable_retain_page_layout(false)
41 , enable_generate_headers_and_footers(true)
42 , enable_generate_footnotes_and_endnotes(false)
43 , enable_generate_page_rendered_break(false)
44 , max_blank_paragraphs_per_page_bottom(0){ }
63 PDF2WordSettingData(
bool enable_retain_page_layout,
bool enable_generate_headers_and_footers,
bool enable_generate_footnotes_and_endnotes,
bool enable_generate_page_rendered_break,
int max_blank_paragraphs_per_page_bottom) {
64 this->enable_retain_page_layout = enable_retain_page_layout;
65 this->enable_generate_headers_and_footers = enable_generate_headers_and_footers;
66 this->enable_generate_footnotes_and_endnotes = enable_generate_footnotes_and_endnotes;
67 this->enable_generate_page_rendered_break = enable_generate_page_rendered_break;
68 this->max_blank_paragraphs_per_page_bottom = max_blank_paragraphs_per_page_bottom;
106 void Set(
bool enable_retain_page_layout,
bool enable_generate_headers_and_footers,
bool enable_generate_footnotes_and_endnotes,
bool enable_generate_page_rendered_break,
int max_blank_paragraphs_per_page_bottom) {
107 this->enable_retain_page_layout = enable_retain_page_layout;
108 this->enable_generate_headers_and_footers = enable_generate_headers_and_footers;
109 this->enable_generate_footnotes_and_endnotes = enable_generate_footnotes_and_endnotes;
110 this->enable_generate_page_rendered_break = enable_generate_page_rendered_break;
111 this->max_blank_paragraphs_per_page_bottom = max_blank_paragraphs_per_page_bottom;
169 : enable_aggressively_split_sections(false)
170 , enable_adapt_to_largest_page(false) { }
189 this->enable_aggressively_split_sections = enable_aggressively_split_sections;
190 this->enable_adapt_to_largest_page = enable_adapt_to_largest_page;
224 void Set(
bool enable_aggressively_split_sections,
bool enable_adapt_to_largest_page) {
225 this->enable_aggressively_split_sections = enable_aggressively_split_sections;
226 this->enable_adapt_to_largest_page = enable_adapt_to_largest_page;
260 typedef enum _WorkbookSettings {
262 e_WorkbookSettingsDocument = 0,
264 e_WorkbookSettingsEachTable = 1,
266 e_WorkbookSettingsEachPage = 2
272 , thousands_separator(
"")
274 , enable_aggressive_table_repair(true)
275 , include_watermarks(false){ }
291 this->decimal_symbol = decimal_symbol;
292 this->thousands_separator = thousands_separator;
293 this->workbook_settings = workbook_settings;
294 this->enable_aggressive_table_repair = enable_aggressive_table_repair;
295 this->include_watermarks = include_watermarks;
330 this->decimal_symbol = decimal_symbol;
331 this->thousands_separator = thousands_separator;
332 this->workbook_settings = workbook_settings;
333 this->enable_aggressive_table_repair = enable_aggressive_table_repair;
334 this->include_watermarks = include_watermarks;
402 : enable_ml_recognition(false)
403 , include_pdf_comments(true)
404 , enable_trailing_space(true)
405 , include_images(true)
406 , enable_matching_system_fonts(false) { }
442 PDF2OfficeSettingData(
const wchar_t* metrics_data_folder_path,
bool enable_ml_recognition,
const Range& page_range,
bool include_pdf_comments,
444 const PDF2ExcelSettingData& excel_setting_data,
bool enable_trailing_space,
bool include_images,
bool enable_matching_system_fonts) {
445 this->metrics_data_folder_path = metrics_data_folder_path;
446 this->enable_ml_recognition = enable_ml_recognition;
447 this->page_range = page_range;
448 this->include_pdf_comments = include_pdf_comments;
449 this->word_setting_data = word_setting_data;
450 this->power_point_setting_data = power_point_setting_data;
451 this->excel_setting_data = excel_setting_data;
452 this->enable_trailing_space = enable_trailing_space;
453 this->include_images = include_images;
454 this->enable_matching_system_fonts = enable_matching_system_fonts;
514 void Set(
const wchar_t* metrics_data_folder_path,
bool enable_ml_recognition,
const Range &page_range,
bool include_pdf_comments,
516 const PDF2ExcelSettingData& excel_setting_data,
bool enable_trailing_space,
bool include_images,
bool enable_matching_system_fonts) {
517 this->metrics_data_folder_path = metrics_data_folder_path;
518 this->enable_ml_recognition = enable_ml_recognition;
519 this->page_range = page_range;
520 this->include_pdf_comments = include_pdf_comments;
521 this->word_setting_data = word_setting_data;
522 this->power_point_setting_data = power_point_setting_data;
523 this->excel_setting_data = excel_setting_data;
524 this->enable_trailing_space = enable_trailing_space;
525 this->include_images = include_images;
526 this->enable_matching_system_fonts = enable_matching_system_fonts;
638 virtual bool NeedToPause() = 0;
648 virtual void ProgressNotify(
int converted_count,
int total_count) = 0;
688 static Progressive StartConvertToWord(
const wchar_t* src_pdf_path,
const wchar_t* src_pdf_password,
const wchar_t* saved_word_file_path,
748 static Progressive StartConvertToExcel(
const wchar_t* src_pdf_path,
const wchar_t* src_pdf_password,
const wchar_t* saved_excel_file_path,
807 static Progressive StartConvertToPowerPoint(
const wchar_t* src_pdf_path,
const wchar_t* src_pdf_password,
const wchar_t* saved_ppt_file_path,
PDF2WordSettingData(bool enable_retain_page_layout, bool enable_generate_headers_and_footers, bool enable_generate_footnotes_and_endnotes, bool enable_generate_page_rendered_break, int max_blank_paragraphs_per_page_bottom)
带参数的构造函数。
Definition: fs_pdf2office.h:63
PDF2PowerPointSettingData()
构造函数。
Definition: fs_pdf2office.h:168
Definition: fs_common.h:269
Definition: fs_pdf2office.h:165
Definition: fs_pdf2office.h:398
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:145
Definition: fs_pdf2office.h:36
int max_blank_paragraphs_per_page_bottom
指定将PDF文件转换为Word文档时,每个页面底部可以放置的最大空白段落数。
Definition: fs_pdf2office.h:161
文件读取接口。
Definition: fx_stream.h:587
bool enable_trailing_space
一个布尔值,指示在将PDF文档转换为Office格式文档时 是否从段落中的行添加尾随空格。默认值:true。
Definition: fs_pdf2office.h:604
宽字符串类
Definition: fx_string.h:1457
PDF2WordSettingData word_setting_data
用于将PDF文档转换为Word格式文档的设置数据对象。
Definition: fs_pdf2office.h:577
bool enable_aggressively_split_sections
一个布尔值,指示在将PDF文档转换为PowerPoint格式文档时是否积极拆分节。默认值:false。
Definition: fs_pdf2office.h:237
bool enable_generate_headers_and_footers
一个布尔值,指示在将PDF文档转换为Word格式文档过程中,是否将PDF文档中识别出的页眉和页脚 转换为Word格式文档的页眉和页脚。默认值:true。
Definition: fs_pdf2office.h:131
PDF2ExcelSettingData(String decimal_symbol, String thousands_separator, WorkbookSettings workbook_settings, bool enable_aggressive_table_repair, bool include_watermarks)
带参数的构造函数。
Definition: fs_pdf2office.h:290
PDF2OfficeSettingData(const wchar_t *metrics_data_folder_path, bool enable_ml_recognition, const Range &page_range, bool include_pdf_comments, const PDF2WordSettingData &word_setting_data, const PDF2PowerPointSettingData &power_point_setting_data, const PDF2ExcelSettingData &excel_setting_data, bool enable_trailing_space, bool include_images, bool enable_matching_system_fonts)
带参数的构造函数。
Definition: fs_pdf2office.h:442
String thousands_separator
一个字符串值,指示在将PDF文档转换为Excel格式文档时被识别为千位分隔符。
Definition: fs_pdf2office.h:366
bool enable_generate_page_rendered_break
一个布尔值,指示在将PDF文档转换为Word格式文档过程中,是否在Word格式文档中 生成"lastRenderedPageBreak"标记。默认值:false。
Definition: fs_pdf2office.h:151
PDF2ExcelSettingData excel_setting_data
用于将PDF文档转换为Excel格式文档的设置数据对象。
Definition: fs_pdf2office.h:593
WString metrics_data_folder_path
包含度量数据文件的文件夹的有效路径。此参数不应为空字符串。
Definition: fs_pdf2office.h:537
void Set(bool enable_aggressively_split_sections, bool enable_adapt_to_largest_page)
设置值。
Definition: fs_pdf2office.h:224
文件流接口,用于读取和写入。
Definition: fx_stream.h:692
bool enable_adapt_to_largest_page
一个布尔值,指示在将PDF文档转换为PowerPoint格式过程中,是否将较小页面的内容适应为最大页面尺寸。默认值:false。
Definition: fs_pdf2office.h:249
PDF2PowerPointSettingData power_point_setting_data
用于将PDF文档转换为PowerPoint格式文档的设置数据对象。
Definition: fs_pdf2office.h:585
bool enable_aggressive_table_repair
一个布尔值,指示在将PDF文档转换为Excel格式文档时是否启用强化表格修复。默认值:true。
Definition: fs_pdf2office.h:384
Definition: fs_common.h:206
WorkbookSettings
Excel工作簿设置的枚举。
Definition: fs_pdf2office.h:260
void Set(const wchar_t *metrics_data_folder_path, bool enable_ml_recognition, const Range &page_range, bool include_pdf_comments, const PDF2WordSettingData &word_setting_data, const PDF2PowerPointSettingData &power_point_setting_data, const PDF2ExcelSettingData &excel_setting_data, bool enable_trailing_space, bool include_images, bool enable_matching_system_fonts)
设置值。
Definition: fs_pdf2office.h:514
PDF2WordSettingData()
构造函数。
Definition: fs_pdf2office.h:39
bool enable_retain_page_layout
一个布尔值,指示在将PDF文档转换为Word格式文档时是否保留页面布局。默认值:false。
Definition: fs_pdf2office.h:120
String decimal_symbol
一个字符串值,指示在将PDF文档转换为Excel格式文档时被识别为小数点。
Definition: fs_pdf2office.h:350
bool include_images
一个布尔值,指示在将PDF文档转换为Office格式文档时 是否包含PDF文档中的图像。默认值:true。
Definition: fs_pdf2office.h:614
Definition: fs_basictypes.h:232
Definition: fs_pdf2office.h:253
PDF2ExcelSettingData()
构造函数。
Definition: fs_pdf2office.h:270
Foxit 命名空间。
Definition: fs_basictypes.h:124
WorkbookSettings workbook_settings
一个枚举值,指示将PDF文档转换为Excel格式文档时工作簿的设置。
Definition: fs_pdf2office.h:374
Definition: fs_pdf2office.h:659
void Set(String decimal_symbol, String thousands_separator, WorkbookSettings workbook_settings, bool enable_aggressive_table_repair, bool include_watermarks)
设置值。
Definition: fs_pdf2office.h:329
bool include_watermarks
一个布尔值,指示在将PDF文档转换为Excel格式文档时是否包含水印。默认值:false。
Definition: fs_pdf2office.h:394
字节字符串类
Definition: fx_string.h:317
bool include_pdf_comments
一个布尔值,指示在将PDF文档转换为Office格式文档时 是否包含PDF文档注释。默认值:true。
Definition: fs_pdf2office.h:569
Definition: fs_pdf2office.h:631
bool enable_generate_footnotes_and_endnotes
一个布尔值,指示在将PDF文档转换为Word格式文档过程中,是否将PDF文档中识别出的脚注和尾注 转换为Word格式文档的脚注和尾注。默认值:false。
Definition: fs_pdf2office.h:140
void Set(bool enable_retain_page_layout, bool enable_generate_headers_and_footers, bool enable_generate_footnotes_and_endnotes, bool enable_generate_page_rendered_break, int max_blank_paragraphs_per_page_bottom)
设置值。
Definition: fs_pdf2office.h:106
#define NULL
空指针值。
Definition: fx_system.h:792
PDF2OfficeSettingData()
构造函数。
Definition: fs_pdf2office.h:401
bool enable_matching_system_fonts
一个布尔值,指示在将PDF文档转换为Office格式文档时 是否准确匹配系统字体。默认值:false。
Definition: fs_pdf2office.h:624
Range page_range
指定某些页面的范围对象。这些页面将用于将PDF文档转换为Office格式文档。
Definition: fs_pdf2office.h:560
bool enable_ml_recognition
一个布尔值,指示是否启用基于机器学习的识别功能。默认值:false。
Definition: fs_pdf2office.h:551
PDF2PowerPointSettingData(bool enable_aggressively_split_sections, bool enable_adapt_to_largest_page)
带参数的构造函数。
Definition: fs_pdf2office.h:188