render_pdf
Convert structured resume data into a styled PDF by applying a Jinja2 HTML template and WeasyPrint, then return the absolute file path of the generated document.
Instructions
用 Jinja2 HTML 模板 + WeasyPrint 把结构化简历渲染为 PDF,返回文件绝对路径。
什么时候该调用
用户确认 merge 结果(可用 diff_resume_versions)之后,作为工作流最后一步。
模板
modern:单栏宽松(默认)compact:双栏紧凑(左轨联系/技能/教育,右栏工作/项目)未知名称 →
error_code=template_not_found(列出可用模板,不静默回退)
注意
中文字体栈含微软雅黑 / Noto Sans SC。
默认写到 managed 临时目录(TTL 清理);显式
output_path不自动删除。Windows 上 WeasyPrint 依赖 GTK/Pango/Cairo;导入失败 →
render_failed。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resume_data": "<resume_data>"
},
"name": "render_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | No | modern | |
| output_path | No | ||
| resume_data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||