Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Tools

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.

Installation

pip install -r requirements.txt

Features

  • 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

Usage

# 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:7

Page Ranges

Use -p to specify which pages to process:

  • 1 - single page
  • 1:3 - pages 1 through 3
  • 5: - page 5 through end
  • :3 - pages 1 through 3
  • -1 - last page
  • -3:-1 - last 3 pages

Options

  • -o output.pdf - save to new file (default: overwrite input)
  • -a 180 - rotation angle for rotate command (90, 180, 270, -90, -180, -270)

Dependencies

  • Python 3.x
  • pypdf==5.9.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages