pdf-studio
by @tobewin
Professional PDF document generator. Use when user needs to create reports, invoices, certificates, portfolios, or any publication-ready PDF. Supports images...
clawhub install pdf-studio📖 About This Skill
name: pdf-studio description: Professional PDF document generator. Use when user needs to create reports, invoices, certificates, portfolios, or any publication-ready PDF. Supports images, tables, charts, TOC, headers/footers, and cross-platform fonts. Generates print-quality PDFs. PDF文档生成、专业报告、发票制作。 version: 1.1.0 license: MIT-0 metadata: {"openclaw": {"emoji": "📑", "requires": {"bins": ["python3"]}}}
PDF Studio
Professional PDF document generator that creates publication-ready PDFs with perfect typography and layout.
Features
Trigger Conditions
Document Types
Business (商务)
Academic (学术)
Government (政府)
Personal (个人)
Step 1: Understand Requirements
请提供以下信息:文档类型:(报告/发票/证书/简历/其他)
纸张大小:(A4/Letter/A3/自定义)
方向:(纵向/横向)
页边距:(默认/自定义)
字体要求:(默认/指定字体)
语言:(中文/英文)
特殊要求:(水印/页眉页脚/目录等)
Step 2: Generate PDF
Recommended Libraries
PDF generation requires Python libraries. Users should install manually before use:
Basic PDF Generation
1. Install a PDF library (e.g., FPDF2) 2. Create document with pages 3. Add content (text, images, tables) 4. Output PDF file
HTML/CSS to PDF
1. Prepare HTML content 2. Apply CSS styles 3. Convert to PDF using library
Typography Settings (字体设置)
Cross-Platform Fonts
| Language | Serif | Sans | Mono | |----------|-------|------|------| | Chinese | Noto Serif SC | Noto Sans SC | Noto Sans Mono CJK SC | | English | Liberation Serif | Liberation Sans | Fira Code | | Japanese | Noto Serif JP | Noto Sans JP | Noto Sans Mono CJK JP |
Font Paths (for reference)
/System/Library/Fonts//usr/share/fonts/C:/Windows/Fonts/Page Layout (页面布局)
Standard Sizes
| Size | Dimensions (mm) | Use Case | |------|-----------------|----------| | A4 | 210 × 297 | Standard documents | | Letter | 216 × 279 | US documents | | A3 | 297 × 420 | Large reports |
Margin Presets
| Preset | Top/Bottom | Left/Right | |--------|------------|------------| | Normal | 2.54cm | 2.54cm | | Narrow | 1.27cm | 1.27cm | | Wide | 2.54cm | 5.08cm |
Error Handling
字体缺失 → 使用开源字体回退
图片格式不支持 → 转换为PNG/JPEG
内存不足 → 分页处理大文档
生成失败 → 输出HTML备选