PDF Limit

How PDF Limit works.

This is the implementation-level explanation of what the tool reads, which versions it tries, when it stops, and what a pass result means.

Input checks

The current browser build accepts one PDF up to 80 MiB. It reads the page count locally with PDF.js. Password-protected, encrypted, or damaged files may fail at this step. Strong page-image compression is limited to 50 pages to keep browser memory and processing time bounded.

Text-preserving attempt

PDF Limit loads the source with pdf-lib and saves a new document using object streams. This can reorganize the PDF without intentionally drawing each page as an image. It may preserve text and document behavior better, but the size reduction depends on how efficiently the source was already produced.

Page-image attempts

When the text-preserving result misses the target and the selected mode permits stronger compression, PDF.js renders every page onto a white canvas. The browser then encodes each canvas as JPEG and pdf-lib places those images into a new PDF with the original page dimensions.

Resolution and quality sequence

Balanced mode can test 144, 120, 96, 84, 72, 60, and 50 DPI with progressively lower JPEG quality. Strong smaller begins at the second step. Rendered page edges are capped at 2,200 pixels. The process stops when a version fits the requested bytes or when all configured attempts have been evaluated.

How the result is selected

The tool keeps the smallest version found. If a tested version is at or below the exact target in bytes, it returns a Pass result. If no readable attempt reaches the target, it returns the smallest result with an Over target label instead of claiming success.

Information that can be lost

A rasterized result is a visual copy of each page. Selectable text, form fields, hyperlinks, bookmarks, annotations, embedded files, layers, digital signatures, and tagged accessibility structure are not preserved by that path. Metadata is also rewritten with PDF Limit as creator and producer.

Verification standard

A successful automated test checks file creation and byte size; human review is still required for legibility and document meaning. The quality checklist covers page count, fine text, signatures, barcodes, links, form behavior, and privacy-sensitive content.