PDF · 8 min read

How to Compress a PDF Without Losing Quality: What Actually Works

Upload portals reject anything above a few megabytes, email servers bounce large attachments, and a twenty-page scan from a phone app can easily weigh 30 MB. The usual advice is to run the file through a compressor and hope for the best. Sometimes that halves the size with no visible change; sometimes it turns a crisp contract into a smudgy image whose text can no longer be copied.

The difference is not luck. It depends on what is inside the PDF and on which kind of compression is applied. This guide explains both, so you can predict the outcome before you press the button, and it is honest about how Toolula's own compressor works, including its limits.

What makes a PDF large in the first place

A PDF is a container. Its size is the sum of what it holds, and for most oversized files one ingredient dominates. Text and vector graphics are cheap: a page of typeset text is a few kilobytes because it is stored as characters plus a reference to a font. Embedded fonts add some weight, typically tens to hundreds of kilobytes per font, but only once per document.

Images are what make PDFs heavy. A scanned page is a single photograph of the paper, and a full A4 page scanned in colour at 300 DPI is roughly 8.7 million pixels before compression. Twenty such pages add up quickly. Presentations exported to PDF behave the same way when slides contain photos or screenshots. The remaining overhead, such as metadata, thumbnails, unused objects left behind by repeated editing and incremental saves, is usually small but can matter in files that have been edited many times.

This gives a quick diagnostic. Divide the file size by the number of pages. A text document under 100 KB per page has little to gain from compression. A file with 1 MB or more per page is almost certainly made of images, and that is where compression helps dramatically.

Lossless versus lossy: the two kinds of compression

Lossless compression rewrites the file more efficiently without changing a single visible pixel or character. It removes unused objects, packs the internal structure into compressed object streams and drops redundant data. The gain is modest, often a few percent and occasionally much more for a file that has been saved and edited repeatedly, but there is no downside: text stays selectable, links and form fields survive, and the pages look identical.

Lossy compression reduces the image data. The best tools do this selectively: they lower the resolution of embedded photos and recompress them as JPEG while leaving text and vector graphics untouched. A second, simpler approach renders each whole page as an image and rebuilds the PDF from those images. This shrinks scans very effectively and handles any PDF, however oddly it was built, but it converts text into pixels. After that, the text can no longer be selected, searched or read aloud by a screen reader.

Toolula's compressor uses this second approach, so it is worth knowing exactly what it does. In By quality mode, every page is redrawn as a JPEG at the level you choose: Slight renders at about 108 DPI with high JPEG quality, Recommended at about 83 DPI, and Extreme at about 61 DPI with strong compression. If the rendered result would be larger than the original, which happens with small text-only files, Toolula returns a lossless cleaned-up copy instead whenever that is smaller. The result always shows the original and the new size, so if nothing was gained you simply keep your original.

  • Lossless rebuild: small gain, no visible change, text stays selectable
  • Image downsampling: large gain for photos, text stays vector
  • Page rendering (Toolula): largest gain for scans, text becomes an image

Hitting a fixed limit: compress to a target size

When a portal says the maximum is 2 MB, picking a compression level is guesswork. The To a size mode takes the limit instead. You type the maximum in megabytes, for example 1, 2 or 0.5, and Toolula works from the gentlest option to the strongest. If the file is already under the limit, you get it back unchanged. Next it tries a lossless rebuild; if that fits, the pages are not touched and the result says it fits without losing quality.

Only if the rebuild is still too large does it render pages. It searches a ladder of seven settings, from about 144 DPI at high quality down to about 40 DPI at low quality, using a binary search so that no more than three render passes are needed, and it keeps the mildest setting that still fits. If even the strongest setting is too big, it reports the smallest size it could reach and offers Split into parts, which produces several files that each stay under your limit, packed into a ZIP.

Splitting is often the better answer for long documents. Many portals accept several attachments of 2 MB each but not one of 6 MB, and three readable parts are more useful to the recipient than one file squeezed until the small print is illegible.

What you lose when pages become images

The visible quality loss is the obvious risk: at low resolutions, small print, footnotes and thin table lines go soft first, followed by grey text on coloured backgrounds. Always open the result at 100 per cent and look at the smallest text on the page, not at the headline.

The invisible losses matter just as much. A rendered page has no text layer, so copy and paste, search and screen readers stop working. Links, bookmarks, form fields and comments are not carried over because the PDF is rebuilt from images. Embedded files are lost too, which is critical for hybrid e-invoices: a ZUGFeRD or Factur-X PDF carries its machine-readable XML as an attachment, and a rendered copy is no longer an e-invoice at all. Send e-invoices exactly as they were created.

Digital signatures are a separate case. Any tool that rewrites a signed PDF, lossless or not, changes the bytes the signature covers, so the signature will show as broken. If a document is digitally signed, do not compress it; ask the sender for a smaller version or split the submission instead.

A practical routine for the next oversized file

Start by checking where the size comes from with the per-page rule of thumb. If you have the source document, exporting it again from the original application with lower image resolution usually beats any after-the-fact compression, because text stays text. If you only have the PDF, try To a size with the real limit first: if a lossless rebuild is enough, you are done without any quality loss.

For scans, accept rendering and choose the mildest level that fits. Recommended is a sensible default for documents that will be read on screen, while Slight is better for anything that will be printed. Compare the original and new size shown in the result, check the smallest text at full zoom, and keep the original file. Compression is a one-way operation, and you may need the full-quality version later.

Frequently asked questions

Can I compress a PDF and keep the text selectable?

Only with lossless compression. In Toolula's To a size mode, a file that fits after a lossless rebuild keeps its text, links and form fields. Whenever pages are rendered to reach a smaller size, the text becomes part of an image and can no longer be selected.

Why did my PDF hardly get smaller?

Text-only PDFs are already compact, so there is little to remove, and rendering their pages as images can even make them larger. In that case Toolula returns a lossless cleaned-up copy when that is smaller; otherwise compare the sizes shown in the result and keep your original.

Which compression level should I choose?

Slight for documents that will be printed, Recommended for reading on screen, and Extreme only when size matters more than legibility. If you have a fixed limit, use To a size instead and let the tool pick the mildest setting that fits.

Can I compress a ZUGFeRD or Factur-X e-invoice?

You should not. Rendering rebuilds the PDF from images and drops the embedded XML, so the file would stop being an e-invoice. Send e-invoices as they were generated; they are rarely large.

Is my file uploaded for compression?

No. Rendering, JPEG encoding and the rebuild all happen in your browser, so confidential documents never reach a compression server.

Open Compress PDF