Back to the collection
pdf·Productivity

Extract, organize, and fill PDF files with the pdf skill

On this page

The pdf skill covers text and table extraction, page merging and splitting, file creation, and form filling. First identify the kind of input: selectable text, scanned images, or a form with interactive fields. The same extension can hide very different structures. Repeating text extraction on an image-only scan will not recover its contents.

Install and invoke

Send these two commands in the Claude Code chat input, one at a time. They are plugin commands, not shell commands for your operating system. The second installs the official collection containing pdf.

Prompt
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills

In your project conversation, ask Claude to “use pdf” and supply the task or files. The prompt below is an editable starting example. Installing the collection supplies instructions and resources; it does not supply your source material or guarantee that every runtime dependency is installed locally. If the skill is missing, check that its plugin is installed, enabled, and loaded in the current session. Do that before troubleshooting the requested output.

Limit the first task to a clear range

Prompt
Use pdf on pages 3 through 8 of report.pdf.
Check for a text layer, then extract the expense tables.
Preserve column headings, currencies, and source page numbers.
Save CSV data and list uncertain cells separately.
Also export those six pages to excerpt.pdf without changing the original.

Page ranges, desired fields, and output formats make the result easier to inspect than a request to analyze an entire file. Text documents can use pypdf or pdfplumber. Check repeated headers, merged cells, and blank rows after table extraction. Scans require image conversion and OCR, followed by comparison with the original for important numbers and punctuation.

Describe page numbers as a reader sees them and have the agent confirm the selected range before splitting or merging. This avoids confusion with zero-based program indexes. Check the final page count, order, and orientation. Rotation, watermarks, and encryption are supported task types, but should be explicitly requested.

Treat forms according to their structure

A useful second task is: “Use pdf to fill application.pdf. First map the fields to my supplied information and leave missing values blank.” For interactive forms, inspect field IDs, page numbers, control types, and available choices before writing values. Checkboxes and radio buttons can use different internal values for their selected state.

Flat forms need text positioned over the page. The supplementary guide separates structural coordinate extraction from visual estimation, then validates placement boxes before filling. PDF coordinates and image pixels are different systems. Mixing them can shift every answer away from its intended field. Render the completed file again to inspect names, dates, check marks, and long answers.

If generated pages contain black squares, check font coverage. The skill specifically recommends ReportLab markup for subscripts and superscripts rather than unsupported Unicode glyphs in built-in fonts. Completion means the file opens, its pages and data match the request, and uncertain values remain visible for review. A successful save operation alone is insufficient.

Keep a location for every extracted value

For a long annual report, request metric, value, unit, page number, and source table title, not just a column of numbers. If a figure appears in narrative text, a table, and a note, preserve context before choosing the right definition. Extracted tables can shift rows or columns and misread thousands separators or parenthesized negatives. Test the method on difficult pages before applying it to the whole file, especially when the results will feed a spreadsheet or article.

Check CJK text in the recipient’s viewer

One Japanese PDF displayed in Chrome and Poppler but lost its Japanese glyphs in Windows Acrobat while Latin text and shapes remained. A local preview therefore cannot prove the recipient can read the file. For CJK deliverables, inspect body text, bold text, and tables in the intended viewer. If fonts fail, try a compatible font or export path while preserving searchable text; rasterizing every page is a last resort.

How did your first task go?

These choices help us understand where readers get stuck through site analytics. Blocking analytics may prevent delivery; use email for a specific issue.

References

  1. pdf — SKILL.mdAnthropic
  2. anthropics/skills READMEAnthropic
  3. Anthropic Agent Skills marketplaceAnthropic
  4. PDF forms workflowAnthropic
  5. pdf skill: generated Japanese (CJK) PDFs show blank/missing text in Adobe Acrobat — embedded Noto Sans JP CID/CFF subset not renderedjmylot
Found outdated or incorrect information? Let us know