14 #ifndef FS_OFFICE2PDF_H_
15 #define FS_OFFICE2PDF_H_
16 #if defined(_WIN32) || defined(_WIN64)
32 namespace conversion {
36 namespace office2pdf {
38 class Word2PDFConfig FS_FINAL :
public Object{
42 : is_generate_bookmark(false) {}
49 Word2PDFConfig(
bool is_generate_bookmark) {
50 this->is_generate_bookmark = is_generate_bookmark;
60 Word2PDFConfig & operator = (
const Word2PDFConfig & data) {
61 is_generate_bookmark = data.is_generate_bookmark;
71 void Set(
bool is_generate_bookmark) {
72 this->is_generate_bookmark = is_generate_bookmark;
81 bool is_generate_bookmark;
85 class Excel2PDFConfig FS_FINAL :
public Object{
89 : is_separate_workbook(false)
90 , is_output_hidden_worksheets(false) {}
99 Excel2PDFConfig(
bool is_separate_workbook,
bool is_output_hidden_worksheets,
foxit::WStringArray worksheet_names) {
100 this->is_separate_workbook = is_separate_workbook;
101 this->is_output_hidden_worksheets = is_output_hidden_worksheets;
102 this->worksheet_names = worksheet_names;
112 Excel2PDFConfig & operator = (
const Excel2PDFConfig & data) {
113 is_separate_workbook = data.is_separate_workbook;
114 is_output_hidden_worksheets = data.is_output_hidden_worksheets;
115 worksheet_names = data.worksheet_names;
128 void Set(
bool is_separate_workbook,
bool is_output_hidden_worksheets,
foxit::WStringArray worksheet_names) {
129 this->is_separate_workbook = is_separate_workbook;
130 this->is_output_hidden_worksheets = is_output_hidden_worksheets;
131 this->worksheet_names = worksheet_names;
139 bool is_separate_workbook;
146 bool is_output_hidden_worksheets;
157 class Office2PDFSettingData FS_FINAL :
public Object{
160 Office2PDFSettingData()
161 : is_embed_font(false){}
173 Office2PDFSettingData(
const wchar_t* resource_folder_path,
bool is_embed_font, Word2PDFConfig word_setting_data, Excel2PDFConfig excel_setting_data) {
174 this->resource_folder_path = resource_folder_path;
175 this->is_embed_font = is_embed_font;
176 this->word_setting_data = word_setting_data;
177 this->excel_setting_data = excel_setting_data;
187 Office2PDFSettingData &operator = (
const Office2PDFSettingData& data) {
188 resource_folder_path = data.resource_folder_path;
189 is_embed_font = data.is_embed_font;
190 word_setting_data = data.word_setting_data;
191 excel_setting_data = data.excel_setting_data;
207 void Set(
const wchar_t* resource_folder_path,
bool is_embed_font, Word2PDFConfig word_setting_data, Excel2PDFConfig excel_setting_data) {
208 this->resource_folder_path = resource_folder_path;
209 this->is_embed_font = is_embed_font;
210 this->word_setting_data = word_setting_data;
211 this->excel_setting_data = excel_setting_data;
236 Word2PDFConfig word_setting_data;
244 Excel2PDFConfig excel_setting_data;
257 class Office2PDF FS_FINAL :
public Base{
273 static void Initialize(
const wchar_t* library_path);
282 static void Release();
296 static bool ConvertFromWord(
const wchar_t* src_word_file_path,
const wchar_t* src_file_password,
const wchar_t* saved_pdf_path,
const Office2PDFSettingData& setting_data);
330 static bool ConvertFromExcel(
const wchar_t* src_excel_file_path,
const wchar_t* src_file_password,
const wchar_t* saved_pdf_path,
const Office2PDFSettingData& setting_data);
363 static bool ConvertFromPowerPoint(
const wchar_t* src_ppt_file_path,
const wchar_t* src_file_password,
const wchar_t* saved_pdf_path,
const Office2PDFSettingData& setting_data);
388 #endif //defined(_WIN32) || defined(_WIN64)