Merge and split PDF files with predictable behavior, strong safety guarantees, and a clean command-line interface.
Download • Quick Start • Usage
- Overview
- Design Goals
- Quick Start
- Basic Usage
- Page Range Syntax
- Safety Features
- Building from Source
- Contributing
- License
- Disclaimer
pdfer is a small, focused, and reliable PDF utility written in Rust.
It provides two core capabilities:
- Merging PDFs into a single document
- Splitting PDFs into per-page files or selected ranges
The tool prioritizes correctness, safety, and predictable behavior over feature bloat.
pdfer is built for flexibility:
- Precise command-line control
- Automation & scripting
- Developer workflows
- User-friendly desktop usage
pdfer intentionally keeps its scope narrow and dependable:
- Deterministic behavior
- No silent data corruption
- Strict input validation
- Safe output handling
- Cross-platform portability
- Minimal dependencies
The tool refuses to proceed when encountering ambiguous or unsafe states (e.g., invalid page ranges, non-PDF files, overwrite conflicts).
Download platform-specific binaries from:
https://github.com/syedinsaf/pdfer/releases
pdfer file.pdf
pdfer *.pdf
pdfer -r ./documentsDisplays:
- page count
- PDF version
- metadata (title / author / subject if present)
pdfer merge a.pdf b.pdf -o merged.pdf
pdfer m *.pdf -o combined.pdfBehavior:
- preserves page order
- validates inputs
- refuses empty PDFs
Split all pages:
pdfer split document.pdfSplit selected pages:
pdfer split document.pdf 1,3,5-10Custom output folder:
pdfer split document.pdf 1-5 -o output_pagespdfer supports flexible page selection:
| Syntax | Meaning |
|---|---|
5 |
Single page |
1,3,7 |
Specific pages |
2-6 |
Inclusive range |
10- |
From page 10 to end |
Rules:
- Page numbers start at 1
- Ranges are validated strictly
- Invalid specifications fail early
Examples:
pdfer split file.pdf 1-3
pdfer split file.pdf 4,7,9-12
pdfer split file.pdf 5-pdfer is designed to avoid destructive mistakes:
- ✔ Overwrite protection
- ✔ Interactive conflict resolution
- ✔ Strict file type validation
- ✔ Refusal on invalid ranges
- ✔ No partial writes on failure
When an output file or directory already exists, pdfer will prompt for:
- overwrite
- rename
- abort
- Rust (stable toolchain)
- Git
git clone https://github.com/syedinsaf/pdfer.git
cd pdfer
cargo build --releaseBinary output:
- Linux / macOS →
target/release/pdfer - Windows →
target/release/pdfer.exe
Bug reports and improvements are welcome.
Useful information for issues:
- OS and version
- Rust version
- Example PDFs (if possible)
- Exact command used
- Full error output
Pull requests should preserve:
- safety guarantees
- deterministic behavior
- portability
pdfer is licensed under the Apache License 2.0.
See LICENSE for details.
Use at your own risk.
Always verify important documents after processing.
The author is not responsible for:
- data loss
- corrupted documents
- workflow disruptions