The PDF skill equips Codex to work with PDF files at every stage: extracting text and structured content, generating new documents programmatically, editing existing files, and visually validating the final output. It usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/skills/llms.txt
Use this file to discover all available pages before exploring further.
reportlab for reliable PDF generation, pdfplumber and pypdf for extraction and inspection, and Poppler’s pdftoppm to render pages as PNGs for quality review. No OPENAI_API_KEY is required — this skill is entirely local.
When to trigger this skill
This skill activates when you ask Codex to:- Read or review PDF content where layout and visual presentation matter
- Extract text or data from an existing PDF (tables, paragraphs, form fields)
- Create a new PDF programmatically with controlled typography and layout
- Edit an existing PDF (add pages, modify content, fill forms)
- Rotate, merge, or split PDF pages
- Validate rendering before delivering a document to a user
Supported operations
Text extraction
Use
pdfplumber or pypdf to pull text, tables, and metadata. Note: extraction reflects text order, not visual layout fidelity.PDF creation
Use
reportlab to generate new documents with precise typography, spacing, margins, and section hierarchy.Editing & manipulation
Use
pypdf to merge documents, split pages, rotate pages, or copy pages across files.Visual rendering
Use
pdftoppm (Poppler) to render pages as PNGs and inspect layout, alignment, and legibility before delivery.Workflow
Prefer visual review first
Render PDF pages to PNGs with
pdftoppm and inspect them before and after any changes. Do not rely solely on text extraction for layout fidelity.Generate with reportlab
Use
reportlab when creating new PDFs to get reliable, deterministic formatting output.Extract with pdfplumber or pypdf
Use
pdfplumber for text and table extraction. Use pypdf for structural operations (merge, split, rotate).Re-render and verify
After each meaningful update, re-render pages and check alignment, spacing, and legibility.
Installing
Dependencies
Install Python libraries:pdftoppm rendering):
No
OPENAI_API_KEY is required for this skill. All operations run locally using Python libraries and system tools.Rendering command
$OUTPUT_PREFIX-1.png, $OUTPUT_PREFIX-2.png, …) for visual inspection.
File conventions
| Path | Purpose |
|---|---|
tmp/pdfs/ | Intermediate files during processing. Delete when done. |
output/pdf/ | Final PDF artifacts ready for delivery. |
Quality standards
Codex applies these quality checks before delivering any PDF:- Typography: consistent fonts, sizes, and weights throughout
- Spacing and margins: uniform padding and section separation
- Tables and charts: sharp, aligned, clearly labeled
- Text rendering: no clipped text, overlapping elements, black squares, or unreadable glyphs
- Character encoding: ASCII hyphens only — avoid U+2011 (non-breaking hyphen) and other Unicode dashes
- References and citations: human-readable — no tool tokens or placeholder strings
- Headers, footers, and page numbers: polished and consistent across all pages
Default prompt
Create, edit, or review this PDF and summarize the key output or changes.