This is a very basic cli wrapper around the pypdf library for PDF manipulation tasks including page rotation, PDF joining, and A3-to-A4 page splitting. It was generated almost entirely by Claude Code.
pip install -r requirements.txt- Page Rotation: Rotate specific pages by 90°, 180°, or 270°
- PDF Joining: Combine multiple PDFs with selective page inclusion
- A3 to A4 Splitting: Split A3 pages horizontally into A4 pages
- Flexible Page Selection: Use range syntax for precise page control
# Split A3 pages to A4 (overwrites input file)
python pdf_tools.py split input.pdf
# Rotate pages 90° clockwise (overwrites input file)
python pdf_tools.py rotate input.pdf
# Join multiple PDFs
python pdf_tools.py join file1.pdf file2.pdf -o combined.pdf
# Remove pages (overwrites input file)
python pdf_tools.py remove input.pdf -p 2 5:7Use -p to specify which pages to process:
1- single page1:3- pages 1 through 35:- page 5 through end:3- pages 1 through 3-1- last page-3:-1- last 3 pages
-o output.pdf- save to new file (default: overwrite input)-a 180- rotation angle for rotate command (90, 180, 270, -90, -180, -270)
- Python 3.x
- pypdf==5.9.0