Skip to content
yund229Public

About

Record any screen rectangle to an animated GIF. Two deps, CLI-first, 64 tests, MIT.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

PdfLoft 📄

English | 中文

Every PDF chore in one CLI: merge, split, extract text, images ⇄ PDF, page surgery. One dependency (PyMuPDF), fully offline.

CI Python License Dependencies

demo

Why

Online PDF tools want you to upload your documents to someone else's server. PdfLoft never touches the network — everything happens on your disk.

Install

pip install git+https://github.com/yund229/PdfLoft.git

Windows without Python: grab pdfloft.exe from Releases.

Quick start

pdfloft merge a.pdf b.pdf c.pdf -o combined.pdf    # concatenate in order
pdfloft split report.pdf                           # -> report_p1.pdf, report_p2.pdf, ...
pdfloft text report.pdf -o report.txt --pages 1-3  # selective text extraction
pdfloft img2pdf scan1.png scan2.jpg -o scan.pdf    # images -> one PDF
pdfloft pdf2img slides.pdf --dpi 150               # every page -> PNG
pdfloft info report.pdf                            # JSON: pages, sizes, encryption
pdfloft delete report.pdf --pages 2-4 -o trimmed.pdf

Page specs everywhere

Any command taking --pages understands 1, 1-3, 1-3,5, with 1-based numbering and clear out-of-bounds errors.

Design notes

  • One dependency — PyMuPDF does parsing, rendering and writing; no pypdf + pdfminer + Pillow pile-up
  • Encrypted PDFs rejected loudly — a clear ValueError, not a cryptic library traceback
  • Real round-trip tested — the 38 tests generate real PDFs, split them, re-merge them, and assert on the result; no mocks

Comparison

PdfLoft Online tools pypdf CLI pile
Offline ✅ ❌ uploads your files ✅
Dependencies 1 browser 3-5
Scriptable ✅ ❌ ✅
JSON metadata ✅ ❌ ❌

More tools from me

  • SnapOCR — hotkey screenshot → offline OCR text

  • DirTidy — auto-organize your Downloads folder, with undo

  • RectGif — drag a rectangle on screen, get an animated GIF

  • VocabPill - pop-up flashcards for CET-4/CET-6 words, Leitner spaced repetition, zero dependencies

License

MIT

About

Record any screen rectangle to an animated GIF. Two deps, CLI-first, 64 tests, MIT.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages