Foxit PDF SDK

fs_convert.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 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/fs_pdfpage.h"
21
27 namespace foxit {
31 namespace addon {
35 namespace conversion {
37 class HTML2PDFSettingData FS_FINAL : public Object{
38 public:
44 typedef enum _HTML2PDFPageMode {
46 e_PageModeSinglePage = 0,
48 e_PageModeMultiplePage = 1
49 } HTML2PDFPageMode;
50
56 typedef enum _HTML2PDFScalingMode {
58 e_ScalingModeNone = 0,
60 e_ScalingModeScale = 1,
62 e_ScalingModeEnlarge = 2
63 } HTML2PDFScalingMode;
64
70 typedef enum _HTML2PDFEncodingFormat {
72 e_EncodingFormatDefault = 0,
74 e_EncodingFormatASCII = 1,
76 e_EncodingFormatLatin2 = 2,
78 e_EncodingFormatLatin3 = 3,
80 e_EncodingFormatLatin4 = 4,
82 e_EncodingFormatLatin5 = 5,
84 e_EncodingFormatLatin6 = 6,
86 e_EncodingFormatISO_8859_5 = 7,
88 e_EncodingFormatArabic = 8,
90 e_EncodingFormatGreek = 9,
92 e_EncodingFormatHebrew = 10,
94 e_EncodingFormatEUC_JP = 11,
96 e_EncodingFormatSJS = 12,
98 e_EncodingFormatJIS = 13,
100 e_EncodingFormatBIG5 = 14,
102 e_EncodingFormatGB = 15,
104 e_EncodingFormatEUC_CN = 16,
106 e_EncodingFormatKSC = 17,
108 e_EncodingFormatUnicode = 18,
110 e_EncodingFormatEUC = 19,
112 e_EncodingFormatCNS = 20,
114 e_EncodingFormatBIG5_CP950 = 21,
116 e_EncodingFormatASCII_7_bit = 22,
118 e_EncodingFormatKOI8R = 23,
120 e_EncodingFormatCP852 = 24,
122 e_EncodingFormatCP866 = 25,
124 e_EncodingFormatCP874 = 26,
126 e_EncodingFormatCP932 = 27,
128 e_EncodingFormatCP1250 = 28,
130 e_EncodingFormatCP1251 = 29,
132 e_EncodingFormatCP1252 = 30,
134 e_EncodingFormatCP1253 = 31,
136 e_EncodingFormatCP1254 = 32,
138 e_EncodingFormatCP1255 = 33,
140 e_EncodingFormatCP1256 = 34,
142 e_EncodingFormatCP1257 = 35,
144 e_EncodingFormatKOI8U = 36,
146 e_EncodingFormatISO_8859_15 = 37,
148 e_EncodingFormatISO_8859_11 = 38,
150 e_EncodingFormatISO_8859_8_I = 39,
152 e_EncodingFormatVISUAL = 40,
154 e_EncodingFormatCSN_369103 = 41,
156 e_EncodingFormatISO_8859_13 = 42,
158 e_EncodingFormatISO_2022_KR = 43,
160 e_EncodingFormatGBK = 44,
162 e_EncodingFormatGB18030 = 45,
164 e_EncodingFormatBIG5_HKSCS = 46,
166 e_EncodingFormatISO_2022_CN = 47,
168 e_EncodingFormatTSCII = 48,
170 e_EncodingFormatTAM = 49,
172 e_EncodingFormatTAB = 50,
174 e_EncodingFormatJAGRAN = 51,
176 e_EncodingFormatMACINTOSH = 52,
178 e_EncodingFormatUTF7 = 53,
180 e_EncodingFormatBHASKAR = 54,
182 e_EncodingFormatHTCHANAKYA = 55,
184 e_EncodingFormatUTF_16BE = 56,
186 e_EncodingFormatUTF_16LE = 57,
188 e_EncodingFormatUTF_32BE = 58,
190 e_EncodingFormatUTF_32LE = 59,
192 e_EncodingFormatX_BINARYENC = 60,
194 e_EncodingFormatHZ_GB_2312 = 61,
196 e_EncodingFormatX_UTF8UTF8 = 62,
198 e_EncodingFormatX_TAM_ELANGO = 63,
200 e_EncodingFormatX_TAM_LTTMBARANI = 64,
202 e_EncodingFormatX_TAM_SHREE = 65,
204 e_EncodingFormatX_TAM_TBOOMIS = 66,
206 e_EncodingFormatX_TAM_TMNEWS = 67,
208 e_EncodingFormatX_TAM_WEBTAMIL = 68,
210 e_EncodingFormatX_KDDI_Shift_JIS = 69,
212 e_EncodingFormatX_DoCoMo_Shift_JIS = 70,
214 e_EncodingFormatX_SoftBank_Shift_JIS = 71,
216 e_EncodingFormatX_KDDI_ISO_2022_JP = 72,
218 e_EncodingFormatX_SoftBank_ISO_2022_JP = 73
219 } HTML2PDFEncodingFormat;
220
226 typedef enum _HTML2PDFMediaStyle {
228 e_MediaStyleScreen = 0,
230 e_MediaStylePrint = 1
231 } HTML2PDFMediaStyle;
232
233
235 HTML2PDFSettingData()
236 : page_width(0)
237 , page_height(0)
238 , is_to_page_scale(false)
239 , page_margin(0.0f, 0.0f, 0.0f, 0.0f)
240 , rotate_degrees(common::e_Rotation0)
241 , is_convert_link(false)
242 , is_generate_tag(false)
243 , page_mode(e_PageModeSinglePage)
244 , to_generate_bookmarks(false)
245 , scaling_mode(e_ScalingModeScale)
246 , encoding_format(e_EncodingFormatDefault)
247 , to_render_images(true)
248 , to_remove_underline_for_link(false)
249 , to_set_headerfooter(false)
250 , headerfooter_title(L"")
251 , headerfooter_url(L"")
252 , bookmark_root_name(L"")
253 , to_resize_objects(false)
254 , to_print_background(true)
255 , to_optimize_tag_tree(false)
256 , media_style(e_MediaStyleScreen)
257 , to_load_active_content(false)
258 , to_disable_sandbox(true)
259 , to_use_blacklist(false)
260 , to_hide_header(false)
261 , to_hide_footer(false)
262 , to_deny_local_file_access(false) {}
263
303 HTML2PDFSettingData(float page_width, float page_height, bool is_to_page_scale, RectF page_margin,
304 bool is_convert_link, common::Rotation rotate_degrees, bool is_generate_tag, HTML2PDFPageMode page_mode, bool to_generate_bookmarks, HTML2PDFScalingMode scaling_mode,
305 HTML2PDFEncodingFormat encoding_format, bool to_render_images, bool to_remove_underline_for_link, bool to_set_headerfooter, const wchar_t* headerfooter_title,
306 const wchar_t* headerfooter_url, const wchar_t* bookmark_root_name, bool to_resize_objects, bool to_print_background, bool to_optimize_tag_tree,
307 HTML2PDFMediaStyle media_style, bool to_load_active_content, bool to_disable_sandbox, bool to_use_blacklist,
308 bool to_hide_header, bool to_hide_footer, bool to_deny_local_file_access) {
309 this->page_width = page_width;
310 this->page_height = page_height;
311 this->is_to_page_scale = is_to_page_scale;
312 this->page_margin = page_margin;
313 this->is_convert_link = is_convert_link;
314 this->rotate_degrees = rotate_degrees;
315 this->is_generate_tag = is_generate_tag;
316 this->page_mode = page_mode;
317 this->to_generate_bookmarks = to_generate_bookmarks;
318 this->scaling_mode = scaling_mode;
319 this->encoding_format = encoding_format;
320 this->to_render_images = to_render_images;
321 this->to_remove_underline_for_link = to_remove_underline_for_link;
322 this->to_set_headerfooter = to_set_headerfooter;
323 this->headerfooter_title = headerfooter_title;
324 this->headerfooter_url = headerfooter_url;
325 this->bookmark_root_name = bookmark_root_name;
326 this->to_resize_objects = to_resize_objects;
327 this->to_print_background = to_print_background;
328 this->to_optimize_tag_tree = to_optimize_tag_tree;
329 this->media_style = media_style;
330 this->to_load_active_content = to_load_active_content;
331 this->to_disable_sandbox = to_disable_sandbox;
332 this->to_use_blacklist = to_use_blacklist;
333 this->to_hide_header = to_hide_header;
334 this->to_hide_footer = to_hide_footer;
335 this->to_deny_local_file_access = to_deny_local_file_access;
336 }
337
345 HTML2PDFSettingData &operator = (const HTML2PDFSettingData& data) {
346 page_width = data.page_width;
347 page_height = data.page_height;
348 is_to_page_scale = data.is_to_page_scale;
349 page_margin = data.page_margin;
350 is_convert_link = data.is_convert_link;
351 rotate_degrees = data.rotate_degrees;
352 is_generate_tag = data.is_generate_tag;
353 page_mode = data.page_mode;
354 to_generate_bookmarks = data.to_generate_bookmarks;
355 scaling_mode = data.scaling_mode;
356 encoding_format = data.encoding_format;
357 to_render_images = data.to_render_images;
358 to_remove_underline_for_link = data.to_remove_underline_for_link;
359 to_set_headerfooter = data.to_set_headerfooter;
360 headerfooter_title = data.headerfooter_title;
361 headerfooter_url = data.headerfooter_url;
362 bookmark_root_name = data.bookmark_root_name;
363 to_resize_objects = data.to_resize_objects;
364 to_print_background = data.to_print_background;
365 to_optimize_tag_tree = data.to_optimize_tag_tree;
366 media_style = data.media_style;
367 to_load_active_content = data.to_load_active_content;
368 to_disable_sandbox = data.to_disable_sandbox;
369 to_use_blacklist = data.to_use_blacklist;
370 to_hide_header = data.to_hide_header;
371 to_hide_footer = data.to_hide_footer;
372 to_deny_local_file_access = data.to_deny_local_file_access;
373 return (*this);
374 }
375
415 void Set(float page_width, float page_height, bool is_to_page_scale, RectF page_margin,
416 bool is_convert_link, common::Rotation rotate_degrees, bool is_generate_tag, HTML2PDFPageMode page_mode, bool to_generate_bookmarks, HTML2PDFScalingMode scaling_mode,
417 HTML2PDFEncodingFormat encoding_format, bool to_render_images, bool to_remove_underline_for_link, bool to_set_headerfooter,
418 const wchar_t* headerfooter_title, const wchar_t* headerfooter_url, const wchar_t* bookmark_root_name, bool to_resize_objects, bool to_print_background, bool to_optimize_tag_tree,
419 HTML2PDFMediaStyle media_style, bool to_load_active_content, bool to_disable_sandbox, bool to_use_blacklist,
420 bool to_hide_header, bool to_hide_footer, bool to_deny_local_file_access) {
421 this->page_width = page_width;
422 this->page_height = page_height;
423 this->is_to_page_scale = is_to_page_scale;
424 this->page_margin = page_margin;
425 this->is_convert_link = is_convert_link;
426 this->rotate_degrees = rotate_degrees;
427 this->is_generate_tag = is_generate_tag;
428 this->page_mode = page_mode;
429 this->to_generate_bookmarks = to_generate_bookmarks;
430 this->scaling_mode = scaling_mode;
431 this->encoding_format = encoding_format;
432 this->to_render_images = to_render_images;
433 this->to_remove_underline_for_link = to_remove_underline_for_link;
434 this->to_set_headerfooter = to_set_headerfooter;
435 this->headerfooter_title = headerfooter_title;
436 this->headerfooter_url = headerfooter_url;
437 this->bookmark_root_name = bookmark_root_name;
438 this->to_resize_objects = to_resize_objects;
439 this->to_print_background = to_print_background;
440 this->to_optimize_tag_tree = to_optimize_tag_tree;
441 this->media_style = media_style;
442 this->to_load_active_content = to_load_active_content;
443 this->to_disable_sandbox = to_disable_sandbox;
444 this->to_use_blacklist = to_use_blacklist;
445 this->to_hide_header = to_hide_header;
446 this->to_hide_footer = to_hide_footer;
447 this->to_deny_local_file_access = to_deny_local_file_access;
448 }
449
455 float page_width;
456
464 float page_height;
465
472 bool is_to_page_scale;
473
480 RectF page_margin;
481
486 common::Rotation rotate_degrees;
487
489 bool is_convert_link;
490
492 bool is_generate_tag;
493
498 HTML2PDFPageMode page_mode;
499
501 bool to_generate_bookmarks;
502
507 HTML2PDFScalingMode scaling_mode;
508
512 HTML2PDFEncodingFormat encoding_format;
513
515 bool to_render_images;
516
518 bool to_remove_underline_for_link;
519
521 bool to_set_headerfooter;
522
524 foxit::WString headerfooter_title;
525
527 foxit::WString headerfooter_url;
528
530 foxit::WString bookmark_root_name;
531
533 bool to_resize_objects;
534
536 bool to_print_background;
537
539 bool to_optimize_tag_tree;
540
545 HTML2PDFMediaStyle media_style;
546
554 bool to_load_active_content;
555
561 bool to_disable_sandbox;
562
589 bool to_use_blacklist;
590
592 bool to_hide_header;
593
595 bool to_hide_footer;
596
604 bool to_deny_local_file_access;
605 };
606
608 class TXT2PDFSettingData FS_FINAL : public Object {
609 public:
611 TXT2PDFSettingData()
612 : page_width(0)
613 , page_height(0)
614 , text_size(0)
615 , text_color(0xFF000000)
616 , linespace(0)
617 , is_break_page(false) {
618 }
619
634 TXT2PDFSettingData(float page_width, float page_height, RectF page_margin, const common::Font& font, float text_size,
635 ARGB text_color, float linespace, bool is_break_page) {
636 this->page_width = page_width;
637 this->page_height = page_height;
638 this->page_margin = page_margin;
639 this->font = font;
640 this->text_size = text_size;
641 this->text_color = text_color;
642 this->linespace = linespace;
643 this->is_break_page = is_break_page;
644 }
645
653 TXT2PDFSettingData& operator=(const TXT2PDFSettingData& data) {
654 page_width = data.page_width;
655 page_height = data.page_height;
656 page_margin = data.page_margin;
657 font = data.font;
658 text_size = data.text_size;
659 text_color = data.text_color;
660 linespace = data.linespace;
661 is_break_page = data.is_break_page;
662 return (*this);
663 }
664
679 void Set(float page_width, float page_height, RectF page_margin, const common::Font& font, float text_size,
680 ARGB text_color, float linespace, bool is_break_page) {
681 this->page_width = page_width;
682 this->page_height = page_height;
683 this->page_margin = page_margin;
684 this->font = font;
685 this->text_size = text_size;
686 this->text_color = text_color;
687 this->linespace = linespace;
688 this->is_break_page = is_break_page;
689 }
690
692 float page_width;
693
695 float page_height;
696
703 RectF page_margin;
704
706 common::Font font;
707
709 float text_size;
710
712 ARGB text_color;
713
715 float linespace;
716
718 bool is_break_page;
719 };
720
726 class DWG2PDFProgressCallback {
727 public:
733 virtual void Release() = 0;
742 virtual void OnProgress(const wchar_t* message, float progress) = 0;
743 };
744
751 class DWG2PDFSettingData FS_FINAL : public Object {
752 public:
758 typedef enum _DWG2PDFExportFlags {
762 e_FlagEmbededTTF = 0x0001,
766 e_FlagTTFTextAsGeometry = 0x0002,
770 e_FlagSHXTextAsGeometry = 0x0004,
774 e_FlagSimpleGeomOptimization = 0x0008,
776 e_FlagEnableLayers = 0x0010,
778 e_FlagIncludeOffLayers = 0x0020,
782 e_FlagEmbededOptimizedTTF = 0x0040,
786 e_FlagUseHLR = 0x0080,
788 e_FlagFlateCompression = 0x0100,
790 e_FlagASCIIHexEncoding = 0x0200,
792 e_FlagExportHyperlinks = 0x0400,
798 e_FlagZoomToExtentsMode = 0x0800,
800 e_FlagLinearized = 0x1000,
802 e_FlagMeasuring = 0x4000
803 } DWG2PDFExportFlags;
804
810 typedef enum _DWG2PDFExportHatchesType {
812 e_DWG2PDFExportHatchesTypeBitmap = 0,
814 e_DWG2PDFExportHatchesTypeDrawing = 1,
816 e_DWG2PDFExportHatchesTypePdfPaths = 2,
818 e_DWG2PDFExportHatchesTypePolygons = 3
819 } DWG2PDFExportHatchesType;
820
826 typedef enum _DWG2PDFSearchableTextType {
828 e_DWG2PDFSearchableTextTypeNoSearch = 0,
830 e_DWG2PDFSearchableTextTypeSHX = 1,
832 e_DWG2PDFSearchableTextTypeTTF = 2
833 } DWG2PDFSearchableTextType;
834
840 typedef enum _DWG2PDFColorPolicy {
842 e_DWG2PDFColorPolicyNoPolicy = 0,
844 e_DWG2PDFColorPolicyMono = 1,
846 e_DWG2PDFColorPolicyGrayscale = 2
847 } DWG2PDFColorPolicy;
848
849
853 DWG2PDFSettingData()
854 : export_flags(1)
855 , export_hatches_type(e_DWG2PDFExportHatchesTypeBitmap)
856 , other_export_hatches_type(e_DWG2PDFExportHatchesTypeBitmap)
857 , gradient_export_hatches_type(e_DWG2PDFExportHatchesTypeBitmap)
858 , searchable_text_type(e_DWG2PDFSearchableTextTypeNoSearch)
859 , is_active_layout(false)
860 , paper_width(0.0f)
861 , paper_height(0.0f)
862 , color_policy(e_DWG2PDFColorPolicyNoPolicy)
863 , is_output_progress(true)
864 , progress_callback(NULL){}
865
873 DWG2PDFSettingData& operator=(const DWG2PDFSettingData& data) {
874 export_flags = data.export_flags;
875 export_hatches_type = data.export_hatches_type;
876 other_export_hatches_type = data.other_export_hatches_type;
877 gradient_export_hatches_type = data.gradient_export_hatches_type;
878 searchable_text_type = data.searchable_text_type;
879 is_active_layout = data.is_active_layout;
880 output_title = data.output_title;
881 output_author = data.output_author;
882 output_subject = data.output_subject;
883 output_keywords = data.output_keywords;
884 output_creator = data.output_creator;
885 output_producer = data.output_producer;
886 paper_width = data.paper_width;
887 paper_height = data.paper_height;
888 color_policy = data.color_policy;
889 is_output_progress = data.is_output_progress;
890 progress_callback = data.progress_callback;
891 return (*this);
892 }
893
899 uint32 export_flags;
900
908 DWG2PDFExportHatchesType export_hatches_type;
909
919 DWG2PDFExportHatchesType other_export_hatches_type;
920
930 DWG2PDFExportHatchesType gradient_export_hatches_type;
931
941 DWG2PDFSearchableTextType searchable_text_type;
942
946 bool is_active_layout;
947
951 foxit::WString output_title;
952
956 foxit::WString output_author;
957
961 foxit::WString output_subject;
962
966 foxit::WString output_keywords;
967
971 foxit::WString output_creator;
972
976 foxit::WString output_producer;
977
985 float paper_width;
986
994 float paper_height;
995
1003 DWG2PDFColorPolicy color_policy;
1004
1010 bool is_output_progress;
1011
1016 void* progress_callback;
1017 };
1018
1019 #if defined(_WIN32) || defined(_WIN64) || defined(__linux__)
1020
1022 class Word2PDFSettingData FS_FINAL : public Object{
1023 public:
1030 typedef enum _ConvertOptimizeOption {
1032 e_ConvertOptimizeOptionForPrint = 0,
1034 e_ConvertOptimizeOptionForOnScreen = 1
1035 } ConvertOptimizeOption;
1036
1043 typedef enum _ConvertContentOption {
1045 e_ConvertContentOptionOnlyContent = 0,
1047 e_ConvertContentOptionWithMarkup = 1
1048 } ConvertContentOption;
1049
1055 typedef enum _ConvertBookmarkOption {
1057 e_ConvertBookmarkOptionNone = 0,
1063 e_ConvertBookmarkOptionUseHeadings = 1,
1068 e_ConvertBookmarkOptionUseWordBookmark = 2
1069 } ConvertBookmarkOption;
1070
1071
1073 Word2PDFSettingData()
1074 : include_doc_props(false)
1075 , optimize_option(Word2PDFSettingData::e_ConvertOptimizeOptionForPrint)
1076 , content_option(Word2PDFSettingData::e_ConvertContentOptionOnlyContent)
1077 , bookmark_option(Word2PDFSettingData::e_ConvertBookmarkOptionNone)
1078 , convert_to_pdfa(false)
1079 , disable_vba_code(false)
1080 {}
1081
1106 Word2PDFSettingData(bool include_doc_props, ConvertOptimizeOption optimize_option,
1107 ConvertContentOption content_option, ConvertBookmarkOption bookmark_option,
1108 bool convert_to_pdfa, bool disable_vba_code) {
1109 this->include_doc_props = include_doc_props;
1110 this->optimize_option = optimize_option;
1111 this->content_option = content_option;
1112 this->bookmark_option = bookmark_option;
1113 this->convert_to_pdfa = convert_to_pdfa;
1114 this->disable_vba_code = disable_vba_code;
1115 }
1116
1124 Word2PDFSettingData &operator = (const Word2PDFSettingData& data) {
1125 include_doc_props = data.include_doc_props;
1126 optimize_option = data.optimize_option;
1127 content_option = data.content_option;
1128 bookmark_option = data.bookmark_option;
1129 convert_to_pdfa = data.convert_to_pdfa;
1130 disable_vba_code = data.disable_vba_code;
1131 return (*this);
1132 }
1133
1160 void Set(bool include_doc_props, ConvertOptimizeOption optimize_option,
1161 ConvertContentOption content_option, ConvertBookmarkOption bookmark_option,
1162 bool convert_to_pdfa, bool disable_vba_code) {
1163 this->include_doc_props = include_doc_props;
1164 this->optimize_option = optimize_option;
1165 this->content_option = content_option;
1166 this->bookmark_option = bookmark_option;
1167 this->convert_to_pdfa = convert_to_pdfa;
1168 this->disable_vba_code = disable_vba_code;
1169 }
1170
1178 bool include_doc_props;
1179
1186 ConvertOptimizeOption optimize_option;
1187
1194 ConvertContentOption content_option;
1195
1202 ConvertBookmarkOption bookmark_option;
1203
1211 bool convert_to_pdfa;
1212
1220 bool disable_vba_code;
1221 };
1222
1224 class Excel2PDFSettingData FS_FINAL : public Object{
1225 public:
1231 typedef enum _ConvertQuality {
1233 e_ConvertQualityStandard = 0,
1235 e_ConvertQualityMinimum = 1
1236 } ConvertQuality;
1237
1243 typedef enum _ScaleType {
1245 e_ScaleTypeNone = 0,
1247 e_ScaleTypeFitAllColumns = 1,
1249 e_ScaleTypeFitAllRows = 2,
1251 e_ScaleTypeFitSheet = 3
1252 } ScaleType;
1253
1254
1256 Excel2PDFSettingData()
1257 : include_doc_props(false)
1258 , quality(Excel2PDFSettingData::e_ConvertQualityStandard)
1259 , ignore_print_area(true)
1260 , scale_type(Excel2PDFSettingData::e_ScaleTypeNone)
1261 , convert_to_pdfa(false)
1262 , disable_vba_code(false)
1263 {}
1264
1283 Excel2PDFSettingData(bool include_doc_props, ConvertQuality quality, bool ignore_print_area,
1284 ScaleType scale_type, bool convert_to_pdfa, bool disable_vba_code) {
1285 this->include_doc_props = include_doc_props;
1286 this->quality = quality;
1287 this->ignore_print_area = ignore_print_area;
1288 this->scale_type = scale_type;
1289 this->convert_to_pdfa = convert_to_pdfa;
1290 this->disable_vba_code = disable_vba_code;
1291 }
1292
1300 Excel2PDFSettingData &operator = (const Excel2PDFSettingData& data) {
1301 include_doc_props = data.include_doc_props;
1302 quality = data.quality;
1303 ignore_print_area = data.ignore_print_area;
1304 scale_type = data.scale_type;
1305 convert_to_pdfa = data.convert_to_pdfa;
1306 disable_vba_code = data.disable_vba_code;
1307 return (*this);
1308 }
1309
1330 void Set(bool include_doc_props, ConvertQuality quality, bool ignore_print_area,
1331 ScaleType scale_type, bool convert_to_pdfa) {
1332 this->include_doc_props = include_doc_props;
1333 this->quality = quality;
1334 this->ignore_print_area = ignore_print_area;
1335 this->scale_type = scale_type;
1336 this->convert_to_pdfa = convert_to_pdfa;
1337 this->disable_vba_code = disable_vba_code;
1338 }
1339
1347 bool include_doc_props;
1348
1354 ConvertQuality quality;
1355
1363 bool ignore_print_area;
1364
1370 ScaleType scale_type;
1371
1379 bool convert_to_pdfa;
1380
1388 bool disable_vba_code;
1389 };
1390
1392 class PowerPoint2PDFSettingData FS_FINAL : public Object{
1393 public:
1399 typedef enum _ConvertIntent {
1401 e_ConvertIntentPrint = 0,
1403 e_ConvertIntentScreen = 1
1404 } ConvertIntent;
1405
1412 typedef enum _HandoutOrder {
1417 e_HandoutOrderHorizontalFirst = 0,
1422 e_HandoutOrderVerticalFirst = 1
1423 } HandoutOrder;
1424
1430 typedef enum _OutputType {
1432 e_OutputSlides = 1,
1434 e_OutputNotesPages = 2,
1436 e_OutputOutline = 3,
1438 e_OutputOneSlideHandouts = 4,
1440 e_OutputTwoSlideHandouts = 5,
1442 e_OutputThreeSlideHandouts = 6,
1444 e_OutputFourSlideHandouts = 7,
1446 e_OutputSixSlideHandouts = 8,
1448 e_OutputNineSlideHandouts = 9
1449 } OutputType;
1450
1451
1453 PowerPoint2PDFSettingData()
1454 : intent(PowerPoint2PDFSettingData::e_ConvertIntentPrint)
1455 , frame_output_slides(false)
1456 , output_type(PowerPoint2PDFSettingData::e_OutputSlides)
1457 , handout_order(PowerPoint2PDFSettingData::e_HandoutOrderVerticalFirst)
1458 , output_hidden_slides(false)
1459 , include_doc_props(false)
1460 , disable_vba_code(false)
1461 {}
1462
1483 PowerPoint2PDFSettingData(ConvertIntent intent, bool frame_output_slides, OutputType output_type, HandoutOrder handout_order,
1484 bool output_hidden_slides, bool include_doc_props, bool disable_vba_code) {
1485 this->intent = intent;
1486 this->frame_output_slides = frame_output_slides;
1487 this->handout_order = handout_order;
1488 this->output_hidden_slides = output_hidden_slides;
1489 this->output_type = output_type;
1490 this->include_doc_props = include_doc_props;
1491 this->disable_vba_code = disable_vba_code;
1492 }
1493
1501 PowerPoint2PDFSettingData &operator = (const PowerPoint2PDFSettingData& data) {
1502 intent = data.intent;
1503 frame_output_slides = data.frame_output_slides;
1504 output_type = data.output_type;
1505 handout_order = data.handout_order;
1506 output_hidden_slides = data.output_hidden_slides;
1507 include_doc_props = data.include_doc_props;
1508 disable_vba_code = data.disable_vba_code;
1509 return (*this);
1510 }
1511
1534 void Set(ConvertIntent intent, bool frame_output_slides, OutputType output_type, HandoutOrder handout_order,
1535 bool output_hidden_slides, bool include_doc_props, bool disable_vba_code) {
1536 this->intent = intent;
1537 this->frame_output_slides = frame_output_slides;
1538 this->output_type = output_type;
1539 this->handout_order = handout_order;
1540 this->output_hidden_slides = output_hidden_slides;
1541 this->include_doc_props = include_doc_props;
1542 this->disable_vba_code = disable_vba_code;
1543 }
1544
1549 ConvertIntent intent;
1550
1557 bool frame_output_slides;
1558
1564 OutputType output_type;
1565
1582 HandoutOrder handout_order;
1583
1590 bool output_hidden_slides;
1591
1599 bool include_doc_props;
1600
1608 bool disable_vba_code;
1609 };
1610 #endif // #if (defined(_WIN32) || defined(_WIN64))
1611
1613 class HTML2PDFRelatedResource FS_FINAL : public Object{
1614 public:
1616 HTML2PDFRelatedResource()
1617 : related_resource_file(NULL)
1618 , resource_file_relative_path(L"") {
1619 }
1620
1629 HTML2PDFRelatedResource(foxit::common::file::ReaderCallback* related_resource_file, foxit::WString resource_file_relative_path) {
1630 this->related_resource_file = related_resource_file;
1631 this->resource_file_relative_path = resource_file_relative_path;
1632 }
1633
1641 HTML2PDFRelatedResource &operator = (const HTML2PDFRelatedResource& data) {
1642 related_resource_file = data.related_resource_file;
1643 resource_file_relative_path = data.resource_file_relative_path;
1644 return (*this);
1645 }
1646
1648 foxit::common::file::ReaderCallback* related_resource_file;
1649
1656 foxit::WString resource_file_relative_path;
1657 };
1658
1660 FSDK_DEFINE_ARRAY(HTML2PDFRelatedResourceArray, HTML2PDFRelatedResource)
1661
1662 #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__)
1663
1664 class OFDConvertParam FS_FINAL : public Object{
1665 public:
1667 OFDConvertParam()
1668 :is_embed_font(false) {}
1669
1675 OFDConvertParam(bool is_embed_font) {
1676 this->is_embed_font = is_embed_font;
1677 }
1678
1686 void Set(bool is_embed_font) {
1687 this->is_embed_font = is_embed_font;
1688 }
1689
1691 bool is_embed_font;
1692 };
1693 #endif
1694
1706 class Convert FS_FINAL : public Base {
1707 public:
1713 typedef enum _Office2PdfEngine {
1715 e_Office2PdfEngineMicrosoft = 0,
1717 e_Office2PdfEngineWps = 1
1718 } Office2PdfEngine;
1719
1720
1738 static void FromHTML(const wchar_t* src_html, const wchar_t* engine_path, const wchar_t* cookies_path, const HTML2PDFSettingData& setting_data, const wchar_t* saved_pdf_path, int32 timeout);
1739
1758 static void FromHTML(const wchar_t* src_html, const wchar_t* engine_path, foxit::common::file::ReaderCallback* cookies_reader, const HTML2PDFSettingData& setting_data, const wchar_t* saved_pdf_path, int32 timeout);
1759
1778 static void FromHTML(const wchar_t* src_html, const wchar_t* engine_path, foxit::common::file::ReaderCallback* cookies_reader, const HTML2PDFSettingData& setting_data, foxit::common::file::WriterCallback* saved_pdf_filestream, int32 timeout);
1779
1800 static void FromHTML(foxit::common::file::ReaderCallback* src_html, const HTML2PDFRelatedResourceArray& html2pdf_related_resource_array, const wchar_t* engine_path, foxit::common::file::ReaderCallback* cookies_reader, const HTML2PDFSettingData& setting_data, foxit::common::file::WriterCallback* saved_pdf_filestream, int32 timeout);
1801
1811 static void FromTXT(const wchar_t* src_txt, const wchar_t* saved_pdf_path, const TXT2PDFSettingData& setting_data);
1812
1821 static void FromImage(const wchar_t* src_img, const wchar_t* saved_pdf_path);
1822
1833 static void FromImage(foxit::common::file::ReaderCallback* file_reader, foxit::common::file::WriterCallback* saved_pdf_filestream);
1834
1849 static bool FromDWG(const wchar_t* engine_path, const wchar_t* src_dwg_path, const wchar_t* saved_pdf_path,
1850 const DWG2PDFSettingData& settings);
1851
1852 #if (defined(_WIN32) || defined(_WIN64))
1853
1869 static void FromWord(const wchar_t* src_word_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const Word2PDFSettingData& setting_data, Office2PdfEngine engine = e_Office2PdfEngineMicrosoft);
1870
1887 static void FromExcel(const wchar_t* src_excel_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const Excel2PDFSettingData& setting_data, Office2PdfEngine engine = e_Office2PdfEngineMicrosoft);
1888
1905 static void FromPowerPoint(const wchar_t* src_ppt_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const PowerPoint2PDFSettingData& setting_data, Office2PdfEngine engine = e_Office2PdfEngineMicrosoft);
1906
1907 #elif defined(__linux__) && !(defined(__ANDROID__) || defined(_FS_IOS_) || defined(_SWIG_ANDROID_) || defined(_SWIG_IOS_))
1908
1933 static void FromWord(const wchar_t* src_word_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const wchar_t* engine_path, const Word2PDFSettingData& setting_data, const wchar_t* fx_engine_path = L"", const wchar_t* specified_user_profile_path = L"");
1934
1960 static void FromExcel(const wchar_t* src_excel_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const wchar_t* engine_path, const Excel2PDFSettingData& setting_data, const wchar_t* fx_engine_path = L"", const wchar_t* specified_user_profile_path = L"");
1961
1987 static void FromPowerPoint(const wchar_t* src_ppt_file_path, const wchar_t* src_file_password, const wchar_t* saved_pdf_path, const wchar_t* engine_path, const PowerPoint2PDFSettingData& setting_data, const wchar_t* fx_engine_path = L"", const wchar_t* specified_user_profile_path = L"");
1988 #endif
1989
2012 static bool ToXML(const wchar_t* src_pdf_path, const wchar_t* src_file_password, const wchar_t* saved_xml_path, const wchar_t* saved_image_folder_path, bool is_force_to_tagged_pdf);
2013
2014 #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__)
2015
2027 static bool FromOFD(const wchar_t* src_ofd_path, const wchar_t* password, const wchar_t* saved_pdf_file_path, OFDConvertParam convert_param);
2028
2041 static bool ToOFD(const wchar_t* src_pdf_path, const wchar_t* password, const wchar_t* saved_ofd_file_path, OFDConvertParam convert_param);
2042 #endif // #if (defined(_WIN32) || defined(_WIN64)) || defined(__linux__)
2043
2044 };
2045 }
2046 }
2047 }
2048 #endif
foxit::addon::conversion::HTML2PDFSettingData::media_style
HTML2PDFMediaStyle media_style
The media style used for the converted PDF document. Please refer to values starting from HTML2PDFSet...
Definition: fs_convert.h:545
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatDefault
Encoding foramt: Default.The encoding format will be automatically detected in chromium.
Definition: fs_convert.h:72
foxit::addon::conversion::HTML2PDFSettingData::Set
void Set(float page_width, float page_height, bool is_to_page_scale, RectF page_margin, bool is_convert_link, common::Rotation rotate_degrees, bool is_generate_tag, HTML2PDFPageMode page_mode, bool to_generate_bookmarks, HTML2PDFScalingMode scaling_mode, HTML2PDFEncodingFormat encoding_format, bool to_render_images, bool to_remove_underline_for_link, bool to_set_headerfooter, const wchar_t *headerfooter_title, const wchar_t *headerfooter_url, const wchar_t *bookmark_root_name, bool to_resize_objects, bool to_print_background, bool to_optimize_tag_tree, HTML2PDFMediaStyle media_style, bool to_load_active_content, bool to_disable_sandbox, bool to_use_blacklist, bool to_hide_header, bool to_hide_footer, bool to_deny_local_file_access)
Set value.
Definition: fs_convert.h:415
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP866
Encoding foramt: "CP866".
Definition: fs_convert.h:122
foxit::addon::conversion::HTML2PDFSettingData::to_hide_footer
bool to_hide_footer
Used to decide whether to hide footer or not. It can not support on Linux x86 platform.
Definition: fs_convert.h:595
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatGB18030
Encoding foramt: "GB18030".
Definition: fs_convert.h:162
foxit::addon::conversion::DWG2PDFSettingData::e_FlagSHXTextAsGeometry
Bit 3. Enable SHX font text to geometry conversion.
Definition: fs_convert.h:770
IFX_FileWrite
File writing interface.
Definition: fx_stream.h:470
foxit::addon::conversion::HTML2PDFSettingData::to_disable_sandbox
bool to_disable_sandbox
Used to decide whether to disable sandbox or not.
Definition: fs_convert.h:561
foxit::addon::conversion::HTML2PDFSettingData::e_MediaStyleScreen
Media style: screen. It means PDF page will be displayed in screen media style.
Definition: fs_convert.h:228
foxit::addon::conversion::DWG2PDFSettingData::e_FlagIncludeOffLayers
Bit 6. If enabled, invisible layers will be added to PDF file (1.5 version required).
Definition: fs_convert.h:778
foxit::addon::conversion::DWG2PDFSettingData::operator=
DWG2PDFSettingData & operator=(const DWG2PDFSettingData &data)
Assign operator.
Definition: fs_convert.h:873
foxit::addon::conversion::DWG2PDFSettingData::DWG2PDFSettingData
DWG2PDFSettingData()
Constructor, with parameters.
Definition: fs_convert.h:853
foxit::addon::conversion::DWG2PDFSettingData::e_FlagUseHLR
Bit 8. Determines whether software uses vector hidden-line removal for corresponding viewports.
Definition: fs_convert.h:786
foxit::addon::conversion::DWG2PDFSettingData::gradient_export_hatches_type
DWG2PDFExportHatchesType gradient_export_hatches_type
The type of gradient hatches export.
Definition: fs_convert.h:930
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatHebrew
Encoding foramt: "Hebrew".
Definition: fs_convert.h:92
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_ELANGO
Encoding foramt: "X-TAM-ELANGO".
Definition: fs_convert.h:198
foxit::addon::conversion::HTML2PDFSettingData::e_ScalingModeScale
Page scaling: Scale. It means HTML content will be scaled to fit PDF page size. In this mode,...
Definition: fs_convert.h:60
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFScalingMode
HTML2PDFScalingMode
Enumeration for scaling mode used for converting HTML to PDF.
Definition: fs_convert.h:56
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFSettingData
HTML2PDFSettingData(float page_width, float page_height, bool is_to_page_scale, RectF page_margin, bool is_convert_link, common::Rotation rotate_degrees, bool is_generate_tag, HTML2PDFPageMode page_mode, bool to_generate_bookmarks, HTML2PDFScalingMode scaling_mode, HTML2PDFEncodingFormat encoding_format, bool to_render_images, bool to_remove_underline_for_link, bool to_set_headerfooter, const wchar_t *headerfooter_title, const wchar_t *headerfooter_url, const wchar_t *bookmark_root_name, bool to_resize_objects, bool to_print_background, bool to_optimize_tag_tree, HTML2PDFMediaStyle media_style, bool to_load_active_content, bool to_disable_sandbox, bool to_use_blacklist, bool to_hide_header, bool to_hide_footer, bool to_deny_local_file_access)
Constructor, with parameters.
Definition: fs_convert.h:303
foxit::addon::conversion::HTML2PDFSettingData::e_ScalingModeEnlarge
Page scaling: Enlarge. It means PDF page will be enlarged to HTML content size. In this mode,...
Definition: fs_convert.h:62
foxit::addon::conversion::DWG2PDFSettingData::e_FlagZoomToExtentsMode
Bit 12. If enabled, layout geometry will be zoomed to paper size, else layout settings will be applie...
Definition: fs_convert.h:798
foxit::addon::conversion::TXT2PDFSettingData::Set
void Set(float page_width, float page_height, RectF page_margin, const common::Font &font, float text_size, ARGB text_color, float linespace, bool is_break_page)
Set value.
Definition: fs_convert.h:679
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatVISUAL
Encoding foramt: "VISUAL".
Definition: fs_convert.h:152
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_2022_KR
Encoding foramt: "ISO-2022-KR".
Definition: fs_convert.h:158
foxit::addon::conversion::HTML2PDFSettingData::to_hide_header
bool to_hide_header
Used to decide whether to hide header or not. It can not support on Linux x86 platform.
Definition: fs_convert.h:592
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::addon::conversion::DWG2PDFSettingData::export_hatches_type
DWG2PDFExportHatchesType export_hatches_type
The type of solid hatches export.
Definition: fs_convert.h:908
foxit::addon::conversion::DWG2PDFSettingData::e_FlagFlateCompression
Bit 9. Enable compression of internal PDF streams.
Definition: fs_convert.h:788
foxit::addon::conversion::DWG2PDFSettingData::e_FlagEmbededOptimizedTTF
Bit 7. Enable embedding of TTF font program to PDF file. The TTF font will be reduced by removing unu...
Definition: fs_convert.h:782
foxit::common::e_Rotation0
No rotation.
Definition: fs_common.h:59
foxit::addon::conversion::HTML2PDFSettingData::is_convert_link
bool is_convert_link
Used to decide whether the web link should be converted or not.
Definition: fs_convert.h:489
foxit::addon::conversion::HTML2PDFSettingData::page_width
float page_width
The page width used for the converted PDF document (unit is 1/72 inch).
Definition: fs_convert.h:455
foxit::addon::conversion::HTML2PDFRelatedResourceArray
Definition: fs_convert.h:1660
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCSN_369103
Encoding foramt: "CSN_369103".
Definition: fs_convert.h:154
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatEUC_JP
Encoding foramt: "EUC-JP".
Definition: fs_convert.h:94
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatHTCHANAKYA
Encoding foramt: "HTCHANAKYA".
Definition: fs_convert.h:182
foxit::addon::conversion::HTML2PDFRelatedResource::HTML2PDFRelatedResource
HTML2PDFRelatedResource(foxit::common::file::ReaderCallback *related_resource_file, foxit::WString resource_file_relative_path)
Constructor, with parameters.
Definition: fs_convert.h:1629
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatASCII_7_bit
Encoding foramt: "ASCII-7-bit".
Definition: fs_convert.h:116
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1252
Encoding foramt: "CP1252".
Definition: fs_convert.h:132
foxit::addon::conversion::HTML2PDFSettingData::e_MediaStylePrint
Media style: print. It means PDF page will be displayed in print media style.
Definition: fs_convert.h:230
fs_common.h
Header file for common definitions and classes.
foxit::addon::conversion::DWG2PDFSettingData::paper_width
float paper_width
The paper width used for the converted PDF document.
Definition: fs_convert.h:985
foxit::addon::conversion::HTML2PDFSettingData::is_to_page_scale
bool is_to_page_scale
Used to decide whether to scale the converted PDF page or not.
Definition: fs_convert.h:472
foxit::addon::conversion::Convert::e_Office2PdfEngineMicrosoft
Microsoft Office automation engine.
Definition: fs_convert.h:1715
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatKOI8R
Encoding foramt: "KOI8R".
Definition: fs_convert.h:118
foxit::addon::conversion::DWG2PDFSettingData::paper_height
float paper_height
The paper height used for the converted PDF document.
Definition: fs_convert.h:994
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1254
Encoding foramt: "CP1254".
Definition: fs_convert.h:136
foxit::addon::conversion::TXT2PDFSettingData::page_height
float page_height
Page height used for the converted PDF document.
Definition: fs_convert.h:695
IFX_FileRead
File reading interface.
Definition: fx_stream.h:587
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_8859_11
Encoding foramt: "ISO-8859-11".
Definition: fs_convert.h:148
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatBIG5
Encoding foramt: "BIG5".
Definition: fs_convert.h:100
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatJIS
Encoding foramt: "JIS".
Definition: fs_convert.h:98
foxit::addon::conversion::Convert::FromDWG
static bool FromDWG(const wchar_t *engine_path, const wchar_t *src_dwg_path, const wchar_t *saved_pdf_path, const DWG2PDFSettingData &settings)
Convert a DWG format file to a PDF file.
foxit::addon::conversion::HTML2PDFSettingData::page_margin
RectF page_margin
The page margin used for converted PDF document.
Definition: fs_convert.h:480
foxit::addon::conversion::HTML2PDFSettingData::rotate_degrees
common::Rotation rotate_degrees
The rotation degree used for the converted PDF page.Please refer to values starting from common::e_Ro...
Definition: fs_convert.h:486
foxit::addon::conversion::DWG2PDFSettingData::output_title
foxit::WString output_title
The title for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:951
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatGBK
Encoding foramt: "GBK".
Definition: fs_convert.h:160
foxit::addon::conversion::HTML2PDFSettingData
Definition: fs_convert.h:37
foxit::ARGB
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1253
Encoding foramt: "CP1253".
Definition: fs_convert.h:134
foxit::addon::conversion::HTML2PDFRelatedResource
Definition: fs_convert.h:1613
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_BINARYENC
Encoding foramt: "X-BINARYENC".
Definition: fs_convert.h:192
foxit::addon::conversion::DWG2PDFProgressCallback::Release
virtual void Release()=0
A callback function used to release current callback object itself.
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_8859_15
Encoding foramt: "ISO-8859-15".
Definition: fs_convert.h:146
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFSearchableTextTypeSHX
Searchable text type: Only text displayed with SHX font is searchable.
Definition: fs_convert.h:830
foxit::addon::conversion::HTML2PDFSettingData::headerfooter_url
foxit::WString headerfooter_url
The header-footer url which is content for left footer.
Definition: fs_convert.h:527
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1255
Encoding foramt: "CP1255".
Definition: fs_convert.h:138
foxit::addon::conversion::HTML2PDFSettingData::to_deny_local_file_access
bool to_deny_local_file_access
Used to decide whether to deny local file access or not during converting html file....
Definition: fs_convert.h:604
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFPageMode
HTML2PDFPageMode
Enumeration for page mode used for converting HTML to PDF.
Definition: fs_convert.h:44
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUTF_16LE
Encoding foramt: "UTF-16LE".
Definition: fs_convert.h:186
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_SoftBank_ISO_2022_JP
Encoding foramt: "X-SoftBank-ISO-2022-JP".
Definition: fs_convert.h:218
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_SHREE
Encoding foramt: "X-TAM-SHREE".
Definition: fs_convert.h:202
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatKSC
Encoding foramt: "KSC".
Definition: fs_convert.h:106
foxit::addon::conversion::DWG2PDFSettingData::DWG2PDFColorPolicy
DWG2PDFColorPolicy
Enumeration for color policy used for converting DWG to PDF.
Definition: fs_convert.h:840
foxit::addon::conversion::HTML2PDFSettingData::to_remove_underline_for_link
bool to_remove_underline_for_link
Used to decide whether to remove underline decoration for link.
Definition: fs_convert.h:518
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatBHASKAR
Encoding foramt: "BHASKAR".
Definition: fs_convert.h:180
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1251
Encoding foramt: "CP1251".
Definition: fs_convert.h:130
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_DoCoMo_Shift_JIS
Encoding foramt: "X-DoCoMo-Shift_JIS".
Definition: fs_convert.h:212
foxit::addon::conversion::DWG2PDFSettingData::e_FlagExportHyperlinks
Bit 11. Enable hyperlinks export.
Definition: fs_convert.h:792
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatKOI8U
Encoding foramt: "KOI8U".
Definition: fs_convert.h:144
foxit::addon::conversion::HTML2PDFSettingData::to_load_active_content
bool to_load_active_content
Used to decide whether to load active content or not.
Definition: fs_convert.h:554
foxit::addon::conversion::DWG2PDFSettingData::output_author
foxit::WString output_author
The author for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:956
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFExportHatchesTypeDrawing
Hatches export type: Exports hatch as a set of triangles (vectorizer).
Definition: fs_convert.h:814
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFSettingData
HTML2PDFSettingData()
Constructor.
Definition: fs_convert.h:235
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_KDDI_ISO_2022_JP
Encoding foramt: "X-KDDI-ISO-2022-JP".
Definition: fs_convert.h:216
foxit::addon::conversion::DWG2PDFSettingData::e_FlagSimpleGeomOptimization
Bit 4. Enable simple geometry optimization (separated segments to one polyline, Bezier curve control ...
Definition: fs_convert.h:774
foxit::addon::conversion::Convert::e_Office2PdfEngineWps
WPS Office automation engine.
Definition: fs_convert.h:1717
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatGB
Encoding foramt: "GB".
Definition: fs_convert.h:102
foxit::addon::conversion::HTML2PDFSettingData::to_optimize_tag_tree
bool to_optimize_tag_tree
Used to decide whether to optimize tag tree or not.
Definition: fs_convert.h:539
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatMACINTOSH
Encoding foramt: "MACINTOSH".
Definition: fs_convert.h:176
foxit::addon::conversion::Convert::FromHTML
static void FromHTML(const wchar_t *src_html, const wchar_t *engine_path, const wchar_t *cookies_path, const HTML2PDFSettingData &setting_data, const wchar_t *saved_pdf_path, int32 timeout)
Convert a HTML format file or a URL of a Web page to a PDF file.
foxit::addon::conversion::HTML2PDFRelatedResource::resource_file_relative_path
foxit::WString resource_file_relative_path
The path of related_resource_file in the HTML content.
Definition: fs_convert.h:1656
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUnicode
Encoding foramt: "Unicode".
Definition: fs_convert.h:108
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_TBOOMIS
Encoding foramt: "X-TAM-TBOOMIS".
Definition: fs_convert.h:204
foxit::addon::conversion::TXT2PDFSettingData::page_margin
RectF page_margin
Page margin used for converted PDF document.
Definition: fs_convert.h:703
foxit::addon::conversion::Convert::FromImage
static void FromImage(const wchar_t *src_img, const wchar_t *saved_pdf_path)
Convert a Image format file to a PDF file.
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatLatin5
Encoding foramt: "Latin5".
Definition: fs_convert.h:82
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatTAM
Encoding foramt: "TAM".
Definition: fs_convert.h:170
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatTAB
Encoding foramt: "TAB".
Definition: fs_convert.h:172
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFExportHatchesTypePdfPaths
Hatches export type: Exports hatch as a PDF path (solid hatches only).
Definition: fs_convert.h:816
foxit::addon::conversion::HTML2PDFSettingData::headerfooter_title
foxit::WString headerfooter_title
The header-footer title which is content for center header.
Definition: fs_convert.h:524
foxit::addon::conversion::Convert::FromTXT
static void FromTXT(const wchar_t *src_txt, const wchar_t *saved_pdf_path, const TXT2PDFSettingData &setting_data)
Convert a TXT format file to a PDF file.
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1256
Encoding foramt: "CP1256".
Definition: fs_convert.h:140
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatArabic
Encoding foramt: "Arabic".
Definition: fs_convert.h:88
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_UTF8UTF8
Encoding foramt: "X-UTF8UTF8".
Definition: fs_convert.h:196
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_8859_5
Encoding foramt: "ISO-8859-5".
Definition: fs_convert.h:86
foxit::addon::conversion::DWG2PDFSettingData::e_FlagLinearized
Bit 13. Create linearized PDF file.
Definition: fs_convert.h:800
foxit::addon::conversion::HTML2PDFSettingData::to_print_background
bool to_print_background
Used to decide whether to print background or not.
Definition: fs_convert.h:536
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP852
Encoding foramt: "CP852".
Definition: fs_convert.h:120
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_WEBTAMIL
Encoding foramt: "X-TAM-WEBTAMIL".
Definition: fs_convert.h:208
foxit::addon::conversion::HTML2PDFRelatedResource::related_resource_file
foxit::common::file::ReaderCallback * related_resource_file
The related resouce file.
Definition: fs_convert.h:1648
foxit::common::Rotation
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFColorPolicyMono
Color policy: Drawing is exported to a monochrome PDF file.
Definition: fs_convert.h:844
foxit::addon::conversion::DWG2PDFSettingData::DWG2PDFSearchableTextType
DWG2PDFSearchableTextType
Enumeration for searchable text type used for converting DWG to PDF.
Definition: fs_convert.h:826
foxit::addon::conversion::DWG2PDFSettingData::searchable_text_type
DWG2PDFSearchableTextType searchable_text_type
The type of search text type.
Definition: fs_convert.h:941
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1250
Encoding foramt: "CP1250".
Definition: fs_convert.h:128
foxit::addon::conversion::TXT2PDFSettingData::font
common::Font font
A font object.
Definition: fs_convert.h:706
foxit::addon::conversion::HTML2PDFRelatedResource::HTML2PDFRelatedResource
HTML2PDFRelatedResource()
Constructor.
Definition: fs_convert.h:1616
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatTSCII
Encoding foramt: "TSCII".
Definition: fs_convert.h:168
foxit::addon::conversion::DWG2PDFSettingData::e_FlagTTFTextAsGeometry
Bit 2. Enable TTF font text to geometry conversion.
Definition: fs_convert.h:766
foxit::addon::conversion::DWG2PDFSettingData::color_policy
DWG2PDFColorPolicy color_policy
The color policy used for the converted PDF document.
Definition: fs_convert.h:1003
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatJAGRAN
Encoding foramt: "JAGRAN".
Definition: fs_convert.h:174
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP1257
Encoding foramt: "CP1257".
Definition: fs_convert.h:142
fs_pdfpage.h
Header file for PDF page related definitions and classes.
foxit::addon::conversion::DWG2PDFSettingData::export_flags
uint32 export_flags
The export flags used for the converted PDF document. Please refer to values starting from DWG2PDFSet...
Definition: fs_convert.h:899
foxit::addon::conversion::HTML2PDFSettingData::to_render_images
bool to_render_images
Used to decide whether to render images or not.
Definition: fs_convert.h:515
foxit::addon::conversion::TXT2PDFSettingData::text_size
float text_size
Font size. If valid, it should be above 0.
Definition: fs_convert.h:709
foxit::addon::conversion::HTML2PDFSettingData::to_use_blacklist
bool to_use_blacklist
Used to decide whether to use blacklist or not.
Definition: fs_convert.h:589
foxit::addon::conversion::HTML2PDFSettingData::e_ScalingModeNone
Scaling mode: Fixed page with no scale. In this mode, the text size of HTML content will not be chang...
Definition: fs_convert.h:58
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUTF_32BE
Encoding foramt: "UTF-32BE".
Definition: fs_convert.h:188
foxit::addon::conversion::HTML2PDFSettingData::to_set_headerfooter
bool to_set_headerfooter
Used to decide whether to set header-footer or not.
Definition: fs_convert.h:521
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatBIG5_CP950
Encoding foramt: "BIG5-CP950".
Definition: fs_convert.h:114
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_SoftBank_Shift_JIS
Encoding foramt: "X-SoftBank-Shift_JIS".
Definition: fs_convert.h:214
foxit::addon::conversion::HTML2PDFSettingData::e_PageModeMultiplePage
Multiple page mode.
Definition: fs_convert.h:48
foxit::addon::conversion::HTML2PDFSettingData::bookmark_root_name
foxit::WString bookmark_root_name
The bookmark's root name.
Definition: fs_convert.h:530
foxit::addon::conversion::DWG2PDFSettingData::e_FlagEmbededTTF
Bit 1. Enable embedding of TTF(True Type Font) program to PDF file. The whole TTF font file will be e...
Definition: fs_convert.h:762
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_KDDI_Shift_JIS
Encoding foramt: "X-KDDI-Shift_JIS".
Definition: fs_convert.h:210
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFColorPolicyGrayscale
Color policy: Drawing is exported to a grayscale PDF file. Native colors are converted into grayscale...
Definition: fs_convert.h:846
foxit::addon::conversion::TXT2PDFSettingData::operator=
TXT2PDFSettingData & operator=(const TXT2PDFSettingData &data)
Assign operator.
Definition: fs_convert.h:653
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatHZ_GB_2312
Encoding foramt: "HZ-GB-2312".
Definition: fs_convert.h:194
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUTF_16BE
Encoding foramt: "UTF-16BE".
Definition: fs_convert.h:184
foxit::addon::conversion::TXT2PDFSettingData::TXT2PDFSettingData
TXT2PDFSettingData()
Constructor.
Definition: fs_convert.h:611
foxit::addon::conversion::DWG2PDFSettingData::progress_callback
void * progress_callback
A pointer to a DWG2PDFProgressCallback object which is used to receive the progress of converting DWG...
Definition: fs_convert.h:1016
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_8859_8_I
Encoding foramt: "ISO-8859-8-I".
Definition: fs_convert.h:150
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP874
Encoding foramt: "CP874".
Definition: fs_convert.h:124
foxit::addon::conversion::HTML2PDFSettingData::page_mode
HTML2PDFPageMode page_mode
The page mode used for the converting. Please refer to values starting from HTML2PDFSettingData::e_Pa...
Definition: fs_convert.h:498
foxit::addon::conversion::DWG2PDFSettingData::output_creator
foxit::WString output_creator
The creator for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:971
fs_pdfdoc.h
Header file for PDF document related definitions and classes.
foxit::addon::conversion::DWG2PDFSettingData::other_export_hatches_type
DWG2PDFExportHatchesType other_export_hatches_type
The type of other (non-solid) hatches export.
Definition: fs_convert.h:919
foxit::addon::conversion::TXT2PDFSettingData::TXT2PDFSettingData
TXT2PDFSettingData(float page_width, float page_height, RectF page_margin, const common::Font &font, float text_size, ARGB text_color, float linespace, bool is_break_page)
Constructor, with parameters.
Definition: fs_convert.h:634
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_TMNEWS
Encoding foramt: "X-TAM-TMNEWS".
Definition: fs_convert.h:206
foxit::addon::conversion::Convert::Office2PdfEngine
Office2PdfEngine
Enumeration for engine type used for office to PDF conversion on Windows platforms.
Definition: fs_convert.h:1713
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatX_TAM_LTTMBARANI
Encoding foramt: "X-TAM-LTTMBARANI".
Definition: fs_convert.h:200
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatEUC_CN
Encoding foramt: "EUC-CN".
Definition: fs_convert.h:104
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatEUC
Encoding foramt: "EUC".
Definition: fs_convert.h:110
foxit::addon::conversion::HTML2PDFSettingData::e_PageModeSinglePage
Single page mode.
Definition: fs_convert.h:46
foxit::addon::conversion::TXT2PDFSettingData::text_color
ARGB text_color
Font color.
Definition: fs_convert.h:712
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFColorPolicyNoPolicy
Color policy: No color policy. A drawing is exported with its native color palette (as is).
Definition: fs_convert.h:842
foxit::addon::conversion::HTML2PDFSettingData::operator=
HTML2PDFSettingData & operator=(const HTML2PDFSettingData &data)
Assign operator.
Definition: fs_convert.h:345
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatLatin6
Encoding foramt: "Latin6".
Definition: fs_convert.h:84
foxit::addon::conversion::DWG2PDFSettingData::is_active_layout
bool is_active_layout
true means to export the active layout only, while false means not. Default value: false.
Definition: fs_convert.h:946
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_2022_CN
Encoding foramt: "ISO_2022_CN".
Definition: fs_convert.h:166
foxit::addon::conversion::DWG2PDFSettingData::DWG2PDFExportHatchesType
DWG2PDFExportHatchesType
Enumeration for hatches export type used for converting DWG to PDF.
Definition: fs_convert.h:810
foxit::addon::conversion::TXT2PDFSettingData::linespace
float linespace
Line spacing. If valid, it should be above 0.
Definition: fs_convert.h:715
foxit::addon::conversion::HTML2PDFSettingData::scaling_mode
HTML2PDFScalingMode scaling_mode
The scaling mode used for the converted PDF document. Please refer to values starting from HTML2PDFSe...
Definition: fs_convert.h:507
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatGreek
Encoding foramt: "Greek".
Definition: fs_convert.h:90
foxit::int32
FX_INT32 int32
32-bit signed integer.
Definition: fs_basictypes.h:193
foxit::addon::conversion::DWG2PDFSettingData::e_FlagMeasuring
Bit 15. Enable measuring scale in pdf.
Definition: fs_convert.h:802
foxit::addon::conversion::HTML2PDFSettingData::encoding_format
HTML2PDFEncodingFormat encoding_format
The HTML encoding format Please refer to values starting from HTML2PDFSettingData::e_EncodingFormatDe...
Definition: fs_convert.h:512
foxit::addon::conversion::DWG2PDFSettingData::e_FlagEnableLayers
Bit 5. If enabled, layer support will be added to PDF file (1.5 version required).
Definition: fs_convert.h:776
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCP932
Encoding foramt: "CP932".
Definition: fs_convert.h:126
foxit::addon::conversion::HTML2PDFSettingData::to_generate_bookmarks
bool to_generate_bookmarks
Used to decide whether bookmarks should be generated or not.
Definition: fs_convert.h:501
foxit::addon::conversion::DWG2PDFProgressCallback::OnProgress
virtual void OnProgress(const wchar_t *message, float progress)=0
A callback function to be called when converting DWG to PDF.
foxit::common::Font
Definition: fs_common.h:1523
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatCNS
Encoding foramt: "CNS".
Definition: fs_convert.h:112
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatLatin2
Encoding foramt: "Latin2".
Definition: fs_convert.h:76
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFSearchableTextTypeNoSearch
Searchable text type: No searchable text.
Definition: fs_convert.h:828
foxit::addon::conversion::DWG2PDFSettingData
Definition: fs_convert.h:751
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUTF_32LE
Encoding foramt: "UTF-32LE".
Definition: fs_convert.h:190
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatLatin3
Encoding foramt: "Latin3".
Definition: fs_convert.h:78
foxit::addon::conversion::DWG2PDFSettingData::DWG2PDFExportFlags
DWG2PDFExportFlags
Enumeration for flags of DWG to PDF export.
Definition: fs_convert.h:758
foxit::addon::conversion::DWG2PDFSettingData::is_output_progress
bool is_output_progress
A boolean value which indicates whether to output progress logs. true means to output progress logs,...
Definition: fs_convert.h:1010
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFExportHatchesTypeBitmap
Hatches export type: Exports hatch as a bitmap.
Definition: fs_convert.h:812
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFEncodingFormat
HTML2PDFEncodingFormat
Enumeration for encoding format used for converting HTML to PDF.
Definition: fs_convert.h:70
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::addon::conversion::HTML2PDFSettingData::HTML2PDFMediaStyle
HTML2PDFMediaStyle
Enumeration for media style used for converting HTML to PDF.
Definition: fs_convert.h:226
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFSearchableTextTypeTTF
Searchable text type: Only text displayed with TTF font is searchable.
Definition: fs_convert.h:832
foxit::addon::conversion::DWG2PDFSettingData::e_DWG2PDFExportHatchesTypePolygons
Hatches export type: Exports hatch as a polygon (solid hatches only).
Definition: fs_convert.h:818
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatSJS
Encoding foramt: "SJS".
Definition: fs_convert.h:96
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatISO_8859_13
Encoding foramt: "ISO-8859-13".
Definition: fs_convert.h:156
foxit::addon::conversion::DWG2PDFProgressCallback
A callback class used for converting DWG to PDF.
Definition: fs_convert.h:726
foxit::addon::conversion::HTML2PDFSettingData::is_generate_tag
bool is_generate_tag
Used to decide whether the tag should be generated or not.
Definition: fs_convert.h:492
foxit::addon::conversion::HTML2PDFSettingData::page_height
float page_height
The page height used for the converted PDF document (unit is 1/72 inch).
Definition: fs_convert.h:464
foxit::addon::conversion::TXT2PDFSettingData::is_break_page
bool is_break_page
Used to decide whether to insert a page break in converted PDF document when meeting character 0x0c.
Definition: fs_convert.h:718
foxit::addon::conversion::TXT2PDFSettingData
Definition: fs_convert.h:608
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatLatin4
Encoding foramt: "Latin4".
Definition: fs_convert.h:80
foxit::addon::conversion::Convert::ToXML
static bool ToXML(const wchar_t *src_pdf_path, const wchar_t *src_file_password, const wchar_t *saved_xml_path, const wchar_t *saved_image_folder_path, bool is_force_to_tagged_pdf)
Convert a PDF file to a XML format file.
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatASCII
Encoding foramt: "ASCII".
Definition: fs_convert.h:74
foxit::addon::conversion::DWG2PDFSettingData::e_FlagASCIIHexEncoding
Bit 10. Enable ASCIIHex encoding of internal PDF streams.
Definition: fs_convert.h:790
foxit::addon::conversion::TXT2PDFSettingData::page_width
float page_width
Page width used for the converted PDF document.
Definition: fs_convert.h:692
foxit::Base
Definition: fs_basictypes.h:451
foxit::addon::conversion::HTML2PDFRelatedResource::operator=
HTML2PDFRelatedResource & operator=(const HTML2PDFRelatedResource &data)
Assign operator.
Definition: fs_convert.h:1641
foxit::addon::conversion::DWG2PDFSettingData::output_producer
foxit::WString output_producer
The producer for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:976
foxit::addon::conversion::HTML2PDFSettingData::to_resize_objects
bool to_resize_objects
Whether to enable the Javascripts related resizing of the objects during rendering process.
Definition: fs_convert.h:533
foxit::addon::conversion::DWG2PDFSettingData::output_keywords
foxit::WString output_keywords
The keywords for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:966
foxit::addon::conversion::Convert
Definition: fs_convert.h:1706
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatBIG5_HKSCS
Encoding foramt: "BIG5_HKSCS".
Definition: fs_convert.h:164
foxit::addon::conversion::HTML2PDFSettingData::e_EncodingFormatUTF7
Encoding foramt: "UTF7".
Definition: fs_convert.h:178
foxit::addon::conversion::DWG2PDFSettingData::output_subject
foxit::WString output_subject
The subject for the output PDF document, an empty string will be used as default.
Definition: fs_convert.h:961