pdftotext command line, layout, messages and exit codes with its own PDF
reader.
Setup
pdftotext has no account config. It reads PDF files and writes text files
through existing mounts.
SKILL.md
The SKILL.md an agent reads withpdftotext installed.
- Rendered
- Raw
Available commandsThese commands are registered with this shell;
--help after a command or subcommand shows its usage.pdftotextSupported commands
Runpdftotext --help for the supported flags and operands.
This list is generated from Mirage’s registered command tree.
Usage
- as the text file writes to standard output; with no text file, the text
goes beside the PDF with .pdf replaced by .txt. A PDF file of - is read
from standard input and then needs a text file. Each page ends in a form feed
unless -nopgbrk is given. By default text comes in reading order, one blank
line after each block; -layout keeps each page’s rows and columns and -raw
keeps the order the page draws its text.
Encrypted files are read as poppler reads them; one that needs a password
opens with
-upw or -opw. Pages without a text layer, such as scans, give empty text: there is no
OCR.
Behavior
Differences from poppler
- Text comes from Mirage’s PDF reader, not poppler’s. Where poppler prints raw glyph codes for a font with no usable encoding, the text may come out readable here.
-layoutkeeps poppler’s rows, but column widths can differ.- Reading order can differ for cells set side by side in rows.
-r,-x,-y,-W,-H,-fixed,-htmlmeta,-tsv,-bbox,-bbox-layout,-cropbox,-colspacing,-listencand-vare not supported, and-enctakes only UTF-8. An option Mirage does not know is refused rather than read as a file name.- Help is Mirage’s own, and poppler’s
Syntax Warninglines about damaged content it reads anyway are not printed.
License
See compatibility and licenses.