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.
Add this skill
npx mdskills install openai/pdfClear, actionable workflow for PDF generation and review with visual validation emphasis
1---2name: "pdf"3description: "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."4---567# PDF Skill89## When to use10- Read or review PDF content where layout and visuals matter.11- Create PDFs programmatically with reliable formatting.12- Validate final rendering before delivery.1314## Workflow151. Prefer visual review: render PDF pages to PNGs and inspect them.16 - Use `pdftoppm` if available.17 - If unavailable, install Poppler or ask the user to review the output locally.182. Use `reportlab` to generate PDFs when creating new documents.193. Use `pdfplumber` (or `pypdf`) for text extraction and quick checks; do not rely on it for layout fidelity.204. After each meaningful update, re-render pages and verify alignment, spacing, and legibility.2122## Temp and output conventions23- Use `tmp/pdfs/` for intermediate files; delete when done.24- Write final artifacts under `output/pdf/` when working in this repo.25- Keep filenames stable and descriptive.2627## Dependencies (install if missing)28Prefer `uv` for dependency management.2930Python packages:31```32uv pip install reportlab pdfplumber pypdf33```34If `uv` is unavailable:35```36python3 -m pip install reportlab pdfplumber pypdf37```38System tools (for rendering):39```40# macOS (Homebrew)41brew install poppler4243# Ubuntu/Debian44sudo apt-get install -y poppler-utils45```4647If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.4849## Environment50No required environment variables.5152## Rendering command53```54pdftoppm -png $INPUT_PDF $OUTPUT_PREFIX55```5657## Quality expectations58- Maintain polished visual design: consistent typography, spacing, margins, and section hierarchy.59- Avoid rendering issues: clipped text, overlapping elements, broken tables, black squares, or unreadable glyphs.60- Charts, tables, and images must be sharp, aligned, and clearly labeled.61- Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes.62- Citations and references must be human-readable; never leave tool tokens or placeholder strings.6364## Final checks65- Do not deliver until the latest PNG inspection shows zero visual or formatting defects.66- Confirm headers/footers, page numbering, and section transitions look polished.67- Keep intermediate files organized or remove them after final approval.68
Full transparency — inspect the skill content before installing.