openai-pdf
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePDF Skill
PDF 技能
When to use
适用场景
- Read or review PDF content where layout and visuals matter.
- Create PDFs programmatically with reliable formatting.
- Validate final rendering before delivery.
- 读取或审阅对布局和视觉效果有要求的PDF内容。
- 以编程方式创建格式可靠的PDF。
- 交付前验证最终渲染效果。
Workflow
工作流程
- Prefer visual review: render PDF pages to PNGs and inspect them.
- Use if available.
pdftoppm - If unavailable, install Poppler or ask the user to review the output locally.
- Use
- Use to generate PDFs when creating new documents.
reportlab - Use (or
pdfplumber) for text extraction and quick checks; do not rely on it for layout fidelity.pypdf - After each meaningful update, re-render pages and verify alignment, spacing, and legibility.
- 优先进行视觉审查:将PDF页面渲染为PNG格式并检查。
- 如果可用,使用。
pdftoppm - 如果不可用,安装Poppler或请用户在本地审阅输出结果。
- 如果可用,使用
- 创建新文档时,使用生成PDF。
reportlab - 使用(或
pdfplumber)进行文本提取和快速检查;不要依赖它来保证布局保真度。pypdf - 每次有意义的更新后,重新渲染页面并验证对齐方式、间距和可读性。
Temp and output conventions
临时文件与输出规范
- Use for intermediate files; delete when done.
tmp/pdfs/ - Write final artifacts under when working in this repo.
output/pdf/ - Keep filenames stable and descriptive.
- 使用存储中间文件;完成后删除。
tmp/pdfs/ - 在此仓库中工作时,将最终产物写入目录。
output/pdf/ - 保持文件名稳定且具有描述性。
Dependencies (install if missing)
依赖项(缺失时安装)
Prefer for dependency management.
uvPython packages:
uv pip install reportlab pdfplumber pypdfIf is unavailable:
uvpython3 -m pip install reportlab pdfplumber pypdfSystem tools (for rendering):
undefined优先使用进行依赖管理。
uvPython包:
uv pip install reportlab pdfplumber pypdf如果不可用:
uvpython3 -m pip install reportlab pdfplumber pypdf系统工具(用于渲染):
undefinedmacOS (Homebrew)
macOS(Homebrew)
brew install poppler
brew install poppler
Ubuntu/Debian
Ubuntu/Debian
sudo apt-get install -y poppler-utils
If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.sudo apt-get install -y poppler-utils
如果无法在此环境中安装,请告知用户缺失的依赖项以及本地安装方法。Environment
环境
No required environment variables.
无必需的环境变量。
Rendering command
渲染命令
pdftoppm -png $INPUT_PDF $OUTPUT_PREFIXpdftoppm -png $INPUT_PDF $OUTPUT_PREFIXQuality expectations
质量要求
- Maintain polished visual design: consistent typography, spacing, margins, and section hierarchy.
- Avoid rendering issues: clipped text, overlapping elements, broken tables, black squares, or unreadable glyphs.
- Charts, tables, and images must be sharp, aligned, and clearly labeled.
- Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes.
- Citations and references must be human-readable; never leave tool tokens or placeholder strings.
- 保持精致的视觉设计:一致的排版、间距、边距和章节层级。
- 避免渲染问题:文本被截断、元素重叠、表格破损、黑方块或无法识别的字形。
- 图表、表格和图像必须清晰、对齐且标注明确。
- 仅使用ASCII连字符。避免使用U+2011(非断字连字符)和其他Unicode破折号。
- 引用和参考文献必须易于人类阅读;切勿留下工具令牌或占位符字符串。
Final checks
最终检查
- Do not deliver until the latest PNG inspection shows zero visual or formatting defects.
- Confirm headers/footers, page numbering, and section transitions look polished.
- Keep intermediate files organized or remove them after final approval.
- 直到最新的PNG检查显示没有视觉或格式缺陷时再交付。
- 确认页眉/页脚、页码和章节过渡效果精致。
- 整理中间文件或在最终批准后删除它们。
When NOT to Use
不适用场景
<!-- TODO: review -->
<!-- TODO: 审阅 -->