Freedom251 › PDF Compression Software
pdf-cli

What pdf-cli is
pdf-cli is a free, open-source command-line tool for common PDF tasks on Linux, macOS, and Windows. It can merge, split, compress, and encrypt documents, as well as extract or reorder pages, rotate files, edit metadata, add watermarks, and create PDFs from images. Text and embedded images can be extracted, and scanned documents can use OCR through native Tesseract when installed or a built-in WebAssembly fallback. The tool is intended for command-line use without a graphical interface and supports batch processing, parallel work for large operations, and stdin/stdout pipelines. It can produce JSON, CSV, or TSV output for use in scripts. The project describes it as a single binary with no external dependencies. Installation options include prebuilt releases, building from source, or using Go 1.25 or later. For encrypted documents, passwords can be supplied through an interactive prompt, a password file, or the PDF_CLI_PASSWORD environment variable; the --password flag requires an insecure-use opt-in. PDF/A validation and optimization are basic rather than full ISO 19005 compliance, and color-profile validation is unsupported.
Who it suits
pdf-cli suits people who work with PDFs through scripts, automation, or batch jobs and do not need a graphical interface. Its command-line workflows can also fit users who need structured output or pipelines.
What it does well
- Works on Linux, macOS, and Windows.
- Supports batch processing and command-line pipelines.
- Scanned PDFs can use OCR.
- MIT-licensed and open source.
What to know first
- PDF/A support is basic, not full ISO compliance.
- Color-profile validation is unsupported.
- First WASM OCR use downloads language data.
- The password flag requires an insecure-use opt-in.
Verdict
pdf-cli covers a broad set of PDF operations in a command-line tool built for automation. Its PDF/A capabilities are limited, and the built-in OCR fallback has a language-data download on first use.
Facts from pdf-cli's own pages
- Audience
- The README describes the tool as suitable for scripting, automation, and batch processing, with no GUI required. · github.com, 11 Oct 2026
- Automation
- It supports batch processing, stdin and stdout pipelines, and JSON, CSV, or TSV output for supported commands. · github.com, 11 Oct 2026
- Installation
- The README recommends installation with Go 1.25 or later and also documents prebuilt releases and building from source. · github.com, 4 Oct 2026
- Integrations
- OCR can use native Tesseract or a built-in WASM backend, which downloads language data from the Tesseract tessdata_fast GitHub repository on first use. · github.com, 11 Oct 2026
- Intended users
- The README describes the tool as suitable for automation and batch processing, and says it works without a GUI. · github.com, 4 Oct 2026
- License
- The repository states that pdf-cli is licensed under the MIT License. · github.com, 11 Oct 2026
- OCR
- Text extraction supports OCR for scanned PDFs using native Tesseract when installed or a built-in WASM fallback. · github.com, 4 Oct 2026
- OCR limitation
- The built-in WASM OCR backend processes images sequentially, and its first use downloads about 15 MB of language data per language. · github.com, 11 Oct 2026
- Password handling
- The README recommends interactive prompts, password files, or the PDF_CLI_PASSWORD environment variable; its security policy says passwords are not logged or stored. · github.com, 11 Oct 2026
- PDF/A limitation
- PDF/A validation and conversion are described as basic and do not provide full ISO 19005 compliance; color-profile validation is unsupported. · github.com, 11 Oct 2026
- PDF/A limits
- The project says its PDF/A validation and optimization are basic and do not provide full ISO 19005 compliance; color-profile validation is unsupported. · github.com, 4 Oct 2026
- PDF operations
- Commands include merging, splitting, extracting, reordering, rotating, compressing, encrypting, decrypting, and watermarking PDFs. · github.com, 11 Oct 2026
- Platforms
- Prebuilt binaries are listed for Linux amd64 and arm64, macOS amd64 and arm64, and Windows amd64. · github.com, 4 Oct 2026
- Purpose
- pdf-cli is a command-line tool for common PDF operations, distributed as a single binary. · github.com, 11 Oct 2026
- Security
- The security policy says user-provided files are processed locally and not sent to external services, except for OCR language-data downloads. · github.com, 11 Oct 2026
- Single binary
- The project describes pdf-cli as a fast single binary with no external dependencies and parallel processing for large operations. · github.com, 4 Oct 2026
- Support
- The repository welcomes contributions and directs contributors to its contributing guidelines. · github.com, 11 Oct 2026
- Supported versions
- The security policy lists versions 2.0.x and 1.3.x as supported and versions below 1.3 as unsupported. · github.com, 11 Oct 2026
- Text and images
- It can extract PDF text and embedded images, create PDFs from images, and read scanned PDFs using OCR. · github.com, 11 Oct 2026
- Vulnerability reporting
- The policy asks users to report vulnerabilities privately by emailing the maintainer or using GitHub private vulnerability reporting, and states an initial response target of 48 hours. · github.com, 11 Oct 2026
Where pdf-cli stands on Freedom251
- PDF Compression Software#38 of 39