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:
42  :enable_retain_page_layout(false) { }
43 
53  this->enable_retain_page_layout = enable_retain_page_layout;
54  }
55 
65  return (*this);
66  }
67 
78  this->enable_retain_page_layout = enable_retain_page_layout;
79  }
80 
89 };
90 
92 class PDF2OfficeSettingData FS_FINAL : public Object {
93  public:
96  : enable_ml_recognition(false)
97  , include_pdf_comments(true) {}
98 
121  this->metrics_data_folder_path = metrics_data_folder_path;
122  this->enable_ml_recognition = enable_ml_recognition;
123  this->page_range = page_range;
124  this->include_pdf_comments = include_pdf_comments;
125  this->word_setting_data = word_setting_data;
126  }
127 
138  page_range = data.page_range;
141 
142  return (*this);
143  }
144 
169  this->metrics_data_folder_path = metrics_data_folder_path;
170  this->enable_ml_recognition = enable_ml_recognition;
171  this->page_range = page_range;
172  this->include_pdf_comments = include_pdf_comments;
173  this->word_setting_data = word_setting_data;
174  }
175 
183 
197 
207 
216 
224 };
225 
231  public:
237  virtual bool NeedToPause() = 0;
238 
247  virtual void ProgressNotify(int converted_count, int total_count) = 0;
248 };
249 
258 class PDF2Office FS_FINAL : public Base {
259  public:
270  static void Initialize(const wchar_t* library_path);
271 
279  static void Release();
280 
304  static common::Progressive StartConvertToWord(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_word_file_path,
305  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
306 
331  static common::Progressive StartConvertToWord(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_word_file_stream,
332  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
333 
357  static common::Progressive StartConvertToExcel(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_excel_file_path,
358  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
359 
384  static common::Progressive StartConvertToExcel(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_excel_file_stream,
385  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
386 
410  static common::Progressive StartConvertToPowerPoint(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_ppt_file_path,
411  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
412 
437  static common::Progressive StartConvertToPowerPoint(common::file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, common::file::StreamCallback* saved_ppt_file_stream,
438  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
439 
440 };
441 
442 } // namespace pdf2office
443 } // namespace conversion
444 } // namespace addon
445 } // namespace foxit
446 
447 #endif //defined(WIN32)
448 #endif
bool enable_ml_recognition
A boolean value which indicates whether enable machine learning-based recognition functionality....
Definition: fs_pdf2office.h:196
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:182
Definition: fs_common.h:1189
CFX_Object Object
Object type.
Definition: fs_basictypes.h:217
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)
Set value.
Definition: fs_pdf2office.h:168
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:206
static void Initialize(const wchar_t *library_path)
Initialize Foxit PDF Conversion SDK Library.
File reading interface.
Definition: fx_stream.h:566
PDF2OfficeSettingData()
Constructor.
Definition: fs_pdf2office.h:95
WIDE STRING CLASS.
Definition: fx_string.h:1452
void Set(bool enable_retain_page_layout)
Set value.
Definition: fs_pdf2office.h:77
bool include_pdf_comments
A boolean value which indicates whether to include PDF documents comments in the converted office for...
Definition: fs_pdf2office.h:215
PDF2WordSettingData(bool enable_retain_page_layout)
Constructor, with parameters.
Definition: fs_pdf2office.h:52
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.
File stream interface, reading & writing.
Definition: fx_stream.h:669
PDF2WordSettingData word_setting_data
A setting data object that used for converting PDF documents to word format documents.
Definition: fs_pdf2office.h:223
PDF2WordSettingData & operator=(const PDF2WordSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:63
PDF2OfficeSettingData & operator=(const PDF2OfficeSettingData &data)
Assign operator.
Definition: fs_pdf2office.h:135
Definition: fs_common.h:342
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...
Definition: fs_basictypes.h:419
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...
Foxit namespace.
Definition: fs_taggedpdf.h:27
PDF2WordSettingData()
Constructor.
Definition: fs_pdf2office.h:41
#define NULL
The null-pointer value.
Definition: fx_system.h:780
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)
Constructor, with parameters.
Definition: fs_pdf2office.h:120
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:88
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...