Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

PDFtk

$ pdftk Community Low Risk
pdftk-java · AI & Media · GPL-2.0-or-later · macos / linux / windows

pdftk (pdftk-java) is the actively maintained Java port of the classic PDF Toolkit. It handles page assembly (cat), splitting (burst), metadata/form-field dumping (dump_data, dump_data_fields), and AcroForm filling (fill_form) with simple positional keywords.

FCRS-1.0 Score
72 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install pdftk-java
CLI vs MCP Decision CLI Only

AcroForm inspection (dump_data_fields) and page concatenation (cat) work directly on local files without MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 15 / 25

Non-interactive keyword-driven CLI, but outputs custom key-value blocks (InfoBegin/FieldName) instead of JSON and has no --dry-run.

  • dump_data_utf8 emits line-oriented key-value text, not JSON
  • Positional keywords (cat, output) differ from standard --flag conventions
Trust & Safety 19 / 25

Refuses to overwrite input files in-place (output must differ from inputs), though burst writes multiple pg_XXXX.pdf files into CWD if unconfigured.

  • Prevents direct input-file overwrite; burst writes files to CWD by default
Setup & Portability 11 / 15

Cross-platform via brew install pdftk-java and Linux packages, but requires a Java Runtime Environment (JRE) with JVM startup latency.

  • Depends on Java runtime (openjdk) for execution
Utility & Efficiency 13 / 15

One of the few lightweight CLIs with clean AcroForm inspection (dump_data_fields_utf8) and FDF/XFDF form filling (fill_form).

  • Supports form filling, stamping, rotation, and page ranges
Maintenance & Lineage 7 / 10

Community-maintained Java fork (pdftk-java) that revived abandoned native PDFtk Server on modern systems.

  • Active pdftk-java/pdftk repository on GitLab
Docs & Verifiability 7 / 10

Clear README and pdftk --help examples, though non-standard keyword grammar requires consulting examples.

  • Built-in pdftk --help and GitLab documentation

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; optional input_pw keyword reads local PDF passwords inline.

Side Effects
Read-Only Local Write
Cost & Quotas

Free GPL-2.0-or-later open-source Java CLI.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# PDFtk (pdftk) Agent Rules
- Always verify target output paths; `pdftk` rejects overwriting an input file directly but will overwrite distinct `output` files.
- Use `dump_data_utf8` and `dump_data_fields_utf8` to avoid ASCII escaping on non-English PDFs.

Agent-Ready Command Recipes

Safe Read-Only Queries

Dump PDF metadata and page count
pdftk input.pdf dump_data_utf8

Prints key-value document metadata, bookmarks, and page counts to stdout.

List fillable AcroForm fields
pdftk form.pdf dump_data_fields_utf8

Outputs field names, types, and current values for programmatic form filling.

Controlled Writes & Previews

Concatenate two PDFs into a new file
pdftk a.pdf b.pdf cat output merged.pdf

Combines a.pdf and b.pdf sequentially into merged.pdf without modifying inputs.

Strengths for Agents

  • + Reliable AcroForm inspection (dump_data_fields_utf8) and filling (fill_form).
  • + Simple handle syntax (A=a.pdf B=b.pdf cat A1-3 B2 output out.pdf) for selective page assembly.

Caveats & Pitfalls

  • ! Requires a JVM/JRE runtime, adding startup overhead compared to qpdf or mutool.
  • ! Outputs InfoKey/FieldName stanzas rather than JSON; burst writes pg_*.pdf to the working directory unless an output pattern is given.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI