Skip to content

Releases: hawkff/pdf-squeezer

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 16:45
a744018

Changes

  • Add light, balanced, medium, strong, and heavy compression tiers, profile bundles, and supported .pdfscp imports.
  • Add placement-aware image cropping and downsampling, extended image decoding, lossless monochrome codecs, and image-memory controls.
  • Add font subsetting and merging, selected annotation/form flattening, image and text extraction, and bitmap/MRC output.
  • Add password-file handling, AES-256 encryption, metadata editing, targeted removals, and batch output controls.
  • Add PDF/A-2b, PDF/A-3b, and PDF/A-4 conversion with veraPDF verification, plus preservation of declared PDF/A levels.
  • Reduce redundant stream decoding and image-buffer allocations. Fix grayscale JPEG handling, private-data preservation, metadata removal, pattern-resource scans, and invisible-text advances.

Default compression remains standalone. Advanced operations require optional tools; the container image includes them.

Downloads

Binaries are available for Linux and macOS on amd64/arm64, and Windows on amd64. Verify downloads against checksums.txt. pdf-tools-requirements.txt lists the optional Python dependencies.

Container: ghcr.io/hawkff/pdf-squeezer:v0.2.0.

Full changelog

v0.1.6

Choose a tag to compare

@github-actions github-actions released this 01 Oct 21:01

--images re-encodes images in parallel, one worker per CPU, and uses PNG's default Flate level instead of the slowest one. On a 374-page screenshot book this cuts the run from 20 minutes to a few.

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.5...v0.1.6

v0.1.5

Choose a tag to compare

@github-actions github-actions released this 01 Oct 20:28

--images re-encodes images with the pdfcpu engine, without Ghostscript. It handles 8- and 16-bit gray and RGB images stored losslessly or as a single JPEG: RGB images whose pixels are all exactly gray become DeviceGray, gray images holding only black and white become 1-bit, 16-bit samples become 8-bit, and each image keeps the smaller of Flate with PNG predictors and JPEG at quality 75. The original bytes stay unless the re-encode saves at least 2% and 1 KiB. Image masks, images with /Mask or /Decode, indexed and CMYK images, soft masks (kept lossless), and other filters are left byte for byte. -V reports what was re-encoded and why the rest was preserved.

--dpi N and --gray for the Ghostscript engine: resample color and gray images above 1.5×N dpi down to N (monochrome keeps the preset's resolution), and convert all colors to grayscale.

The "no reduction" message now says which option to try next. --privacy also removes web capture information (/SpiderInfo).

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.4...v0.1.5

v0.1.4

Choose a tag to compare

@github-actions github-actions released this 01 Oct 16:47

New flag --privacy, available with both engines. It empties the document information dictionary (title, author, subject, keywords, creator, producer, dates), removes XMP metadata streams and application piece info from every object, and gives the file a fresh identifier. With --privacy the CLI always writes the rewritten file, even when it is not smaller than the input, so the original metadata never gets copied through.

Page content, annotations, form fields, and attachments stay as they are.

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 01 Oct 15:54

Ghostscript 10 skips an image it cannot decode, leaves that page blank, and still exits 0. The CLI now reads Ghostscript's warning summary and fails on recoverable image error, so a blank-page result is reported instead of written.

The Ghostscript presets convert colors to sRGB, which triggers that skip on 16-bit ICC images with soft masks, such as PDFs exported from iOS Photos. The CLI now passes -sColorConversionStrategy=LeaveColorUnchanged, so those files compress instead of coming out blank.

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.2...v0.1.3

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 01 Oct 15:14

Flags now work in any position, so pdf-squeezer document.pdf -o . -V runs instead of printing the usage text. Arguments after -- still count as filenames.

-o accepts an existing directory as well as a file path. With a directory, the CLI writes document.squeezed.pdf into it.

The one-input error no longer asks for flags before the filename, and --help describes the default output location and the directory form of -o.

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.1...v0.1.2

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 01 Oct 14:58

pdf-squeezer compresses PDF files from the command line.

  • --engine pdfcpu (default) removes redundant objects and compresses document structure. It needs no other software and leaves images as they are.
  • --engine ghostscript rewrites the PDF through Ghostscript and downsamples images. Pick --quality screen, ebook (default), printer, or prepress.
  • The input stays unchanged. The CLI refuses to overwrite an existing output file and copies the original bytes when compression would not shrink it.
  • -o sets the output path, -V reports each step on stderr, -v prints the version.

Changes since v0.1.0: --help lists each flag once, in alphabetical order, with short forms beside long forms, and states that the output directory must already exist.

Attached: binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64), plus SHA-256 sums in checksums.txt.

Full Changelog: v0.1.0...v0.1.1