Foxit PDF SDK
fsdk.Md2PDFSettingData Class Reference

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...
 

Detailed Description

This class represents setting data used for converting Markdown format files to PDF format files.

Member Function Documentation

◆ GetBase_font_size()

fsdk.Md2PDFSettingData.GetBase_font_size ( )

Get base font size in points for body text.

Heading sizes are calculated as multiples of this value.

Returns
Base font size in points for body text. Default value: 10.

◆ GetCustom_font_path()

fsdk.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.

Returns
Path to a TrueType font file for CJK or custom font support.

◆ GetIs_embed_font()

fsdk.Md2PDFSettingData.GetIs_embed_font ( )

Get whether to embed font data in the output PDF.

Returns
Whether to embed font data in the output PDF. Default value: false.

◆ GetMargin_bottom()

fsdk.Md2PDFSettingData.GetMargin_bottom ( )

Get bottom margin in points.

Returns
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.

◆ GetMargin_left()

fsdk.Md2PDFSettingData.GetMargin_left ( )

Get left margin in points.

Returns
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.

◆ GetMargin_right()

fsdk.Md2PDFSettingData.GetMargin_right ( )

Get right margin in points.

Returns
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.

◆ GetMargin_top()

fsdk.Md2PDFSettingData.GetMargin_top ( )

Get top margin in points.

Returns
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:

◆ GetPage_height()

fsdk.Md2PDFSettingData.GetPage_height ( )

Get page height in points.

Returns
Page height in points. The value must be greater than 0. Default value: 792.

◆ GetPage_width()

fsdk.Md2PDFSettingData.GetPage_width ( )

Get page width in points.

Returns
Page width in points. The value must be greater than 0. Default value: 612.

◆ GetStyle_config_path()

fsdk.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).

Returns
Path to a JSON style configuration file.

◆ Set()

def fsdk.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.

Parameters
[in]page_widthPage width in points. The value must be greater than 0. Default value: 612.
[in]page_heightPage height in points. The value must be greater than 0. Default value: 792.
[in]margin_topTop 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_bottomBottom 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_leftLeft 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_rightRight 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_sizeBase font size in points for body text.
[in]custom_font_pathPath to a TrueType font file for CJK or custom font support.
[in]style_config_pathPath to a JSON style configuration file.
[in]is_embed_fontWhether to embed font data in the output PDF.
Returns
None.

◆ SetBase_font_size()

fsdk.Md2PDFSettingData.SetBase_font_size (   value)

Set base font size in points for body text.

Heading sizes are calculated as multiples of this value.

Parameters
[in]valueBase font size in points for body text. Default value: 10.
Returns
None.

◆ SetCustom_font_path()

fsdk.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.

Parameters
[in]valuePath to a TrueType font file for CJK or custom font support.
Returns
None.

◆ SetIs_embed_font()

fsdk.Md2PDFSettingData.SetIs_embed_font (   value)

Set whether to embed font data in the output PDF.

Parameters
[in]valueWhether to embed font data in the output PDF. Default value: false.
Returns
None.

◆ SetMargin_bottom()

fsdk.Md2PDFSettingData.SetMargin_bottom (   value)

Set bottom margin in points.

Parameters
[in]valueBottom 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.
Returns
None.

◆ SetMargin_left()

fsdk.Md2PDFSettingData.SetMargin_left (   value)

Set left margin in points.

Parameters
[in]valueLeft 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.
Returns
None.

◆ SetMargin_right()

fsdk.Md2PDFSettingData.SetMargin_right (   value)

Set right margin in points.

Parameters
[in]valueRight 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.
Returns
None.

◆ SetMargin_top()

fsdk.Md2PDFSettingData.SetMargin_top (   value)

Set top margin in points.

Parameters
[in]valueTop 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:
Returns
None.

◆ SetPage_height()

fsdk.Md2PDFSettingData.SetPage_height (   value)

Set page height in points.

Parameters
[in]valuePage height in points. The value must be greater than 0. Default value: 792.
Returns
None.

◆ SetPage_width()

fsdk.Md2PDFSettingData.SetPage_width (   value)

Set page width in points.

Parameters
[in]valuePage width in points. The value must be greater than 0. Default value: 612.
Returns
None.

◆ SetStyle_config_path()

fsdk.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).

Parameters
[in]valuePath to a JSON style configuration file.
Returns
None.