Why your PDF is 40MB, and what actually shrinks it

PDF file size is almost always images, and almost never the thing people try first. What each compression setting really does, and what it costs you.

21 September 2026 · Reference

A PDF that will not fit in an email is carrying images. Text is tiny — a hundred pages of prose is a few hundred kilobytes. If a document is 40MB, something raster is inside it, and the question is only which thing and at what resolution.

Find out before you compress

pdfimages -list document.pdf enumerates every image with its dimensions, colour space and encoding. You will usually find one of three things: a scan at 600 DPI that only needed 200, a set of photographs embedded at camera resolution, or a logo saved as a 4000-pixel PNG and displayed two centimetres wide.

Compressing blindly without looking means you will flatten the text quality of a document whose size was one oversized image.

Why is my PDF so large when it is mostly text?

Because it is probably not mostly text. Common culprits: a scanned page included as an image rather than recognised text, a full-bleed background image repeated on every page, an embedded font that was not subsetted, or a logo placed at print resolution in a screen-resolution document. Run pdfimages -list and the answer is usually the first row.

What the settings actually do

Downsampling reduces an image's pixel dimensions. A 600 DPI scan downsampled to 150 DPI is a sixteenth of the pixels. This is the single largest lever and it is irreversible.

Recompression re-encodes images, typically as JPEG at a chosen quality. Applying JPEG to an image that was already JPEG compounds the artifacts — each pass degrades what the previous pass produced.

Font subsetting embeds only the glyphs used. Usually already done, worth checking if the document was assembled from several sources.

Object stream compression packs the file's internal structure. Free, lossless, and worth doing always — qpdf --object-streams=generate costs nothing.

Removing duplicated resources — the same logo embedded fifty times as fifty separate objects rather than one referenced fifty times. Common in merged documents, and often a large win.

What DPI should a PDF be?

It depends entirely on where it is going:

DestinationResolutionNote
Screen and email150 DPIIndistinguishable on a display
Desktop printing300 DPIThe usual default
Commercial print300–600 DPIAsk the printer; they will specify
Archival scan300–600 DPIResolution here is preservation, not display

Downsampling a 600 DPI scan to 150 for emailing is entirely reasonable. Downsampling your archival master is not — keep the master and send a copy.

The trap: compression destroys searchability

The most costly mistake is compressing a scanned document that has been OCR'd. A scan that has been through optical character recognition carries an invisible text layer behind the image, which is what makes it searchable, selectable and readable by a screen reader.

Aggressive recompression — particularly anything that rasterises pages or converts to a lossy image format — can discard that layer. The document still looks fine and is now a picture of words. Nothing finds it, nothing extracts from it, and a screen reader reads it as an empty page.

Does compressing a PDF lose quality?

Lossless compression of the file structure does not. Downsampling and image recompression do, permanently, and the loss compounds if repeated. Tools that advertise "compress PDF" usually mean the lossy kind and rarely say by how much. If a document may need to be printed or archived later, compress a copy and keep the original.

A reasonable order to try things

  1. qpdf --object-streams=generate — lossless, free, sometimes surprising
  2. Look at pdfimages -list and fix the outlier rather than everything
  3. Downsample images to match the destination, not lower
  4. Check the text still extracts afterwards
  5. Only then consider a general "compress" pass

Most documents are fixed by step two, once you know which image is the problem.

When the file is large because it should be

A 200-page annual report with photography, at print resolution, is legitimately tens of megabytes. Compressing it to fit an attachment limit produces a worse document to solve a transport problem. Host it at a link instead and send the link — the recipient gets the full-quality document, and you find out whether they opened it.

Share a PDF the way this one describes

PDFLink turns a PDF into a link you can track, protect with a password and swap the file behind — without the address or its QR code changing. Try it free.