Skip to content
comprimirunpdf
100% private and local

Why a PDF is so large and how to shrink it without it showing

Text takes up almost nothing: what drives up a PDF's size is scanned images and phone photos. We explain the pixel arithmetic, what each compression method does and which size to choose so the document stays readable.

By Robert Bzia8 min read

A ten-page contract generated from a word processor may weigh 150 KB. The same contract, printed, signed and scanned, easily goes over 10 MB. The content is identical; what has changed is how it's stored. Understanding that difference is what lets you shrink a PDF without ruining it, and also keep it from being so large next time.

What's inside a PDF and how much space each part takes

A PDF isn't a picture of a document, but a container. Inside it holds pieces of very different kinds, and each one weighs in its own way:

Infographic: in a PDF, text takes a few kilobytes per page, embedded fonts from kilobytes to hundreds of kilobytes and images several megabytes; the same ten-page contract weighs 150 KB when generated on a computer and 10 MB when scanned.
What takes up space inside a PDF: almost all the weight of a heavy file is in its images. Enlarge image
Infographic: in a PDF, text takes a few kilobytes per page, embedded fonts from kilobytes to hundreds of kilobytes and images several megabytes; the same ten-page contract weighs 150 KB when generated on a computer and 10 MB when scanned.

Swipe to see the whole image

The practical takeaway is simple: if your PDF weighs several megabytes and has few pages, look for the images. That's where the solution is.

Why a scanned document is so large: the pixel arithmetic

A scanner turns each page into a grid of dots. The resolution, measured in DPI (dots per inch), says how many dots there are in each inch of paper, across and down. That's why size doesn't grow in proportion to DPI, but to its square: doubling the resolution multiplies the number of pixels by four.

Then there's color. A grayscale pixel needs one byte; a color one, three. The chart and the table show how much a single A4 page takes before compression, depending on how it's scanned:

Bar chart: an uncompressed scanned A4 page takes 99.6 MB in color and 33.2 MB in grayscale at 600 DPI, versus 6.2 and 2.1 MB at 150 DPI.
Size of a scanned A4 page before compression. Going from 600 to 150 DPI and from color to grayscale divides the data by 48. Enlarge image
Bar chart: an uncompressed scanned A4 page takes 99.6 MB in color and 33.2 MB in grayscale at 600 DPI, versus 6.2 and 2.1 MB at 150 DPI.

Swipe to see the whole image

A scanned A4 page (210 × 297 mm), uncompressed
ResolutionPixelsColorGrayscale
600 DPI4961 × 7016 (34.8 MP)99.6 MB33.2 MB
300 DPI2480 × 3508 (8.7 MP)24.9 MB8.3 MB
200 DPI1654 × 2339 (3.9 MP)11.1 MB3.7 MB
150 DPI1240 × 1754 (2.2 MP)6.2 MB2.1 MB
100 DPI827 × 1169 (1.0 MP)2.8 MB0.9 MB

The scanner doesn't store those figures as they are: it compresses them, usually as JPEG, and the final file takes up quite a bit less. But the proportion holds. A page at 600 DPI in color has 48 times more data than the same page at 150 DPI in grayscale, and in a text document the difference to the naked eye is zero. Many scanners and multifunction printers come set to high resolution and color out of the box, and that's where 30 MB PDFs come from.

The case of phone photos

The same thing happens, but more hidden. A mid-range phone camera takes 12-megapixel photos (4032 × 3024), which is more pixels than an A4 page scanned at 300 DPI. If you photograph a receipt and insert it into a document without resizing it, each page carries an image of that size, even if it looks small on screen. Ten photos like that and the PDF no longer fits in any form.

If you just need your PDF to fit a specific limit, type the size and the tool adjusts the resolution for you, without uploading the file to any server.

Compress a PDF now

The three ways to compress a PDF

Every compressor does some combination of these three things. Knowing them explains why some reduce little and others a lot, and what's lost in each case.

1. Optimize the structure, losslessly

This means rewriting the file cleanly: removing accumulated earlier versions, duplicate objects, thumbnails and unnecessary metadata, and embedding only the subset of characters of each font. The document stays exactly the same. The problem is that, if the weight is in the images, this barely makes a difference: an 8 MB scan might shed a few kilobytes.

2. Recompress the images

Each image in the PDF is taken, its resolution is reduced and it's saved again as JPEG at a lower quality. Real text stays text, selectable and searchable. It's the ideal option for a computer-generated PDF with photos inside, but it depends on the file being well built: with unusual PDF structures, the result is hard to predict and doesn't guarantee a specific size.

3. Turn each page into an image

Each whole page is drawn as an image at a chosen resolution, compressed as JPEG, and a new PDF is assembled from those images. It's the only way to control the final size precisely, because the size depends almost entirely on two variables that can be adjusted: resolution and quality. In exchange, the text can no longer be selected. For a scanned document there's no loss in that sense, because its text was already an image.

What each method offers
MethodReductionVisible lossSelectable text
Optimize structureSmallNoneKept
Recompress imagesMedium to highSlightKept
Page to imageWhatever you askDepends on targetLost

How this tool adjusts the size

comprimirunpdf uses the third method because it's the one that can meet an exact limit, which is what a form asks for. The whole process happens in your browser:

  1. It compares the original's size with the target and chooses where to start. If it only needs to go down a little, it starts at the top quality of its scale: 200 DPI and 85 % JPEG quality.
  2. It draws each page at that resolution, compresses it and assembles the resulting PDF. Then it measures it.
  3. If it's over the target, it estimates how far to go down (size grows roughly with the square of the DPI) and repeats with a stronger setting. The scale goes down to 50 DPI and 25 % quality.
  4. If there's room to spare, it raises the quality to land as close as possible below the limit. There's no point delivering 400 KB if you were allowed 2 MB.
Eight-step compression scale, from 200 DPI with 85 % JPEG to 50 DPI with 25 % JPEG, with the real example of 5.04 MB reduced to 977 KB at 110 DPI.
The resolution and quality scale the tool works through until the PDF fits the requested size. Enlarge image
Eight-step compression scale, from 200 DPI with 85 % JPEG to 50 DPI with 25 % JPEG, with the real example of 5.04 MB reduced to 977 KB at 110 DPI.

Swipe to see the whole image

A real example: a four-page document with photos that weighed 5.04 MB ended up at 977 KB with a 1 MB target, rasterized at 110 DPI and perfectly readable on screen and on paper. If a target can't be reached without the content becoming illegible, the tool delivers the lightest attempt and tells you the real size, instead of handing you an unreadable file.

Which size to choose without it showing

The size per page is what determines quality: a 1 MB limit is roomy for two pages and tight for twenty. As a guide for scanned text documents:

Infographic with a scale from 50 to 200 DPI: below 75 DPI small print is hard to read, between 100 and 110 DPI it reads effortlessly, and at 150 DPI text is sharp on screen and in print.
What resolution a scanned text document needs to stay easy to read. Enlarge image
Infographic with a scale from 50 to 200 DPI: below 75 DPI small print is hard to read, between 100 and 110 DPI it reads effortlessly, and at 150 DPI text is sharp on screen and in print.

Swipe to see the whole image

If the form limits the size of the whole submission rather than each file, share it out: three documents within a 1 MB limit are about 330 KB each. And if your file lands right on the limit and is still rejected, the form may be counting 1 MB as 1,000,000 bytes instead of 1,048,576; lower the target by 5 % and you'll be safe.

How to keep a PDF from getting so large in the first place

Compressing solves today's problem; setting up the source properly avoids tomorrow's.

Frequently asked questions

Why does a PDF with only a few pages weigh several megabytes?

Almost always because it contains high-resolution images: scanned pages or phone photos inserted as they are. A single 12-megapixel photo has more pixels than an A4 page scanned at 300 DPI. Text, on the other hand, takes up almost nothing.

Does compressing a PDF reduce its quality?

It depends on the method. Cleaning up metadata, duplicates and fonts loses nothing, but rarely reduces much. To really go down you have to recompress the images or turn the pages into images, and that does lose detail. What matters is that the loss stays below what the eye notices when reading.

What resolution does a document need to be readable?

As a guide, 150 DPI gives sharp text on screen and when printed on A4 or Letter paper; between 100 and 110 DPI it's still effortless to read; below 75 DPI small print starts to suffer. Signatures and stamps hold up better than small body text.

Can I compress a PDF signed with a digital certificate?

You can, but the electronic signature will no longer be valid, because it protects the exact content of the file and any change breaks it. Compress first and sign afterwards. A scanned handwritten signature doesn't have that problem: it's part of the image.

Next step

To find out what takes up space in your particular PDF, run it through the PDF X-ray: it tells you how much of the size is images, fonts or text, without uploading the file.

If you already know the limit you've been given, these pages open the tool with that size already set:

And if you're worried about what happens to the document when you compress it, in this other guide we explain how to check that a compressor doesn't upload your file.

And if what you need is to send it by email, the guide to emailing a large PDF covers the real limits of Gmail, Outlook and other services, and which size to choose in each case.

Doing it on your phone or without installing anything? In this guide we go through what iPhone, Android, Mac and Windows have built in to compress a PDF.

Other guides you may find useful

See all guides · Go to the PDF compressor