|
Foxit PDF SDK
|
Public Member Functions | |
| def | GetBookmark_root_name () |
| Get the bookmark's root name. More... | |
| def | GetEncoding_format () |
| Get the HTML encoding format Please refer to values starting from fsdk.HTML2PDFSettingDataE_EncodingFormatDefault and this should be one of these values. More... | |
| def | GetHeaderfooter_title () |
| Get the header-footer title which is content for center header. More... | |
| def | GetHeaderfooter_url () |
| Get the header-footer url which is content for left footer. More... | |
| def | GetIs_convert_link () |
| Get used to decide whether the web link should be converted or not. More... | |
| def | GetIs_generate_tag () |
| Get used to decide whether the tag should be generated or not. More... | |
| def | GetIs_to_page_scale () |
| Get used to decide whether to scale the converted PDF page or not. More... | |
| def | GetMedia_style () |
| Get the media style used for the converted PDF document. More... | |
| def | GetPage_height () |
| Get the page height used for the converted PDF document (unit is 1/72 inch). More... | |
| def | GetPage_margin () |
| Get the page margin used for converted PDF document. More... | |
| def | GetPage_mode () |
| Get the page mode used for the converting. More... | |
| def | GetPage_width () |
| Get the page width used for the converted PDF document (unit is 1/72 inch). More... | |
| def | GetRotate_degrees () |
| Get the rotation degree used for the converted PDF page. More... | |
| def | GetScaling_mode () |
| Get the scaling mode used for the converted PDF document. More... | |
| def | GetTo_deny_local_file_access () |
| Get used to decide whether to deny local file access or not during converting html file. More... | |
| def | GetTo_disable_sandbox () |
| Get used to decide whether to disable sandbox or not. More... | |
| def | GetTo_generate_bookmarks () |
| Get used to decide whether bookmarks should be generated or not. More... | |
| def | GetTo_hide_footer () |
| Get used to decide whether to hide footer or not. More... | |
| def | GetTo_hide_header () |
| Get used to decide whether to hide header or not. More... | |
| def | GetTo_load_active_content () |
| Get used to decide whether to load active content or not. More... | |
| def | GetTo_optimize_tag_tree () |
| Get used to decide whether to optimize tag tree or not. More... | |
| def | GetTo_print_background () |
| Get used to decide whether to print background or not. More... | |
| def | GetTo_remove_underline_for_link () |
| Get used to decide whether to remove underline decoration for link. More... | |
| def | GetTo_render_images () |
| Get used to decide whether to render images or not. More... | |
| def | GetTo_resize_objects () |
| Get whether to enable the Javascripts related resizing of the objects during rendering process. More... | |
| def | GetTo_set_headerfooter () |
| Get used to decide whether to set header-footer or not. More... | |
| def | GetTo_use_blacklist () |
| Get used to decide whether to use blacklist or not. More... | |
| def | Set (page_width, page_height, is_to_page_scale, page_margin, is_convert_link, rotate_degrees, is_generate_tag, page_mode, to_generate_bookmarks, scaling_mode, encoding_format, to_render_images, to_remove_underline_for_link, to_set_headerfooter, headerfooter_title, headerfooter_url, bookmark_root_name, to_resize_objects, to_print_background, to_optimize_tag_tree, media_style, to_load_active_content, to_disable_sandbox, to_use_blacklist, to_hide_header, to_hide_footer, to_deny_local_file_access) |
| Set value. More... | |
| def | SetBookmark_root_name (value) |
| Set the bookmark's root name. More... | |
| def | SetEncoding_format (value) |
| Set the HTML encoding format Please refer to values starting from fsdk.HTML2PDFSettingDataE_EncodingFormatDefault and this should be one of these values. More... | |
| def | SetHeaderfooter_title (value) |
| Set the header-footer title which is content for center header. More... | |
| def | SetHeaderfooter_url (value) |
| Set the header-footer url which is content for left footer. More... | |
| def | SetIs_convert_link (value) |
| Set used to decide whether the web link should be converted or not. More... | |
| def | SetIs_generate_tag (value) |
| Set used to decide whether the tag should be generated or not. More... | |
| def | SetIs_to_page_scale (value) |
| Set used to decide whether to scale the converted PDF page or not. More... | |
| def | SetMedia_style (value) |
| Set the media style used for the converted PDF document. More... | |
| def | SetPage_height (value) |
| Set the page height used for the converted PDF document (unit is 1/72 inch). More... | |
| def | SetPage_margin (value) |
| Set the page margin used for converted PDF document. More... | |
| def | SetPage_mode (value) |
| Set the page mode used for the converting. More... | |
| def | SetPage_width (value) |
| Set the page width used for the converted PDF document (unit is 1/72 inch). More... | |
| def | SetRotate_degrees (value) |
| Set the rotation degree used for the converted PDF page. More... | |
| def | SetScaling_mode (value) |
| Set the scaling mode used for the converted PDF document. More... | |
| def | SetTo_deny_local_file_access (value) |
| Set used to decide whether to deny local file access or not during converting html file. More... | |
| def | SetTo_disable_sandbox (value) |
| Set used to decide whether to disable sandbox or not. More... | |
| def | SetTo_generate_bookmarks (value) |
| Set used to decide whether bookmarks should be generated or not. More... | |
| def | SetTo_hide_footer (value) |
| Set used to decide whether to hide footer or not. More... | |
| def | SetTo_hide_header (value) |
| Set used to decide whether to hide header or not. More... | |
| def | SetTo_load_active_content (value) |
| Set used to decide whether to load active content or not. More... | |
| def | SetTo_optimize_tag_tree (value) |
| Set used to decide whether to optimize tag tree or not. More... | |
| def | SetTo_print_background (value) |
| Set used to decide whether to print background or not. More... | |
| def | SetTo_remove_underline_for_link (value) |
| Set used to decide whether to remove underline decoration for link. More... | |
| def | SetTo_render_images (value) |
| Set used to decide whether to render images or not. More... | |
| def | SetTo_resize_objects (value) |
| Set whether to enable the Javascripts related resizing of the objects during rendering process. More... | |
| def | SetTo_set_headerfooter (value) |
| Set used to decide whether to set header-footer or not. More... | |
| def | SetTo_use_blacklist (value) |
| Set used to decide whether to use blacklist or not. More... | |
This class represents setting data used for converting HTML to PDF.
| fsdk.HTML2PDFSettingData.GetBookmark_root_name | ( | ) |
Get the bookmark's root name.
| fsdk.HTML2PDFSettingData.GetEncoding_format | ( | ) |
Get the HTML encoding format Please refer to values starting from fsdk.HTML2PDFSettingDataE_EncodingFormatDefault and this should be one of these values.
| fsdk.HTML2PDFSettingData.GetHeaderfooter_title | ( | ) |
Get the header-footer title which is content for center header.
| fsdk.HTML2PDFSettingData.GetHeaderfooter_url | ( | ) |
Get the header-footer url which is content for left footer.
| fsdk.HTML2PDFSettingData.GetIs_convert_link | ( | ) |
Get used to decide whether the web link should be converted or not.
| fsdk.HTML2PDFSettingData.GetIs_generate_tag | ( | ) |
Get used to decide whether the tag should be generated or not.
| fsdk.HTML2PDFSettingData.GetIs_to_page_scale | ( | ) |
Get used to decide whether to scale the converted PDF page or not.
| fsdk.HTML2PDFSettingData.GetMedia_style | ( | ) |
Get the media style used for the converted PDF document.
| fsdk.HTML2PDFSettingData.GetPage_height | ( | ) |
Get the page height used for the converted PDF document (unit is 1/72 inch).
This value minus the sum of the top and bottom margins must be bigger than 16.
| fsdk.HTML2PDFSettingData.GetPage_margin | ( | ) |
Get the page margin used for converted PDF document.
| fsdk.HTML2PDFSettingData.GetPage_mode | ( | ) |
Get the page mode used for the converting.
| fsdk.HTML2PDFSettingData.GetPage_width | ( | ) |
Get the page width used for the converted PDF document (unit is 1/72 inch).
This value minus the sum of the left and right margins must be bigger than 16.
| fsdk.HTML2PDFSettingData.GetRotate_degrees | ( | ) |
Get the rotation degree used for the converted PDF page.
| fsdk.HTML2PDFSettingData.GetScaling_mode | ( | ) |
Get the scaling mode used for the converted PDF document.
| fsdk.HTML2PDFSettingData.GetTo_deny_local_file_access | ( | ) |
Get used to decide whether to deny local file access or not during converting html file.
true means that prevents the HTML file from accessing any local files outside of its own directory. false means that allows the HTML file to access to any local file paths. Default value: false.
| fsdk.HTML2PDFSettingData.GetTo_disable_sandbox | ( | ) |
Get used to decide whether to disable sandbox or not.
true means to disable sandbox, and false means not. Default: true.
| fsdk.HTML2PDFSettingData.GetTo_generate_bookmarks | ( | ) |
Get used to decide whether bookmarks should be generated or not.
| fsdk.HTML2PDFSettingData.GetTo_hide_footer | ( | ) |
Get used to decide whether to hide footer or not.
| fsdk.HTML2PDFSettingData.GetTo_hide_header | ( | ) |
Get used to decide whether to hide header or not.
| fsdk.HTML2PDFSettingData.GetTo_load_active_content | ( | ) |
Get used to decide whether to load active content or not.
This parameter is useful for some optimized web pages. These web page will not load the entire content. When the user scrolls down the page, the contents of the web page will be loaded when they are displayed on the user screen. true means to load the active content that has not been loaded by the web page, and false means not. Default:false.
| fsdk.HTML2PDFSettingData.GetTo_optimize_tag_tree | ( | ) |
Get used to decide whether to optimize tag tree or not.
| fsdk.HTML2PDFSettingData.GetTo_print_background | ( | ) |
Get used to decide whether to print background or not.
| fsdk.HTML2PDFSettingData.GetTo_remove_underline_for_link | ( | ) |
Get used to decide whether to remove underline decoration for link.
| fsdk.HTML2PDFSettingData.GetTo_render_images | ( | ) |
Get used to decide whether to render images or not.
| fsdk.HTML2PDFSettingData.GetTo_resize_objects | ( | ) |
Get whether to enable the Javascripts related resizing of the objects during rendering process.
| fsdk.HTML2PDFSettingData.GetTo_set_headerfooter | ( | ) |
Get used to decide whether to set header-footer or not.
| fsdk.HTML2PDFSettingData.GetTo_use_blacklist | ( | ) |
Get used to decide whether to use blacklist or not.
This parameter is useful for checking all accessed URLs during the HTML to the PDF conversion process.
During the conversion of specific URL, there could be many third-party websites that are accessed by the conversion process (images, CSS styles, requests from JavaScripts, and others).
All of these accesses will be checked against the blacklist record. There is a prepared switch that enables the blacklist functionality in the converter. true means to use the blacklist, and false means not. Default: false. Blacklist JSON is located next to the fxhtml2pdf application and its name must be "blacklist.json".It consist from three parts of records:
list of domains.
list of IPs.
list of IP ranges.
"blacklist.json" Examples:
{"Domains":[
"xxx.com",
"xxx.com"
]
,
"IPs":["1.2.3.4","5.6.7.8"]
,
"IPsegments":[{"16":["104.193.88.0","104.193.88.100"]},{"16":["20.0.0.1","20.0.0.10"]}]
}
| def fsdk.HTML2PDFSettingData.Set | ( | page_width, | |
| page_height, | |||
| is_to_page_scale, | |||
| page_margin, | |||
| is_convert_link, | |||
| rotate_degrees, | |||
| is_generate_tag, | |||
| page_mode, | |||
| to_generate_bookmarks, | |||
| scaling_mode, | |||
| encoding_format, | |||
| to_render_images, | |||
| to_remove_underline_for_link, | |||
| to_set_headerfooter, | |||
| headerfooter_title, | |||
| headerfooter_url, | |||
| bookmark_root_name, | |||
| to_resize_objects, | |||
| to_print_background, | |||
| to_optimize_tag_tree, | |||
| media_style, | |||
| to_load_active_content, | |||
| to_disable_sandbox, | |||
| to_use_blacklist, | |||
| to_hide_header, | |||
| to_hide_footer, | |||
| to_deny_local_file_access | |||
| ) |
Set value.
| [in] | page_width | The page width used for the converted PDF document (unit is 1/72 inch). |
| [in] | page_height | The page height used for the converted PDF document (unit is 1/72 inch). This would be ignored if page mode fsdk.HTML2PDFSettingDataE_PageModeSinglePage is used. |
| [in] | is_to_page_scale | (Deprecated)Used to decide whether to scale the converted PDF page or not. |
| [in] | page_margin | The page margin used for converted PDF document. |
| [in] | is_convert_link | Used to decide whether the web link should be converted or not. |
| [in] | rotate_degrees | The rotation degree used for the converted PDF page.Please refer to values starting from fsdk.E_Rotation0 and this should be one of these values. |
| [in] | is_generate_tag | Used to decide whether the tag should be generated or not. |
| [in] | page_mode | The page mode used for the converting. Please refer to values starting from fsdk.HTML2PDFSettingDataE_PageModeSinglePage and this should be one of these values. |
| [in] | to_generate_bookmarks | Used to decide whether bookmarks should be generated or not. |
| [in] | scaling_mode | The scaling mode used for the converted PDF document. Please refer to values starting from fsdk.HTML2PDFSettingDataE_ScalingModeNone and this should be one of these values.Default value:. encoding_format The HTML encoding format Please refer to values starting from and this should be one of these values. |
| [in] | to_render_images | Whether to render images or not. |
| [in] | to_remove_underline_for_link | Whether to remove underline decoration for link or not. |
| [in] | to_set_headerfooter | Whether to set header-footer or not. |
| [in] | headerfooter_title | The header-footer title which is content for center header. |
| [in] | headerfooter_url | The header-footer url which is content for left footer. |
| [in] | bookmark_root_name | The bookmark's root name. |
| [in] | to_resize_objects | Whether to enable the Javascripts related resizing of the objects during rendering process. |
| [in] | to_print_background | Whether to print background or not. |
| [in] | to_optimize_tag_tree | Whether to optimize tag tree or not. |
| [in] | media_style | The media style used for the converted PDF document. Please refer to values starting from fsdk.HTML2PDFSettingDataE_MediaStyleScreen and this should be one of these values. |
| [in] | to_load_active_content | Whether to load active content or not. |
| [in] | to_disable_sandbox | Whether to disable sandbox or not. |
| [in] | to_use_blacklist | Whether to use blacklist or not. |
| [in] | to_hide_header | Whether to hide header or not. |
| [in] | to_hide_footer | Whether to hide footer or not. |
| [in] | to_deny_local_file_access | Whether to deny local file access or not. |
| fsdk.HTML2PDFSettingData.SetBookmark_root_name | ( | value | ) |
Set the bookmark's root name.
| [in] | value | The bookmark's root name. |
| fsdk.HTML2PDFSettingData.SetEncoding_format | ( | value | ) |
Set the HTML encoding format Please refer to values starting from fsdk.HTML2PDFSettingDataE_EncodingFormatDefault and this should be one of these values.
| [in] | value | The HTML encoding format Please refer to values starting from fsdk.HTML2PDFSettingDataE_EncodingFormatDefault and this should be one of these values. |
| fsdk.HTML2PDFSettingData.SetHeaderfooter_title | ( | value | ) |
Set the header-footer title which is content for center header.
| [in] | value | The header-footer title which is content for center header. |
| fsdk.HTML2PDFSettingData.SetHeaderfooter_url | ( | value | ) |
Set the header-footer url which is content for left footer.
| [in] | value | The header-footer url which is content for left footer. |
| fsdk.HTML2PDFSettingData.SetIs_convert_link | ( | value | ) |
Set used to decide whether the web link should be converted or not.
| [in] | value | Used to decide whether the web link should be converted or not. |
| fsdk.HTML2PDFSettingData.SetIs_generate_tag | ( | value | ) |
Set used to decide whether the tag should be generated or not.
| [in] | value | Used to decide whether the tag should be generated or not. |
| fsdk.HTML2PDFSettingData.SetIs_to_page_scale | ( | value | ) |
Set used to decide whether to scale the converted PDF page or not.
| [in] | value | Used to decide whether to scale the converted PDF page or not. |
| fsdk.HTML2PDFSettingData.SetMedia_style | ( | value | ) |
Set the media style used for the converted PDF document.
| [in] | value | The media style used for the converted PDF document. Please refer to values starting from fsdk.HTML2PDFSettingDataE_MediaStyleScreen and this should be one of these values. |
| fsdk.HTML2PDFSettingData.SetPage_height | ( | value | ) |
Set the page height used for the converted PDF document (unit is 1/72 inch).
This value minus the sum of the top and bottom margins must be bigger than 16.
| [in] | value | The page height used for the converted PDF document (unit is 1/72 inch). |
| fsdk.HTML2PDFSettingData.SetPage_margin | ( | value | ) |
Set the page margin used for converted PDF document.
| [in] | value | The page margin used for converted PDF document. |
| fsdk.HTML2PDFSettingData.SetPage_mode | ( | value | ) |
Set the page mode used for the converting.
| [in] | value | The page mode used for the converting. Please refer to values starting from fsdk.HTML2PDFSettingDataE_PageModeSinglePage and this should be one of these values. |
| fsdk.HTML2PDFSettingData.SetPage_width | ( | value | ) |
Set the page width used for the converted PDF document (unit is 1/72 inch).
This value minus the sum of the left and right margins must be bigger than 16.
| [in] | value | The page width used for the converted PDF document (unit is 1/72 inch). |
| fsdk.HTML2PDFSettingData.SetRotate_degrees | ( | value | ) |
Set the rotation degree used for the converted PDF page.
| [in] | value | The rotation degree used for the converted PDF page.Please refer to values starting from fsdk.E_Rotation0 and this should be one of these values. |
| fsdk.HTML2PDFSettingData.SetScaling_mode | ( | value | ) |
Set the scaling mode used for the converted PDF document.
| [in] | value | The scaling mode used for the converted PDF document. Please refer to values starting from fsdk.HTML2PDFSettingDataE_ScalingModeNone and this should be one of these values. |
| fsdk.HTML2PDFSettingData.SetTo_deny_local_file_access | ( | value | ) |
Set used to decide whether to deny local file access or not during converting html file.
true means that prevents the HTML file from accessing any local files outside of its own directory. false means that allows the HTML file to access to any local file paths. Default value: false.
| [in] | value | Used to decide whether to deny local file access or not during converting html file. It can not support on Linux x86 platform. |
| fsdk.HTML2PDFSettingData.SetTo_disable_sandbox | ( | value | ) |
Set used to decide whether to disable sandbox or not.
true means to disable sandbox, and false means not. Default: true.
| [in] | value | Used to decide whether to disable sandbox or not. |
| fsdk.HTML2PDFSettingData.SetTo_generate_bookmarks | ( | value | ) |
Set used to decide whether bookmarks should be generated or not.
| [in] | value | Used to decide whether bookmarks should be generated or not. |
| fsdk.HTML2PDFSettingData.SetTo_hide_footer | ( | value | ) |
Set used to decide whether to hide footer or not.
| [in] | value | Used to decide whether to hide footer or not. It can not support on Linux x86 platform. |
| fsdk.HTML2PDFSettingData.SetTo_hide_header | ( | value | ) |
Set used to decide whether to hide header or not.
| [in] | value | Used to decide whether to hide header or not. It can not support on Linux x86 platform. |
| fsdk.HTML2PDFSettingData.SetTo_load_active_content | ( | value | ) |
Set used to decide whether to load active content or not.
This parameter is useful for some optimized web pages. These web page will not load the entire content. When the user scrolls down the page, the contents of the web page will be loaded when they are displayed on the user screen. true means to load the active content that has not been loaded by the web page, and false means not. Default:false.
| [in] | value | Used to decide whether to load active content or not. |
| fsdk.HTML2PDFSettingData.SetTo_optimize_tag_tree | ( | value | ) |
Set used to decide whether to optimize tag tree or not.
| [in] | value | Used to decide whether to optimize tag tree or not. |
| fsdk.HTML2PDFSettingData.SetTo_print_background | ( | value | ) |
Set used to decide whether to print background or not.
| [in] | value | Used to decide whether to print background or not. |
| fsdk.HTML2PDFSettingData.SetTo_remove_underline_for_link | ( | value | ) |
Set used to decide whether to remove underline decoration for link.
| [in] | value | Used to decide whether to remove underline decoration for link. |
| fsdk.HTML2PDFSettingData.SetTo_render_images | ( | value | ) |
Set used to decide whether to render images or not.
| [in] | value | Used to decide whether to render images or not. |
| fsdk.HTML2PDFSettingData.SetTo_resize_objects | ( | value | ) |
Set whether to enable the Javascripts related resizing of the objects during rendering process.
| [in] | value | Whether to enable the Javascripts related resizing of the objects during rendering process. |
| fsdk.HTML2PDFSettingData.SetTo_set_headerfooter | ( | value | ) |
Set used to decide whether to set header-footer or not.
| [in] | value | Used to decide whether to set header-footer or not. |
| fsdk.HTML2PDFSettingData.SetTo_use_blacklist | ( | value | ) |
Set used to decide whether to use blacklist or not.
This parameter is useful for checking all accessed URLs during the HTML to the PDF conversion process.
During the conversion of specific URL, there could be many third-party websites that are accessed by the conversion process (images, CSS styles, requests from JavaScripts, and others).
All of these accesses will be checked against the blacklist record. There is a prepared switch that enables the blacklist functionality in the converter. true means to use the blacklist, and false means not. Default: false. Blacklist JSON is located next to the fxhtml2pdf application and its name must be "blacklist.json".It consist from three parts of records:
list of domains.
list of IPs.
list of IP ranges.
"blacklist.json" Examples:
{"Domains":[
"xxx.com",
"xxx.com"
]
,
"IPs":["1.2.3.4","5.6.7.8"]
,
"IPsegments":[{"16":["104.193.88.0","104.193.88.100"]},{"16":["20.0.0.1","20.0.0.10"]}]
}
| [in] | value | Used to decide whether to use blacklist or not. |