|
Foxit PDF Conversion SDK
|
Public Member Functions | |
| Md2PDFSettingData () | |
| Constructor. | |
| Md2PDFSettingData (float page_width, float page_height, float margin_top, float margin_bottom, float margin_left, float margin_right, float base_font_size, String custom_font_path, String style_config_path, boolean is_embed_font) | |
| Constructor, with parameters. More... | |
| synchronized void | delete () |
| Clean up related C++ resources immediately. More... | |
| float | getBase_font_size () |
| Get base font size in points for body text. More... | |
| String | getCustom_font_path () |
| Get path to a TrueType font file for CJK or custom font support. More... | |
| boolean | getIs_embed_font () |
| Get whether to embed font data in the output PDF. More... | |
| float | getMargin_bottom () |
| Get bottom margin in points. More... | |
| float | getMargin_left () |
| Get left margin in points. More... | |
| float | getMargin_right () |
| Get right margin in points. More... | |
| float | getMargin_top () |
| Get top margin in points. More... | |
| float | getPage_height () |
| Get page height in points. More... | |
| float | getPage_width () |
| Get page width in points. More... | |
| String | getStyle_config_path () |
| Get path to a JSON style configuration file. More... | |
| void | set (float page_width, float page_height, float margin_top, float margin_bottom, float margin_left, float margin_right, float base_font_size, String custom_font_path, String style_config_path, boolean is_embed_font) |
| Set value. More... | |
| void | setBase_font_size (float value) |
| Set base font size in points for body text. More... | |
| void | setCustom_font_path (String value) |
| Set path to a TrueType font file for CJK or custom font support. More... | |
| void | setIs_embed_font (boolean value) |
| Set whether to embed font data in the output PDF. More... | |
| void | setMargin_bottom (float value) |
| Set bottom margin in points. More... | |
| void | setMargin_left (float value) |
| Set left margin in points. More... | |
| void | setMargin_right (float value) |
| Set right margin in points. More... | |
| void | setMargin_top (float value) |
| Set top margin in points. More... | |
| void | setPage_height (float value) |
| Set page height in points. More... | |
| void | setPage_width (float value) |
| Set page width in points. More... | |
| void | setStyle_config_path (String 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.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.Md2PDFSettingData | ( | float | page_width, |
| float | page_height, | ||
| float | margin_top, | ||
| float | margin_bottom, | ||
| float | margin_left, | ||
| float | margin_right, | ||
| float | base_font_size, | ||
| String | custom_font_path, | ||
| String | style_config_path, | ||
| boolean | is_embed_font | ||
| ) |
Constructor, with parameters.
| [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. Default value: 10. |
| [in] | custom_font_path | Path to a TrueType font file for CJK or custom font support. Empty string means use standard PDF fonts. |
| [in] | style_config_path | Path to a JSON style configuration file. |
| [in] | is_embed_font | Whether to embed font data in the output PDF. Default value: false. |
| synchronized void com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.delete | ( | ) |
Clean up related C++ resources immediately.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getBase_font_size | ( | ) |
Get base font size in points for body text.
Heading sizes are calculated as multiples of this value.
| com.foxit.sdk.conversion.md2pdf.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.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getIs_embed_font | ( | ) |
Get whether to embed font data in the output PDF.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getMargin_bottom | ( | ) |
Get bottom margin in points.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getMargin_left | ( | ) |
Get left margin in points.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getMargin_right | ( | ) |
Get right margin in points.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getMargin_top | ( | ) |
Get top margin in points.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getPage_height | ( | ) |
Get page height in points.
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.getPage_width | ( | ) |
Get page width in points.
| com.foxit.sdk.conversion.md2pdf.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:
| void com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.set | ( | float | page_width, |
| float | page_height, | ||
| float | margin_top, | ||
| float | margin_bottom, | ||
| float | margin_left, | ||
| float | margin_right, | ||
| float | base_font_size, | ||
| String | custom_font_path, | ||
| String | style_config_path, | ||
| boolean | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setBase_font_size | ( | float | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setCustom_font_path | ( | String | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setIs_embed_font | ( | boolean | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setMargin_bottom | ( | float | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setMargin_left | ( | float | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setMargin_right | ( | float | 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. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setMargin_top | ( | float | 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: |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setPage_height | ( | float | value | ) |
Set page height in points.
| [in] | value | Page height in points. The value must be greater than 0. Default value: 792. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setPage_width | ( | float | value | ) |
Set page width in points.
| [in] | value | Page width in points. The value must be greater than 0. Default value: 612. |
| com.foxit.sdk.conversion.md2pdf.Md2PDFSettingData.setStyle_config_path | ( | String | 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. |