Foxit PDF Conversion SDK
fs_pdf2office.h
Go to the documentation of this file.
1 
15 #ifndef FS_CONVERT_H_
16 #define FS_CONVERT_H_
17 
18 #include "common/fs_common.h"
19 
25 namespace foxit {
26 using namespace common;
30 namespace conversion {
34 namespace pdf2office {
36 class PDF2WordSettingData FS_FINAL : public Object{
37  public:
40  :enable_retain_page_layout(false) { }
41 
50  PDF2WordSettingData(bool enable_retain_page_layout) {
51  this->enable_retain_page_layout = enable_retain_page_layout;
52  }
53 
61  PDF2WordSettingData & operator = (const PDF2WordSettingData & data) {
62  enable_retain_page_layout = data.enable_retain_page_layout;
63  return (*this);
64  }
65 
75  void Set(bool enable_retain_page_layout) {
76  this->enable_retain_page_layout = enable_retain_page_layout;
77  }
78 
87 };
88 
90 class PDF2OfficeSettingData FS_FINAL : public Object {
91  public:
94  : enable_ml_recognition(false)
95  , include_pdf_comments(true) {}
96 
116  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) {
117  this->metrics_data_folder_path = metrics_data_folder_path;
118  this->enable_ml_recognition = enable_ml_recognition;
119  this->page_range = page_range;
120  this->include_pdf_comments = include_pdf_comments;
121  this->word_setting_data = word_setting_data;
122  }
123 
131  PDF2OfficeSettingData &operator = (const PDF2OfficeSettingData& data) {
132  metrics_data_folder_path = data.metrics_data_folder_path;
133  enable_ml_recognition = data.enable_ml_recognition;
134  page_range = data.page_range;
135  include_pdf_comments = data.include_pdf_comments;
136  word_setting_data = data.word_setting_data;
137 
138  return (*this);
139  }
140 
162  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) {
163  this->metrics_data_folder_path = metrics_data_folder_path;
164  this->enable_ml_recognition = enable_ml_recognition;
165  this->page_range = page_range;
166  this->include_pdf_comments = include_pdf_comments;
167  this->word_setting_data = word_setting_data;
168  }
169 
177 
191 
201 
210 
218 };
219 
225  public:
231  virtual bool NeedToPause() = 0;
232 
241  virtual void ProgressNotify(int converted_count, int total_count) = 0;
242 };
243 
252 class PDF2Office FS_FINAL : public Base {
253  public:
281  static Progressive StartConvertToWord(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_word_file_path,
282  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
283 
312  static Progressive StartConvertToWord(file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, file::StreamCallback* saved_word_file_stream,
313  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
314 
341  static Progressive StartConvertToExcel(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_excel_file_path,
342  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
343 
371  static Progressive StartConvertToExcel(file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, file::StreamCallback* saved_excel_file_stream,
372  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
373 
400  static Progressive StartConvertToPowerPoint(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_ppt_file_path,
401  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
402 
430  static Progressive StartConvertToPowerPoint(file::ReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, file::StreamCallback* saved_ppt_file_stream,
431  const PDF2OfficeSettingData& setting_data, ConvertCallback* convert_callback = NULL);
432 };
433 } // namespace pdf2office
434 } // namespace conversion
435 } // namespace foxit
436 
437 #endif
Definition: fs_common.h:178
CFX_Object Object
Object type.
Definition: fs_basictypes.h:79
void Set(bool enable_retain_page_layout)
Set value.
Definition: fs_pdf2office.h:75
File reading interface.
Definition: fx_stream.h:566
WIDE STRING CLASS.
Definition: fx_string.h:1452
PDF2WordSettingData word_setting_data
A setting data object that used for converting PDF documents to word format documents.
Definition: fs_pdf2office.h:217
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:176
File stream interface, reading & writing.
Definition: fx_stream.h:669
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)
Set value.
Definition: fs_pdf2office.h:162
PDF2WordSettingData(bool enable_retain_page_layout)
Constructor, with parameters.
Definition: fs_pdf2office.h:50
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)
Constructor, with parameters.
Definition: fs_pdf2office.h:116
Definition: fs_common.h:115
Header file for common definitions and classes.
PDF2WordSettingData()
Constructor.
Definition: fs_pdf2office.h:39
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:86
Definition: fs_basictypes.h:159
Foxit namespace.
Definition: fs_basictypes.h:58
Definition: fs_pdf2office.h:252
bool include_pdf_comments
A boolean value which indicates whether to include PDF documents comments in the converted office for...
Definition: fs_pdf2office.h:209
Definition: fs_pdf2office.h:224
#define NULL
The null-pointer value.
Definition: fx_system.h:780
PDF2OfficeSettingData()
Constructor.
Definition: fs_pdf2office.h:93
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:200
bool enable_ml_recognition
A boolean value which indicates whether enable machine learning-based recognition functionality,...
Definition: fs_pdf2office.h:190