Rasp

How to

How to make a PDF smaller

Nearly all of a PDF's size is embedded images. What that means for shrinking one — including where the tools here stop.

How do I reduce the file size of a PDF?

Almost all of a PDF's size is embedded images, so that is where the saving is. For a scan, compress it directly — each page is re-rendered and re-encoded. For a document with real text, removing pages or rebuilding from compressed images is better, because compressing turns that text into an image.

How to do it

  1. Work out where the size is. Open the PDF and scroll. Pages that are photographs or scans mean the size is images. A text-only document that is still large usually has embedded fonts or an unusually inefficient producer.
  2. Remove pages you do not need. If only part of the document matters, extracting those pages is the simplest real reduction — and often the largest, if the pages you drop were the scanned ones.
  3. Rebuild image-heavy PDFs from compressed images. If you built the PDF from photographs, compress the photographs first and build it again. A PDF assembled from 400 KB images is a fraction of one assembled from 3 MB images.
  4. Compress it directly if it is a scan. Scanned pages are already images, so re-rendering and re-encoding them loses nothing you had. For a document with real text, that step turns the text into pixels — so the tool checks and warns you first.

First, work out where the size is

PDFs get large for one dominant reason and two minor ones.

Embedded images. Almost always the answer. A PDF built from ten phone photographs is roughly the size of ten phone photographs, because the images are stored inside it.

Embedded fonts. A smaller, fixed cost — but the reason splitting a PDF can produce files that total more than the original, since each new document needs its own copy of the fonts its pages use.

An inefficient producer. Some software writes needlessly bloated PDFs. Less common than it used to be.

The quick diagnostic: scroll through the document. If the pages are photographs or scans, the size is images. If it is plain text and still large, it is fonts or the producer.

What this site can actually do

Compress the PDF directly. Each page is re-rendered at a lower resolution and re-encoded, and a new document is built from the results. For a scan this is exactly right and often dramatic — the pages were already images, so nothing is lost that you had.

For a document containing real text, it is a different proposition: that text becomes pixels, so it can no longer be selected or searched. The tool detects a text layer and says so before you download, rather than after.

What it cannot do is recompress the images inside a PDF while leaving the text intact. That needs Ghostscript — see below.

Three other routes, which are sometimes better than compressing at all:

Extract the pages you need. If three pages of a forty-page report matter, this is a real and often dramatic reduction — especially if the pages you drop are the scanned ones.

Delete the pages you don’t. The same operation from the other direction. Cover sheets, blank scans and duplicate pages come off cleanly.

Rebuild from compressed images. This is the big one, and it applies whenever you made the PDF from photographs. Compress the images first, then build the PDF again. A document assembled from 400 KB images instead of 3 MB images is roughly seven times smaller, and the process involves no PDF compression at all.

If you need text to stay text

The case this site cannot handle: a text-heavy PDF with a few large images, where the text must remain selectable and searchable.

Rasterising would destroy exactly what you are trying to keep, so the compressor here is the wrong tool and will tell you so.

Ghostscript recompresses the embedded images while leaving text as text, and runs entirely on your machine:

gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook \
   -dNOPAUSE -dBATCH -sOutputFile=small.pdf large.pdf

/ebook targets roughly 150 dpi, which is fine on screen. /screen goes further and looks noticeably worse in print. /printer is more conservative.

Your operating system’s PDF viewer may also offer a reduced-size export — Preview on macOS has a Quartz filter for it, and most print dialogs can “print to PDF” at a lower resolution.

Both of these keep the document on your machine, which matters: scanned PDFs are overwhelmingly contracts, statements and identity documents. Uploading one to a compression service is the decision worth making deliberately.

What compression does and does not damage

Real text is safe. Text in a PDF is stored as characters plus font instructions, not as pixels. Compressing embedded images does not touch it, and the text stays perfectly crisp at any zoom.

Scanned text is image data. In a scan, the letters are pixels, so image compression softens them. Push it too far and a scanned document becomes hard to read — this is the thing to check before sending.

Always look at the result at 100% zoom before you rely on it.

Quick reference

Situation What to do
A scan that is too large Compress it — this is the ideal case
You built it from photos Compress the images, then rebuild
Only some pages matter Extract them
A few pages need removing Delete them
Text must stay selectable Ghostscript, or your OS’s reduced-size export
It is text-only and still large Usually embedded fonts — Ghostscript can subset them

More on why PDFs behave this way: the PDF format explained.

Questions

Why is my scanned PDF so large?
Because a scan is a photograph of each page, stored inside the PDF. A ten-page scan is really ten photographs, and at scanner or phone-camera resolution each one can be several megabytes. The text you see is pixels, not characters.
Can this site compress a PDF?
Yes, by re-rendering each page and rebuilding the document — which is ideal for scans and lossy for text documents, since real text becomes an image. What it cannot do is recompress the images inside a PDF while leaving its text intact; that needs Ghostscript.
How do I compress a PDF without turning the text into an image?
Ghostscript, which recompresses embedded image streams while leaving text as text, and runs entirely on your own machine. Most operating systems also offer a reduced-size export from their PDF viewer or print dialog.
Does removing pages make the file much smaller?
It depends which pages. Dropping scanned or image-heavy pages removes a lot. Dropping text pages removes little, because PDFs share embedded fonts across the whole document and those stay with the pages that remain.
Why did splitting my PDF produce files that total more than the original?
Because each resulting document needs its own copy of the fonts and resources its pages use. Shared across one document that cost is paid once; split across fifty, it is paid fifty times.
How do I get a PDF under an email attachment limit?
If it is a scan, compress the source images and rebuild. If only some pages matter, extract those. If neither applies, use desktop software — or send a link instead, which is what most large-file limits are trying to encourage.
Will compressing a PDF make the text blurry?
Only if the text is an image, which it is in a scan. Real text in a PDF is stored as characters and font instructions, and compressing embedded images does not touch it.

Sources

Related reading