Skip to content

Why is my PDF so large? What compression removes

Where the bytes in a PDF go, why photos dominate, and a worked example that takes a 34 MB page to 437 KB without touching the text.

Toolbench · · 7 min read

A PDF of plain text is small. In our tests, a three-page text document was 18 KB. When a PDF runs to tens of megabytes, something else is inside it, and most of the time that something is a photo.

This guide shows where the bytes in a PDF go, works through a real example, and explains what a compressor can remove without damage, what it can only remove by turning pages into pictures, and when nothing will help.

What takes up space in a PDF

The PDF standard, ISO 32000, stores a document as numbered objects. Four kinds account for nearly all of a file's size:

  • Content streams. The instructions that place text, lines and shapes on each page. They are usually compressed with Flate, the same deflate method ZIP uses, and are rarely large.
  • Fonts. Font programs embedded so the page looks the same on every device. A subset with only the characters used is small. A full font for Chinese, Japanese or Korean has tens of thousands of glyphs and can add megabytes.
  • Images. Every photo, scan and logo. Each image records how it is compressed, and the standard lists the methods (section 7.4, table 6): DCTDecode is JPEG, FlateDecode is lossless, CCITTFaxDecode and JBIG2Decode are for black and white scans, and JPXDecode is JPEG 2000.
  • Old versions. A PDF can be saved incrementally: changes are appended to the end of the file and the original content stays in place (section 7.5.6). A file that has been edited and saved many times can carry earlier versions of its own pages.

A viewer shows none of this. The size tells you where to look: a large PDF with few pages almost always has large images.

A worked example: one page, 34 MB

To measure it, we took a public domain photo from the NASA image library: a 7051 × 4717 pixel JPEG from a Canon EOS R5, 33.8 MB on disk. We placed it on an A4 page under a one-line heading in Helvetica, 483 points (6.7 inches) wide, and saved the PDF. The file came to 33.8 MB: the heading and its font add about a kilobyte. Sizes in this guide use 1 KB = 1,024 bytes and 1 MB = 1,024 KB, as the tool shows them.

That is far more detail than the page can use. PDF measures pages in units of 1/72 inch (section 8.3.2.3), so A4 is 595 × 842 units, or 8.27 × 11.69 inches. Spread 7051 pixels across 6.7 inches and you get about 1,050 pixels per inch. A screen shows a page well at 100 to 150, and print shops usually ask for 300. Everything above that is detail nobody will see, and it costs bytes.

We ran the file through Compress PDF with Shrink images only, at each of its settings. "dpi" is the most detail an image keeps, measured against the page; "quality" is the JPEG quality from 0 to 1.

Setting Result Share of the original
Original 35,476,963 bytes (33.8 MB) 100%
200 dpi, quality 0.8 933,969 bytes (912 KB) 2.6%
150 dpi, quality 0.75 447,404 bytes (437 KB) 1.3%
150 dpi, quality 0.6 294,683 bytes (288 KB) 0.8%
110 dpi, quality 0.55 147,344 bytes (144 KB) 0.4%
96 dpi, quality 0.45 94,363 bytes (92.2 KB) 0.3%
72 dpi, quality 0.4 51,345 bytes (50.1 KB) 0.1%

At 150 dpi the photo goes from 33 million pixels to about 2 million (1754 × 1173), a sixteenth of the original, and the JPEG encoder does the rest. The heading is still text: you can select it, search it, and a screen reader can read it.

Three things in that table are worth knowing before you compress anything:

  1. Resolution does most of the work. Moving from 200 dpi at quality 0.8 to 150 dpi at 0.75 more than halved the file. Lowering only the quality, from 0.75 to 0.6 at 150 dpi, took off another third (437 to 288 KB).
  2. The first megabytes are free, the last kilobytes are not. Below about 150 dpi, photos start to look soft in print. If a form insists on 100 KB, you are trading quality for a number.
  3. The measure is deliberately cautious. The compressor compares an image with the page's long side, not with the space it fills. A photo placed small on the page keeps more detail than the setting suggests, which is why the same page with the photo at half the width gave the same sizes to within a few bytes.

What maximum compression does differently

There is a second approach: draw each whole page as one JPEG and build a new PDF from the pictures. On our test page that gave 86.2 KB, 32.4 KB and 15.3 KB at the low, medium and high levels, smaller than any image setting above.

The cost is that the page becomes a photograph of a page. Text can no longer be selected or searched, a screen reader has nothing to read, links stop working and form fields turn into pixels. OCR can add a searchable text layer back afterwards, but that text is recognised from the picture, not the original.

Use it when the file only has to be looked at, such as a scan for an upload portal, and keep the original.

Why some PDFs barely shrink

If a compressor hands back a file of the same size, one of these is usually the reason:

  • There are no images. Text and fonts are already compressed. Our three-page text document came back unchanged: there was nothing to shrink, so the tool kept the original rather than write a copy that was no smaller.
  • The images are already efficient. Black and white scans stored with CCITT or JBIG2 compression use 1 bit per pixel. The tool leaves them as they are, and JPEG would suit them poorly anyway.
  • The images are stored in a way the tool does not change. Images with transparency masks, CMYK or other colour spaces, and JPEG 2000 images are skipped rather than risk changing how they look. Maximum compression still reduces them, at the cost described above.
  • The images are already small enough. At 150 dpi an A4 page is 1,754 pixels on its long side, so a 600-pixel logo is never scaled down.
  • The bytes are fonts. A document that embeds several full fonts, or one in a script with very large fonts, may be mostly font data. Shrinking images does nothing for that.

How a target size is reached

Upload forms set limits such as 200 KB or 1 MB, and guessing settings to fit one is tedious. The target size option in Compress PDF works from a ladder of six settings, from 200 dpi at quality 0.8 down to 72 dpi at 0.4. It tries the middle one first, then moves toward milder or stronger settings depending on the result. That takes at most three attempts, and you get the mildest setting that fits. If even the strongest misses, you get the smallest result and a note saying the target was not reached.

Forms also disagree on whether a kilobyte is 1,000 or 1,024 bytes. That is why the 200 KB page aims for 0.19 MB and the 1 MB page for 0.95 MB: both stay under the limit whichever way the form counts.

A checklist before you compress

  1. Decide what the file is for. An email (Gmail allows 25 MB of attachments per message), an upload portal with a fixed limit, or print.
  2. Shrink the images first. Keep the text, and try 150 dpi before anything stronger.
  3. Use a target size for forms, and leave a little room under the limit.
  4. Look at the result at 100% zoom, and print a test page if the document will be printed.
  5. Turn pages into images only when you must, and run OCR afterwards if the text needs to be searchable.
  6. Fix it at the source next time. Compress photos before you put them in a document, or export from your editor at print resolution rather than the camera's full size.

The compressor runs in your browser: the PDF is read and rebuilt on your device, so a 34 MB file costs a few seconds of your computer's time instead of an upload.

Sources

  • ISO 32000-1:2008, PDF 1.7, Adobe's public copy: section 7.4 (filters, table 6), 7.5.6 (incremental updates), 8.3.2.3 (user space) and 8.9 (images). PDF32000_2008.pdf
  • ITU-T Recommendation T.81, the JPEG standard. itu-t81.pdf
  • The test photo: NASA image KSC-20250404-PH-KLS01_0026, NASA Image and Video Library. images.nasa.gov
  • Attachment size limits, Gmail Help. support.google.com

Tools for this job

Free, in your browser, and your files stay on your device.

More guides