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

Poppler (pdftotext)

$ pdftotext Foundation Low Risk
freedesktop.org · AI & Media · GPL-2.0-or-later · macos / linux / windows

Poppler's pdftotext extracts plain, layout-preserved (-layout), TSV (-tsv), or bounding-box HTML (-bbox) text from PDFs directly to stdout (-). Paired with pdfinfo for metadata and pdftoppm for rasterizing pages, it provides deterministic local PDF parsing for AI agents.

FCRS-1.0 Score
84 /100
Good
High Confidence
Zero-Friction Install
brew install poppler
CLI vs MCP Decision CLI Only

Local PDF text extraction with pdftotext -layout and pdfinfo runs in milliseconds without uploading documents to an MCP server.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
I/O Error: Couldn't open file '--version': No such file or directory.
Startup
27 ms
Exit Codes (help / invalid)
0 / 1
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
pdftotext version 26.08.0
Copyright 2005-2026 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011, 2022 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
  -f <int>                : first page to convert
  -l <int>                : last page to convert
  -r <fp>                 : resolution, in DPI (default is 72)
  -x <int>                : x-coordinate of the crop area top left corner
  -y <int>                : y-coordinate of the crop area top left corner
  -W <int>                : width of crop area in pixels (default is 0)
  -H <int>                : height of crop area in pixels (default is 0)
  -layout                 : maintain original physical layout
  -fixed <fp>             : assume fixed-pitch (or tabular) text
  -raw                    : keep strings in content stream order
  -remove-hyphens <string>: end-of-line hyphen handling: none, soft, or all (default: all)
  -nodiag                 : discard diagonal text
  -htmlmeta               : generate a simple HTML file, including the meta information
  -tsv                    : generate a simple TSV file, including the meta information for bounding boxes
  -enc <string>           : output text encoding name
  -listenc                : list available encodings
  -eol <string>           : output end-of-line convention (unix, dos, or mac)
  -nopgbrk                : don't insert page breaks between pages
  -bbox                   : output bounding box for each word and page size to html. Sets -htmlmeta
  -bbox-layout            : like -bbox but with extra layout bounding box data.  Sets -htmlmeta
  -cropbox                : use the crop box rather than media box
  -colspacing <fp>        : how much spacing we allow after a word before considering adjacent text to be a new column, as a fraction of the font size (default is 0.7, old releases had a 0.3 default)
  -opw <string>           : owner password (for encrypted files)
  -upw <string>           : user password (for encrypted files)
  -q                      : don't print any messages or errors
  -v                      : print copyright and version info
  -h                      : print usage information
  -help                   : print usage information
  --help                  : print usage information
  -?                      : print usage information

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Deterministic non-interactive execution with - stdout streaming, -tsv tabular output, and -q quiet mode, though it lacks native --json output.

  • Supports -layout, -tsv, -bbox, -q, and - stdout streaming
  • No native --json output flag
Trust & Safety 22 / 25

Read-only by default when writing to stdout (-), never mutates input PDFs, and supports -f/-l page slicing.

  • Writing to - performs zero filesystem mutations
Setup & Portability 14 / 15

Pre-packaged across Homebrew (poppler), Linux distros (poppler-utils), and Windows builds with instant C++ startup.

  • Available via brew install poppler and standard OS repositories
Utility & Efficiency 14 / 15

Single package delivers pdftotext, pdfinfo, pdftoppm, and pdfimages covering nearly all local PDF inspection tasks.

  • Includes text extraction, metadata, image extraction, and page rendering
Maintenance & Lineage 9 / 10

Long-standing freedesktop.org project maintained actively across major Linux and macOS ecosystems.

  • Maintained under freedesktop.org Poppler project
Docs & Verifiability 6 / 10

Clear -h flag summary and man pages, though flags use legacy single-dash style (-layout, -nopgbrk) rather than GNU --long flags.

  • Built-in pdftotext -h lists all options concisely

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; optional -opw and -upw flags accept passwords inline for encrypted local PDFs.

Side Effects
Read-Only Local Write
Cost & Quotas

Free GPL-2.0-or-later open-source binary suite.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Poppler (pdftotext) Agent Rules
- Pass `-` as the output argument (`pdftotext -layout in.pdf -`) to read text directly via stdout without creating temporary files.
- Use `-f` and `-l` page bounds on large PDFs so output does not overflow agent context.

Agent-Ready Command Recipes

Safe Read-Only Queries

Stream layout-preserved text to stdout
pdftotext -layout -q -f 1 -l 5 input.pdf -

Extracts pages 1–5 with physical column alignment directly to stdout (-) while suppressing warnings (-q).

Extract word bounding boxes as TSV
pdftotext -tsv -q input.pdf -

Outputs tab-separated coordinates and text tokens to stdout for structured document parsing.

Controlled Writes & Previews

Write extracted UTF-8 text to a sidecar file
pdftotext -enc UTF-8 -layout input.pdf extracted.txt

Saves extracted text to extracted.txt without altering the source PDF.

Strengths for Agents

  • + Streams clean UTF-8 text directly to stdout (-) with -layout or -tsv structure.
  • + Ships with pdfinfo and pdftoppm for metadata checks and page rasterization.

Caveats & Pitfalls

  • ! Does not emit --json directly and cannot OCR scanned image-only PDFs without pdftoppm plus tesseract.
  • ! Uses single-dash flags (-layout, -nopgbrk) that differ from GNU double-dash conventions.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI