PDF compression: lossless structure versus lossy image reduction

PDF file size can come from images, fonts, duplicated resources, object overhead, metadata or inefficient streams. Lossless structural optimization can remove some overhead without intentionally changing page appearance, but it cannot create large savings when most bytes are already-compressed images.

Last technical review: 2026-09-19

Key takeaways

  • Lossless structural compression and lossy image downsampling solve different problems.
  • A fixed target such as exactly 5 MB cannot be guaranteed without changing content or quality in many files.
  • A compressor should compare the final verified size and avoid calling a larger output a success.
  • Page count, page geometry and content resources should be checked after structural rewriting.

Where PDF size comes from

Image-heavy scans often spend most of their bytes on JPEG or other image streams. Text-oriented PDFs may instead contain embedded fonts, repeated resources, unused objects or inefficient structural overhead.

The same visible page count therefore says very little about how much a PDF can be compressed without changing its appearance.

Lossless structural optimization

A structural compressor can rewrite supported objects and streams more compactly while keeping page content and geometry equivalent. This is useful when the source contains removable overhead or inefficient representation.

The method deliberately avoids promising large reductions. If images already dominate the file, the remaining structural savings may be small.

Lossy compression and target sizes

Large reductions commonly require image resampling, lower JPEG quality, reduced color precision or rasterization. Those techniques can be useful, but they change information or fidelity and need different verification rules.

An exact target size is especially difficult because the required quality loss depends on each source file. A responsible tool should state whether it uses lossless or lossy techniques instead of presenting every method as equivalent.

How ZAMAZY Compress PDF behaves

The current ZAMAZY PDF compressor focuses on lossless structural optimization within its supported subset. It does not intentionally downsample images, rasterize pages or promise an exact target size.

The output is reparsed and must remain valid, preserve the expected page order and geometry, and be smaller than the source before it is presented as a successful compression.

Example and decision guide

An illustrative scan-dominated PDF may consist mostly of already-compressed page images, while a text-heavy export may have more structural overhead. Removing overhead from the first file cannot create the same opportunities as intentionally reducing image resolution. Repeatedly running a lossless compressor does not create an entitlement to a particular reduction.

Start with the property that must remain unchanged. For supported PDFs, ZAMAZY offers structural compression without intentional image downsampling. When a target still cannot be reached, a new source export with fewer image pixels is a separate quality decision, not an undocumented second mode of this tool. Review text legibility and page geometry after any such export.

When this approach does not fit

An optimizer can also change fonts, transparency, forms or document data, depending on its options; smaller is not automatically equivalent. Do not remove embedded fonts or required content merely to meet a byte limit. ZAMAZY does not guarantee a percentage reduction, an exact target size, preservation of every PDF feature, or acceptance by a third-party portal.

Editorial illustration, not a benchmark. Addition reviewed on:

Sources and evidence boundaries

These sources explain formats and methods. They do not certify ZAMAZY; its supported facts and limits are stated on each tool page.

Frequently asked questions

Why did my PDF shrink by only a few percent?

If the source is already compact or most bytes are in compressed images, lossless structural optimization may have little removable overhead.

Can lossless compression guarantee a PDF below 5 MB?

No. A hard target often requires changing image quality, dimensions or other content, and the required tradeoff differs by file.

Can a compressed PDF become larger?

A transformation can technically produce a larger candidate. A well-defined compressor should compare sizes and avoid presenting that candidate as a successful reduction.

Build v0.1.0-beta.6 · 17d46c81a737Sunday, 2026-09-27 · 05:12