28 using namespace common;
30 namespace conversion {
43 , margin_bottom(72.0f)
46 , base_font_size(10.0f)
47 , is_embed_font(false)
48 , style_config_path(L
"") {}
65 float margin_top,
float margin_bottom,
66 float margin_left,
float margin_right,
68 const wchar_t* custom_font_path,
const wchar_t* style_config_path,
70 this->page_width = page_width;
71 this->page_height = page_height;
72 this->margin_top = margin_top;
73 this->margin_bottom = margin_bottom;
74 this->margin_left = margin_left;
75 this->margin_right = margin_right;
76 this->base_font_size = base_font_size;
77 this->custom_font_path = custom_font_path;
78 this->style_config_path = style_config_path;
79 this->is_embed_font = is_embed_font;
119 void Set(
float page_width,
float page_height,
120 float margin_top,
float margin_bottom,
121 float margin_left,
float margin_right,
122 float base_font_size,
123 const wchar_t* custom_font_path,
124 const wchar_t* style_config_path,
125 bool is_embed_font) {
126 this->page_width = page_width;
127 this->page_height = page_height;
128 this->margin_top = margin_top;
129 this->margin_bottom = margin_bottom;
130 this->margin_left = margin_left;
131 this->margin_right = margin_right;
132 this->base_font_size = base_font_size;
133 this->custom_font_path = custom_font_path;
134 this->style_config_path = style_config_path;
135 this->is_embed_font = is_embed_font;
241 static bool ConvertFromMarkdown(
const wchar_t* src_markdown_file_path,
const wchar_t* src_file_password,
const wchar_t* saved_pdf_path,
const Md2PDFSettingData& setting_data);
248 #endif // FS_MD2PDF_H_ float page_height
页面高度,单位:点。默认值:792。必须大于 0。
Definition: fs_md2pdf.h:142
float margin_left
左边距,单位:点。默认值:72。必须大于或等于 0,且左、右边距之和必须小于页面宽度。
Definition: fs_md2pdf.h:151
WString style_config_path
JSON 样式配置文件路径。
Definition: fs_md2pdf.h:218
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:145
Definition: fs_md2pdf.h:36
WString custom_font_path
TrueType 字体文件路径,用于 CJK 或自定义字体支持。
Definition: fs_md2pdf.h:169
宽字符串类
Definition: fx_string.h:1457
float margin_bottom
下边距,单位:点。默认值:72。必须大于或等于 0,且上、下边距之和必须小于页面高度。
Definition: fs_md2pdf.h:148
Md2PDFSettingData(float page_width, float page_height, float margin_top, float margin_bottom, float margin_left, float margin_right, float base_font_size, const wchar_t *custom_font_path, const wchar_t *style_config_path, bool is_embed_font)
带参数的构造函数。
Definition: fs_md2pdf.h:64
float margin_top
上边距,单位:点。默认值:72。必须大于或等于 0,且上、下边距之和必须小于页面高度。
Definition: fs_md2pdf.h:145
Definition: fs_md2pdf.h:229
void Set(float page_width, float page_height, float margin_top, float margin_bottom, float margin_left, float margin_right, float base_font_size, const wchar_t *custom_font_path, const wchar_t *style_config_path, bool is_embed_font)
设置值。
Definition: fs_md2pdf.h:119
Definition: fs_basictypes.h:238
float margin_right
右边距,单位:点。默认值:72。必须大于或等于 0,且左、右边距之和必须小于页面宽度。
Definition: fs_md2pdf.h:154
float base_font_size
正文基础字号,单位:点。默认值:10。
Definition: fs_md2pdf.h:161
bool is_embed_font
是否将字体数据嵌入输出 PDF。默认值:false。
Definition: fs_md2pdf.h:223
float page_width
页面宽度,单位:点。默认值:612。必须大于 0。
Definition: fs_md2pdf.h:139
Foxit 命名空间。
Definition: fs_basictypes.h:124
Md2PDFSettingData()
构造函数。
Definition: fs_md2pdf.h:39