Foxit PDF SDK
fs_pdf2office.h
Go to the documentation of this file.
1 
14 #ifndef FS_PDF2OFFICE_H_
15 #define FS_PDF2OFFICE_H_
16 #if defined(_WIN32) || defined(_WIN64) || (defined(__linux__) && !defined(__ANDROID__))
17 #include "common/fs_common.h"
18 
24 namespace foxit {
28 namespace addon {
32 namespace conversion {
36 namespace pdf2office {
38 class PDF2WordSettingData FS_FINAL : public Object{
39  public:
45 
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  }
68 
80  return (*this);
81  }
82 
102  this->enable_retain_page_layout = enable_retain_page_layout;
103  this->enable_generate_headers_and_footers = enable_generate_headers_and_footers;
104  this->enable_generate_footnotes_and_endnotes = enable_generate_footnotes_and_endnotes;
105  }
106 
114 
123 
132 };
133 
135 class PDF2PowerPointSettingData FS_FINAL : public Object{
136  public:
140 
151  this->enable_aggressively_split_sections = enable_aggressively_split_sections;
152  }
153 
163  return (*this);
164  }
165 
178  this->enable_aggressively_split_sections = enable_aggressively_split_sections;
179  }
180 
190 };
191 
193 class PDF2ExcelSettingData FS_FINAL : public Object{
194  public:
197  : decimal_symbol("")
198  , thousands_separator("") { }
199 
207  this->decimal_symbol = decimal_symbol;
208  this->thousands_separator = thousands_separator;
209  }
210 
219  this->decimal_symbol = data.decimal_symbol;
221  return (*this);
222  }
223 
233  this->decimal_symbol = decimal_symbol;
234  this->thousands_separator = thousands_separator;
235  }
236 
251 
267 
268 };
269 
271 class PDF2OfficeSettingData FS_FINAL : public Object {
272  public:
275  : enable_ml_recognition(false)
276  , include_pdf_comments(true) {}
277 
304  this->metrics_data_folder_path = metrics_data_folder_path;
305  this->enable_ml_recognition = enable_ml_recognition;
306  this->page_range = page_range;
307  this->include_pdf_comments = include_pdf_comments;
308  this->word_setting_data = word_setting_data;
309  this->power_point_setting_data = power_point_setting_data;
310  }
311 
322  page_range = data.page_range;
326 
327  return (*this);
328  }
329 
358  this->metrics_data_folder_path = metrics_data_folder_path;
359  this->enable_ml_recognition = enable_ml_recognition;
360  this->page_range = page_range;
361  this->include_pdf_comments = include_pdf_comments;
362  this->word_setting_data = word_setting_data;
363  this->power_point_setting_data = power_point_setting_data;
364  }
365 
373 
387 
396 
405 
413 
421 
429 };
430 
436  public:
442  virtual bool NeedToPause() = 0;
443 
452  virtual void ProgressNotify(int converted_count, int total_count) = 0;
453 };
454 
463 class PDF2Office FS_FINAL : public Base {
464  public:
475  static void Initialize(const wchar_t* library_path);
476 
484  static void Release();
485 
509  static common::Progressive StartConvertToWord(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_word_file_path,
510  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
511 
536  static common::Progressive StartConvertToWord(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_word_file_stream,
537  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
538 
562  static common::Progressive StartConvertToExcel(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_excel_file_path,
563  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
564 
589  static common::Progressive StartConvertToExcel(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_excel_file_stream,
590  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
591 
615  static common::Progressive StartConvertToPowerPoint(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_ppt_file_path,
616  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
617 
642  static common::Progressive StartConvertToPowerPoint(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_ppt_file_stream,
643  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
644 
645 };
646 
647 } // namespace pdf2office
648 } // namespace conversion
649 } // namespace addon
650 } // namespace foxit
651 
652 #endif //defined(WIN32)
653 #endif
bool enable_ml_recognition
A boolean value which indicates whether enable machine learning-based recognition functionality....
Definition: fs_pdf2office.h:386
WString metrics_data_folder_path
A valid path of a folder which contains metrics data files. This should not be an empty string.
Definition: fs_pdf2office.h:372
Definition: fs_common.h:1236
CFX_Object Object
Object type.
Definition: fs_basictypes.h:221
String thousands_separator
A string value which indicates being recognized as thousands separator during the conversion of PDF d...
Definition: fs_pdf2office.h:266
PDF2PowerPointSettingData & operator=(const PDF2PowerPointSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:161
common::Range page_range
A range object that specifies some pages. These pages will be used to convert PDF documents to office...
Definition: fs_pdf2office.h:395
static void Initialize(const wchar_t *library_path)
Initialize Foxit PDF Conversion SDK Library.
PDF2OfficeSettingData(const wchar_t *metrics_data_folder_path, bool enable_ml_recognition, const common::Range &page_range, bool include_pdf_comments, const PDF2WordSettingData &word_setting_data, const PDF2PowerPointSettingData &power_point_setting_data, const PDF2ExcelSettingData &excel_setting_data)
Constructor, with parameters.
Definition: fs_pdf2office.h:301
PDF2ExcelSettingData(String decimal_symbol, String thousands_separator)
Constructor, with parameters.
Definition: fs_pdf2office.h:206
File reading interface.
Definition: fx_stream.h:570
PDF2OfficeSettingData()
Constructor.
Definition: fs_pdf2office.h:274
WIDE STRING CLASS.
Definition: fx_string.h:1452
bool enable_generate_footnotes_and_endnotes
A boolean value which indicates whether convert the recognized footnotes and endnotes from PDF docume...
Definition: fs_pdf2office.h:131
void Set(bool enable_aggressively_split_sections)
Set value.
Definition: fs_pdf2office.h:177
bool include_pdf_comments
A boolean value which indicates whether to include PDF documents comments for the conversion of PDF d...
Definition: fs_pdf2office.h:404
PDF2PowerPointSettingData(bool enable_aggressively_split_sections)
Constructor, with parameters.
Definition: fs_pdf2office.h:150
virtual bool NeedToPause()=0
A callback function used to pause the current conversion progress.
virtual void ProgressNotify(int converted_count, int total_count)=0
A callback function used to notify the current conversion progress.
void Set(String decimal_symbol, String thousands_separator)
Set value.
Definition: fs_pdf2office.h:232
File stream interface, reading & writing.
Definition: fx_stream.h:675
PDF2WordSettingData word_setting_data
A setting data object that used for converting PDF documents to Word format documents.
Definition: fs_pdf2office.h:412
PDF2ExcelSettingData excel_setting_data
A setting data object that used for converting PDF documents to Excel format documents.
Definition: fs_pdf2office.h:428
PDF2WordSettingData & operator=(const PDF2WordSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:76
PDF2OfficeSettingData & operator=(const PDF2OfficeSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:319
Definition: fs_common.h:346
PDF2ExcelSettingData()
Constructor.
Definition: fs_pdf2office.h:196
Header file for common definitions and classes.
static void Release()
Release all resource allocated by Foxit PDF Conversion SDK Library.
static common::Progressive StartConvertToExcel(const wchar_t *src_pdf_path, const wchar_t *src_pdf_password, const wchar_t *saved_excel_file_path, const PDF2OfficeSettingData &setting_data, ConvertCallback *convert_callback=0)
Start to convert a PDF file to a Excel format file. Function PDF2Office::Initialize must be called be...
PDF2PowerPointSettingData power_point_setting_data
A setting data object that used for converting PDF documents to Power Point format documents.
Definition: fs_pdf2office.h:420
void Set(const wchar_t *metrics_data_folder_path, bool enable_ml_recognition, const common::Range &page_range, bool include_pdf_comments, const PDF2WordSettingData &word_setting_data, const PDF2PowerPointSettingData &power_point_setting_data, const PDF2ExcelSettingData &excel_setting_data)
Set value.
Definition: fs_pdf2office.h:355
Definition: fs_basictypes.h:427
static common::Progressive StartConvertToWord(const wchar_t *src_pdf_path, const wchar_t *src_pdf_password, const wchar_t *saved_word_file_path, const PDF2OfficeSettingData &setting_data, ConvertCallback *convert_callback=0)
Start to convert a PDF file to a Word format file. Function PDF2Office::Initialize must be called bef...
PDF2PowerPointSettingData()
Constructor.
Definition: fs_pdf2office.h:138
bool enable_aggressively_split_sections
A boolean value which indicates whether split sections aggressively for the conversion of PDF documen...
Definition: fs_pdf2office.h:189
Foxit namespace.
Definition: fs_taggedpdf.h:27
void Set(bool enable_retain_page_layout, bool enable_generate_headers_and_footers, bool enable_generate_footnotes_and_endnotes)
Set value.
Definition: fs_pdf2office.h:101
PDF2WordSettingData()
Constructor.
Definition: fs_pdf2office.h:41
PDF2WordSettingData(bool enable_retain_page_layout, bool enable_generate_headers_and_footers, bool enable_generate_footnotes_and_endnotes)
Constructor, with parameters.
Definition: fs_pdf2office.h:63
BYTE STRING CLASS.
Definition: fx_string.h:317
#define NULL
The null-pointer value.
Definition: fx_system.h:780
bool enable_generate_headers_and_footers
A boolean value which indicates whether convert the recognized headers and footers from PDF documents...
Definition: fs_pdf2office.h:122
String decimal_symbol
A string value which indicates being recognized as decimal during the conversion of PDF documents to ...
Definition: fs_pdf2office.h:250
bool enable_retain_page_layout
A boolean value which indicates whether retain page layout for the conversion of PDF documents to Wor...
Definition: fs_pdf2office.h:113
PDF2ExcelSettingData & operator=(const PDF2ExcelSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:218
static common::Progressive StartConvertToPowerPoint(const wchar_t *src_pdf_path, const wchar_t *src_pdf_password, const wchar_t *saved_ppt_file_path, const PDF2OfficeSettingData &setting_data, ConvertCallback *convert_callback=0)
Start to convert a PDF file to a PowerPoint format file. Function PDF2Office::Initialize must be call...