Stop paying for Adobe Acrobat, SmallPDF, and iLovePDF.
pdfkit is a 100% free, offline CLI tool for:
- Merge multiple PDFs into one
- Split PDFs by page ranges
- Extract specific pages
- Compress PDF file sizes
- Rotate pages
- Extract text from PDFs
- Images → PDF conversion
- PDF → Images conversion
- Watermark PDFs
- Encrypt/Decrypt with passwords
- Metadata viewing/editing
Everything runs locally. No uploads. No limits. No watermarks on your watermarks.
| Service | Free Tier | pdfkit |
|---|---|---|
| SmallPDF | 2 tasks/day | Unlimited forever |
| iLovePDF | Limited, ads | No ads, no limits |
| Adobe Acrobat | $23/month | $0 forever |
| ILovePDF API | 250 files/month | Unlimited forever |
| PDF24 | Desktop only | CLI + Python API |
pip install pdfkit
# Merge PDFs
pdfkit merge file1.pdf file2.pdf -o combined.pdf
# Split by pages
pdfkit split input.pdf --pages 1-5,8,10-12 -o output/
# Extract specific pages
pdfkit extract input.pdf --pages 3,5,7 -o extracted.pdf
# Compress
pdfkit compress input.pdf -o compressed.pdf --quality medium
# Rotate pages
pdfkit rotate input.pdf --angle 90 --pages all -o rotated.pdf
# Extract text
pdfkit text input.pdf
# Images to PDF
pdfkit img2pdf *.jpg -o photos.pdf
# PDF to images
pdfkit pdf2img input.pdf -o output/ --format png
# Add watermark
pdfkit watermark input.pdf --text "DRAFT" -o watermarked.pdf
# Encrypt
pdfkit encrypt input.pdf --password secret123 -o protected.pdf
# Get info
pdfkit info input.pdf- 100% offline — No data ever leaves your machine
- No limits — Process as many files as you want
- No watermarks — Unlike "free" online tools
- Fast — Pure Python, no cloud roundtrips
- Scriptable — Perfect for automation and agents
- Cross-platform — Linux, macOS, Windows
Deploy with one click to cloud platforms:
Or use Docker:
docker build -t pdfkit .
docker run --rm -v $(pwd):/data pdfkit merge /data/a.pdf /data/b.pdf -o /data/combined.pdfpdfkit merge a.pdf b.pdf c.pdf -o combined.pdf
pdfkit merge *.pdf -o all-in-one.pdf --bookmark# By page ranges
pdfkit split input.pdf --pages 1-5,6-10 -o parts/
# Every N pages
pdfkit split input.pdf --every 2 -o chunks/
# Into single pages
pdfkit split input.pdf --single -o pages/pdfkit extract input.pdf --pages 1,3,5-8 -o extracted.pdfpdfkit compress input.pdf -o smaller.pdf
pdfkit compress input.pdf -o small.pdf --quality low # Aggressive
pdfkit compress input.pdf -o small.pdf --quality high # Minimalpdfkit rotate input.pdf --angle 90 -o rotated.pdf
pdfkit rotate input.pdf --angle 180 --pages 1,3,5 -o partial.pdfpdfkit text input.pdf # Print to stdout
pdfkit text input.pdf -o text.txt # Save to file
pdfkit text input.pdf --pages 1-5 # Specific pagespdfkit img2pdf photo1.jpg photo2.png -o photos.pdf
pdfkit img2pdf scans/*.png -o document.pdf --page-size a4pdfkit pdf2img input.pdf -o output/
pdfkit pdf2img input.pdf -o output/ --format jpg --dpi 300pdfkit watermark input.pdf --text "CONFIDENTIAL" -o marked.pdf
pdfkit watermark input.pdf --stamp watermark.pdf -o marked.pdf
pdfkit watermark input.pdf --text "DRAFT" --opacity 0.3 -o marked.pdfpdfkit encrypt input.pdf --password secret -o protected.pdf
pdfkit decrypt protected.pdf --password secret -o unlocked.pdfpdfkit info input.pdf
# Output:
# Title: My Document
# Author: John Doe
# Pages: 42
# Size: 1.2 MB
# Encrypted: Nofrom pdfkit import PDFMerger, PDFSplitter, PDFExtractor
# Merge
merger = PDFMerger()
merger.merge(["a.pdf", "b.pdf"], "combined.pdf")
# Split
splitter = PDFSplitter("input.pdf")
splitter.split_by_ranges({"part1": (1, 5), "part2": (6, 10)}, "output/")
# Extract text
extractor = PDFExtractor("input.pdf")
text = extractor.get_text()
print(text)- Automate document processing in CI/CD
- Batch process reports
- Generate documentation PDFs
- Extract text from PDFs for LLM processing
- Split large PDFs for context windows
- Compress PDFs before sharing
- Merge scanned pages into one document
- Add watermarks to contracts
- Protect sensitive documents with passwords
- Convert images to PDF for submissions
- Python 3.8+
- ~10MB disk space
- No external dependencies (pure Python with pypdf)
We need help with:
- GUI version
- Batch mode improvements
- More compression options
- OCR integration
- Form filling
MIT — Free forever. No catch.
Built because PDF manipulation shouldn't cost money.
Made with 🦀 by Thielon | https://github.com/RanaPriyansh