|
Foxit PDF Conversion SDK
|
Public Member Functions | |
| def | GetBase_font_size () |
| Get base font size in points for body text. More... | |
| def | GetCustom_font_path () |
| Get path to a TrueType font file for CJK or custom font support. More... | |
| def | GetIs_embed_font () |
| Get whether to embed font data in the output PDF. More... | |
| def | GetMargin_bottom () |
| Get bottom margin in points. More... | |
| def | GetMargin_left () |
| Get left margin in points. More... | |
| def | GetMargin_right () |
| Get right margin in points. More... | |
| def | GetMargin_top () |
| Get top margin in points. More... | |
| def | GetPage_height () |
| Get page height in points. More... | |
| def | GetPage_width () |
| Get page width in points. More... | |
| def | GetStyle_config_path () |
| Get path to a JSON style configuration file. More... | |
| def | Set (page_width, page_height, margin_top, margin_bottom, margin_left, margin_right, base_font_size, custom_font_path, style_config_path, is_embed_font) |
| Set value. More... | |
| def | SetBase_font_size (value) |
| Set base font size in points for body text. More... | |
| def | SetCustom_font_path (value) |
| Set path to a TrueType font file for CJK or custom font support. More... | |
| def | SetIs_embed_font (value) |
| Set whether to embed font data in the output PDF. More... | |
| def | SetMargin_bottom (value) |
| Set bottom margin in points. More... | |
| def | SetMargin_left (value) |
| Set left margin in points. More... | |
| def | SetMargin_right (value) |
| Set right margin in points. More... | |
| def | SetMargin_top (value) |
| Set top margin in points. More... | |
| def | SetPage_height (value) |
| Set page height in points. More... | |
| def | SetPage_width (value) |
| Set page width in points. More... | |
| def | SetStyle_config_path (value) |
| Set path to a JSON style configuration file. More... | |
This class represents setting data used for converting Markdown format files to PDF format files.
| fpdfconversionsdk.Md2PDFSettingData.GetBase_font_size | ( | ) |
Get base font size in points for body text.
Heading sizes are calculated as multiples of this value.
| fpdfconversionsdk.Md2PDFSettingData.GetCustom_font_path | ( | ) |
Get path to a TrueType font file for CJK or custom font support.
When not empty, the specified font will be used for text rendering. Default value: empty string.
| fpdfconversionsdk.Md2PDFSettingData.GetIs_embed_font | ( | ) |
Get whether to embed font data in the output PDF.
| fpdfconversionsdk.Md2PDFSettingData.GetMargin_bottom | ( | ) |
Get bottom margin in points.
| fpdfconversionsdk.Md2PDFSettingData.GetMargin_left | ( | ) |
Get left margin in points.
| fpdfconversionsdk.Md2PDFSettingData.GetMargin_right | ( | ) |
Get right margin in points.
| fpdfconversionsdk.Md2PDFSettingData.GetMargin_top | ( | ) |
Get top margin in points.
| fpdfconversionsdk.Md2PDFSettingData.GetPage_height | ( | ) |
Get page height in points.
| fpdfconversionsdk.Md2PDFSettingData.GetPage_width | ( | ) |
Get page width in points.
| fpdfconversionsdk.Md2PDFSettingData.GetStyle_config_path | ( | ) |
Get path to a JSON style configuration file.
When not empty, per-element font/size/color/bold/italic/line_spacing settings are loaded from the specified JSON file. Default value: empty string (built-in defaults apply).
Supported JSON keys per element object (h1-h6, paragraph, code_block, block_quote, list_item, table_cell):
"font_size" : float, point size (e.g. 14.0)
"bold" : bool
"italic" : bool
"color_r/g/b" : float 0.0-1.0, RGB components
"line_spacing" : float 0.5-5.0, line-height multiplier
"space_before" : float 0.0-10.0, spacing before the block as a multiple of font_size. Only effective for heading elements (h1-h6); ignored for other element types.
"space_after" : float 0.0-10.0, spacing after the block as a multiple of font_size.
Example JSON file content:
| def fpdfconversionsdk.Md2PDFSettingData.Set | ( | page_width, | |
| page_height, | |||
| margin_top, | |||
| margin_bottom, | |||
| margin_left, | |||
| margin_right, | |||
| base_font_size, | |||
| custom_font_path, | |||
| style_config_path, | |||
| is_embed_font | |||
| ) |
Set value.
| [in] | page_width | Page width in points. The value must be greater than 0. Default value: 612. |
| [in] | page_height | Page height in points. The value must be greater than 0. Default value: 792. |
| [in] | margin_top | Top margin in points. The value must be greater than or equal to 0. The sum of top and bottom margins must be less than page height.\ Default value: 72. |
| [in] | margin_bottom | Bottom margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of top and bottom margins must be less than page height. |
| [in] | margin_left | Left margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of left and right margins must be less than page width. |
| [in] | margin_right | Right margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of left and right margins must be less than page width. |
| [in] | base_font_size | Base font size in points for body text. |
| [in] | custom_font_path | Path to a TrueType font file for CJK or custom font support. |
| [in] | style_config_path | Path to a JSON style configuration file. |
| [in] | is_embed_font | Whether to embed font data in the output PDF. |
| fpdfconversionsdk.Md2PDFSettingData.SetBase_font_size | ( | value | ) |
Set base font size in points for body text.
Heading sizes are calculated as multiples of this value.
| [in] | value | Base font size in points for body text. Default value: 10. |
| fpdfconversionsdk.Md2PDFSettingData.SetCustom_font_path | ( | value | ) |
Set path to a TrueType font file for CJK or custom font support.
When not empty, the specified font will be used for text rendering. Default value: empty string.
| [in] | value | Path to a TrueType font file for CJK or custom font support. |
| fpdfconversionsdk.Md2PDFSettingData.SetIs_embed_font | ( | value | ) |
Set whether to embed font data in the output PDF.
| [in] | value | Whether to embed font data in the output PDF. Default value: false. |
| fpdfconversionsdk.Md2PDFSettingData.SetMargin_bottom | ( | value | ) |
Set bottom margin in points.
| [in] | value | Bottom margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of top and bottom margins must be less than page height. |
| fpdfconversionsdk.Md2PDFSettingData.SetMargin_left | ( | value | ) |
Set left margin in points.
| [in] | value | Left margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of left and right margins must be less than page width. |
| fpdfconversionsdk.Md2PDFSettingData.SetMargin_right | ( | value | ) |
Set right margin in points.
| [in] | value | Right margin in points. Default value: 72. The value must be greater than or equal to 0. The sum of left and right margins must be less than page width. |
| fpdfconversionsdk.Md2PDFSettingData.SetMargin_top | ( | value | ) |
Set top margin in points.
| [in] | value | Top margin in points. The value must be greater than or equal to 0. The sum of top and bottom margins must be less than page height.\ Default value: |
| fpdfconversionsdk.Md2PDFSettingData.SetPage_height | ( | value | ) |
Set page height in points.
| [in] | value | Page height in points. The value must be greater than 0. Default value: 792. |
| fpdfconversionsdk.Md2PDFSettingData.SetPage_width | ( | value | ) |
Set page width in points.
| [in] | value | Page width in points. The value must be greater than 0. Default value: 612. |
| fpdfconversionsdk.Md2PDFSettingData.SetStyle_config_path | ( | value | ) |
Set path to a JSON style configuration file.
When not empty, per-element font/size/color/bold/italic/line_spacing settings are loaded from the specified JSON file. Default value: empty string (built-in defaults apply).
Supported JSON keys per element object (h1-h6, paragraph, code_block, block_quote, list_item, table_cell):
"font_size" : float, point size (e.g. 14.0)
"bold" : bool
"italic" : bool
"color_r/g/b" : float 0.0-1.0, RGB components
"line_spacing" : float 0.5-5.0, line-height multiplier
"space_before" : float 0.0-10.0, spacing before the block as a multiple of font_size. Only effective for heading elements (h1-h6); ignored for other element types.
"space_after" : float 0.0-10.0, spacing after the block as a multiple of font_size.
Example JSON file content:
| [in] | value | Path to a JSON style configuration file. |