跳到正文
Skillpedia
PDF、Word 与幻灯片28k · #9859

pdf

它能做什么

这项技能帮助处理 PDF 文件,包括制作新文件和检查其外观。适合需要准确生成或读取 PDF、并确保版式正确的人。

适用场景

  • ✓当你想创建一份格式可靠的新 PDF 的时候。
  • ✓当你需要阅读或审阅一份版式和视觉效果很重要的 PDF 时。
  • ✓当你想在发送前,先从视觉上检查一份完成的 PDF 的时候。

技能链接

https://github.com/openai/skills/blob/main/skills/.curated/pdf/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openai/skills/blob/main/skills/.curated/pdf/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我把这份报告做成一页的 PDF 摘要,并在发送之前检查版式是否正确。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体把 PDF 页面渲染成图片进行检查,使用 Python 工具生成或提取内容,并对每次修改重新检查,直到版式看起来正确。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

PDF Skill

When to use

  • Read or review PDF content where layout and visuals matter.
  • Create PDFs programmatically with reliable formatting.
  • Validate final rendering before delivery.

Workflow

  1. Prefer visual review: render PDF pages to PNGs and inspect them.
    • Use pdftoppm if available.
    • If unavailable, install Poppler or ask the user to review the output locally.
  2. Use reportlab to generate PDFs when creating new documents.
  3. Use pdfplumber (or pypdf) for text extraction and quick checks; do not rely on it for layout fidelity.
  4. After each meaningful update, re-render pages and verify alignment, spacing, and legibility.

Temp and output conventions

  • Use tmp/pdfs/ for intermediate files; delete when done.
  • Write final artifacts under output/pdf/ when working in this repo.
  • Keep filenames stable and descriptive.

Dependencies (install if missing)

Prefer uv for dependency management.

Python packages:

uv pip install reportlab pdfplumber pypdf

If uv is unavailable:

python3 -m pip install reportlab pdfplumber pypdf

System tools (for rendering):

# macOS (Homebrew)
brew install poppler

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

Environment

No required environment variables.

Rendering command

pdftoppm -png $INPUT_PDF $OUTPUT_PREFIX

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

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.
常见问题

它使用哪些工具?

它依赖 Python 工具,例如 reportlab、pdfplumber 和 pypdf,还需要 Poppler 来渲染页面。

只提取文字足以检查 PDF 吗?

不够。该技能指出文字提取无法可靠反映版式,因此会把页面渲染出来进行视觉检查。

我需要安装什么吗?

有些工具可能需要安装,包括用于渲染的 Poppler。该技能会在缺少时告诉你。

详情

作者的原始描述

Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as `reportlab`, `pdfplumber`, and `pypdf` for generation and extraction.

repo: openai/skills

热度

GitHub 星标
28k
排名
#9859
许可证
—
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能