How to compress a PDF and keep it readable
A PDF that will not attach to an email, or is rejected by an upload form, is a familiar problem. The file is usually large for a simple reason: it contains big images. Compression shrinks those images, and a few other parts of the file, so that the document is smaller. The trade-off is that some compression discards detail, so the skill is in squeezing out what nobody will miss and keeping what they need. This guide explains why PDFs get large, which kinds of compression lose quality and which do not, how to choose settings for screen, print and scans, and how to check the result. It uses worked sums for scanned pages so that you can see where the megabytes go.
Why PDFs get so large
A PDF made from a word processor, with text and a few shapes, is often only tens or hundreds of kilobytes. A PDF made from photos, scans or a presentation with large pictures can be tens of megabytes. The difference is almost always images.
Scanned documents are the biggest culprits, because every page is a picture of a page. A full A4 page scanned in colour at 300 dots per inch is about 2,480 by 3,508 pixels, which is 8.7 million pixels. Stored as raw colour data at 3 bytes a pixel, that is 26 MB for one page. Compressed as a JPEG it falls to perhaps 1 to 2 MB, but a 30-page scan can still reach 30 to 60 MB.
Other causes are fonts embedded in full, many copies of the same image, layers or hidden data left from an editing program, and attachments or form data inside the file. These are usually smaller than the images but can add up.
Lossless and lossy compression
Lossless compression makes a file smaller without throwing away any information, the way a zip file does. The document looks exactly the same. It is the best choice whenever possible, but the saving is often modest, particularly for photos.
Lossy compression reduces the file by discarding detail that people are unlikely to notice. For images this means lowering the resolution, which cuts the number of pixels, or raising the JPEG compression level, which simplifies the colours. The saving can be large, but the more you push it, the more the image softens and shows blocky patches.
For text, the situation is different. Real text in a PDF is stored as characters and shapes, which stay sharp at any zoom. But text in a scanned page is part of the image, so lossy compression of the image affects it directly. That is why scans need more care than documents created on a computer.
Choosing a resolution
Resolution is measured in dots per inch, or dpi. For reading on a screen, 100 to 150 dpi is usually enough. For printing a document at home or in an office, 200 to 300 dpi gives a good result. Photographs for professional printing need more, but few everyday documents do.
Halving the resolution cuts the number of pixels to a quarter, since you halve both the width and the height. A page at 150 dpi is 1,240 by 1,754 pixels, which is about 2.2 million pixels, compared with 8.7 million at 300 dpi. In raw form that is 6.5 MB instead of 26 MB, and after JPEG compression the saving is similar in proportion.
For scans of text, reducing to 150 dpi is often readable and gets rid of most of the weight. If the text is small, such as a contract in fine print, keep 200 dpi or above and check the result before sending it.
Step by step: shrinking a PDF
First, keep the original. Always save the compressed version under a different name, so you can go back if the result is too soft. Then decide where the file is going: email, an upload form, or print. That sets the target size and quality.
Second, run the file through a PDF compressor and choose a level. A low level reduces size with little visible change, a medium level suits most email attachments, and a high level shrinks hard for the smallest files. Start with the medium level and look at the output.
Third, check the result. Open it and zoom to 100 per cent on a page with small text, a photo and a table. Compare it with the original. If the text is easy to read and the images are acceptable, you are done. If it is too soft, go back one level. If it is still too large, try a stronger level or the other methods below.
Other ways to cut the size
If you have the source document, export again with a lower image quality setting, which is better than compressing the finished PDF. A presentation with oversized photos can be made smaller by compressing the pictures in the presentation program before exporting.
For scans, scan in greyscale or black and white instead of colour if the document has no colour that matters. A greyscale page uses a third of the data of a colour page in raw form, and black and white is smaller still. Many scanners also have a document mode that applies text-friendly compression.
You can also split a large file into parts, remove pages you do not need, or merge fewer documents. Taking out blank pages, or pages that are scanned twice by mistake, can cut a file by a surprising amount. Removing unneeded metadata and attachments is a final small saving.
Size limits you might meet
Many email services limit attachments to around 20 to 25 MB, and the limit applies to the whole message, with the attachment inflated somewhat by encoding. A 20 MB PDF may be rejected where a 14 MB one is accepted. Check the limit with your provider and aim for a clear margin.
Application forms for jobs, courses, benefits and permits often set their own limits, sometimes as low as 2 MB per file. Read the instructions, including the file types allowed, and test the upload before the deadline.
If you cannot reach the target without ruining the document, consider sharing a link to the file through a shared storage service, or splitting the document into two parts, if the recipient allows.
Things to watch for
Check that signatures, stamps and handwritten notes survive the compression. Thin lines can break up at low resolution. For legal and official documents, make sure the recipient is happy with a compressed copy.
Check that text can still be searched or selected if it could before. A scan that has been through text recognition has an invisible text layer, and some tools drop it. If you need it, check afterwards.
Do not compress the same file repeatedly. Each lossy pass degrades the images a little more. Always compress from the original, not from a copy you have already compressed.
Tools mentioned in this guide
Compress PDF
Make a PDF smaller by shrinking its photos, with the sizes before and after.
PDF & filesMerge PDF Files
Combine several PDF files into one document in the order you choose.
PDF & filesSplit PDF & Extract Pages
Pull out pages, remove pages or split a PDF into smaller parts.
PDF & filesPDF Page Counter
Count the pages in one or many PDF files.
PDF & filesReorder & Delete PDF Pages
Move pages up or down, remove the ones you do not want and save a new PDF.
ImagesImage Compressor
Shrink and resize PNG, JPEG and WebP images.
Frequently asked questions
Can I compress a PDF without losing any quality?
Only a little. Lossless methods keep everything but save less. Larger savings come from lowering image resolution or quality, so the aim is to lose detail nobody needs.
What resolution should a scanned PDF be?
150 dpi is often enough for reading on screen, and 200 to 300 dpi for printing. Check small text before sending.
Why is my PDF so large?
Most often because of large images or scanned pages. Text-only documents are usually small.
What is the usual email attachment limit?
Many services allow around 20 to 25 MB per message. Check with your provider and keep a margin.
Is it all right to compress the same PDF twice?
It is better not to. Each lossy pass reduces image quality more, so compress from the original every time.