How to get a PDF under a size limit (2 MB, 5 MB, 10 MB) without wrecking it

Where the weight of a PDF actually sits, what compression can and cannot remove, why a scanned form is 40 times heavier than a typed one, and the order to try things in.

The short version

Almost all the size of a heavy PDF is in its images. A page of typed text is 20–50 KB; a page scanned at 300 dpi in colour is 1–3 MB. Compressing a PDF means re-encoding those images at a lower resolution or quality — nothing else in the file is worth shrinking. If the document is mostly text and still too big, something is wrong with how it was made, and the fix is different.

Where the bytes are

Open a PDF’s structure and you find three kinds of content:

  • Text and vector drawing: stored as compact instructions (“draw this glyph here”), already compressed with the same algorithm as ZIP. A 100-page novel is under 1 MB. There is nothing to gain here.
  • Fonts: embedded so the file looks the same everywhere. A full CJK font can be 5–15 MB, but PDF producers normally embed only the glyphs used (“subsetting”), which brings it down to tens of kilobytes. A PDF that is heavy because of fonts was exported with subsetting off — re-export it, do not compress it.
  • Images: photographs, scans, logos, and — the usual culprit — a scanned page, which is one big image per page regardless of what is on it.

A 12-page rental contract scanned on a phone is twelve JPEGs at 3–4 megapixels each. That is where the 25 MB came from, and that is what the upload form is choking on.

What “compress PDF” does

A PDF compressor does one useful thing: it finds each image, decodes it, and encodes it again smaller — lower JPEG quality, lower resolution, or both. The text layer, links and bookmarks are untouched. Three settings matter:

  1. Resolution. A scan at 300 dpi is what you need for OCR and printing. On a screen, 150 dpi looks identical and is a quarter of the pixels. A form that will only ever be viewed on a screen can go to 100–120 dpi. Halving the resolution quarters the image size; this is the biggest lever by far.
  2. JPEG quality. From 95 to 75 saves roughly 60 % with little visible change on a document. Below 60, text edges start to smear.
  3. Colour. A scan of a black-and-white form stored in RGB carries three channels of information for one channel of content. Converting to greyscale saves a third; converting a clean text page to true black-and-white (1 bit, CCITT or JBIG2 encoding) can save 90 %.

Compress PDF does this in the browser — the document is decoded with PDF.js on your machine, each image re-encoded, the file rebuilt with pdf-lib — and it shows the resulting size before you download. If the result would be larger than the original, it keeps the original: that happens when the images were already small, and it means compression is not the answer for that file.

When compression won’t get you there

  • The limit is tiny and the document is long. A 40-page scan will not fit in 2 MB at any legible quality. Split it into the pages the form actually asks for; most “upload your contract” fields want the signature page, not the annexes.
  • It’s already compressed. Running a compressor twice does nothing except degrade the images. If the tool reports a few per cent saving, stop.
  • The weight is fonts or embedded files. Some PDFs carry attachments, 3D models, or full fonts. Re-export from the source document (Word, Google Docs, the design tool) with “standard” or “minimum size” settings.
  • It’s a scan that should have been text. A typed letter that was printed and scanned is 100 times heavier than the letter. If you have the original, export it again; if you only have the scan, OCR will not reduce the size — the image stays, the text is added on top.

The order to try things in

  1. Check what’s inside: if it is a scan, expect to compress; if it is typed, expect a re-export.
  2. Compress at 150 dpi, quality 75. This alone fixes most “25 MB → under 5 MB” cases.
  3. Still too big: greyscale, then 120 dpi.
  4. Still too big: split — send only the pages required.
  5. Last resort: PDF to image at a modest resolution, then image to PDF. This flattens everything to one JPEG per page and gives you direct control of the pixel count; the text layer is lost, so only do this for documents no one will search or copy from.

Two things to check after

Open the result and zoom in on the smallest text — signatures, footnotes, stamp text. That is where over-compression shows first. And if the PDF was digitally signed with a certificate, any re-encoding invalidates the signature; the recipient will see “modified after signing”. For those, splitting is the only safe reduction, and even that breaks the signature — send the original and negotiate the limit.

Tools in this article