Skip to content

v0.5.0

Latest

Choose a tag to compare

@janosh janosh released this 11 Nov 07:33

pdf-compressor is now a Rust CLI (c3276f5, janosh/pdf-compressor#31). Install with cargo install pdf-compressor.

Highlights

  • Parallel uploads (up to 4 at a time) streamed from disk, with a progress line in terminals
  • All inputs are validated before any upload, so typos don't cost API quota: an output that would overwrite an input or another output, missing paths, a bad suffix or stats path
  • Atomic writes. --inplace moves originals to the system trash on macOS, Windows and Linux, and keeps their file permissions
  • Uploads are named 0.pdf, 1.pdf, … so local file paths never reach iLovePDF
  • The API key is read from ILOVEPDF_PUBLIC_KEY or ~/.config/pdf-compressor/api-key, written owner-only by --set-api-key. A missing key gives a clear error instead of a bare KeyError (thanks @Qrytics)

Breaking changes

  • The Python API (compress(), Compress, ILovePDF) is removed; use the CLI
  • Re-run --set-api-key once, or set ILOVEPDF_PUBLIC_KEY: the old .env location is no longer read
  • Removed --debug, --verbose, --on-no-files and --on-bad-files. Finding no PDFs exits 0 silently, and a non-PDF input is an error
  • --outdir now writes the outputs there
  • --write-stats-path writes CSV only
  • Only .pdf files are picked up, not .pdfa or .pdfx

See the readme's "Migrating from v0.4 (Python)" section for details.