How to compress a PDF without uploading it, and what actually shrinks
The mail bounced, the portal has a 10MB limit, the file is 42MB. Every free site that offers to fix it wants the file first. A PDF is almost always big for one reason, and a browser can do something about it without the file leaving your machine.
Open the file in PRESS and pick how the pictures should come down: Screen at 96 dpi for something that will be read on a screen, E-book at 150, Print at 300. Nothing is uploaded and the page works with the network off. The saving comes from four things, and the first is nearly all of it: every picture is brought down to the size it is actually drawn at, repeated pictures are stored once, thumbnails and leftover private data are dropped, and the file is repacked. The words, the fonts and the form fields are left as they were.
Why the file is 42MB
Text is almost free. A page of prose is a few kilobytes of characters and a reference to a font. What makes a PDF heavy is pictures, and pictures in a PDF are usually stored at the size they arrived at rather than the size they are shown at.
A phone photograph dropped into a report is 4000 pixels across. On an A4 page it is drawn about three inches wide. At 96 dpi that needs about 290 pixels. The other 3700 are carried in the file, paid for in megabytes, and never seen by anybody. A twenty-page report with a photograph on each page is carrying twenty of those.
This is why "compressing" a PDF is not like zipping it. A zip looks for repetition in the bytes; a JPEG has almost none left, so a zipped PDF is a PDF of the same size in a wrapper. The saving has to come from deciding that a picture does not need all its pixels.
The four things that make it smaller
- Bringing pictures down to the size they are drawn. PRESS measures how large each picture actually appears on its page, works out how many pixels that needs at the dpi you chose, and resamples anything larger. This is where nearly all of the saving is.
- Storing a repeated picture once. A logo on every page, or the same photograph used twice, is often stored again each time. Identical pictures are kept once and pointed at from everywhere they appear.
- Dropping what is not the document. Page thumbnails the writing program left behind, private application data from whatever made the file, and objects nothing refers to any more. None of it is shown to anybody; some of it is a privacy question as well as a size one.
- Repacking. The file is written back with object streams, which is the compact form of the same structure.
Which setting to choose
There is a JPEG quality setting beside it. The default is chosen to be invisible at normal reading distance; taking it lower saves a little more and starts to show on photographs with flat areas of sky or skin.
Pictures that are not photographs
A screenshot, a logo, a chart or a scanned line drawing is usually stored losslessly with a small number of colours, and re-encoding one of those as a JPEG makes it both larger and worse: flat colour is what JPEG is bad at, and the grey fringes around black text are the visible result. PRESS keeps a lossless picture lossless and repacks it instead, so a logo comes out pixel for pixel what it was.
What will not shrink
This is the part the sites with a progress bar do not tell you.
- A file that is mostly text. If there are no pictures there is nothing to bring down. A 900KB text-only PDF is 900KB of fonts and structure, and it stays about that.
- A file somebody has already compressed. If the pictures are already at their drawn size, the first and largest saving has already been taken. The page will say so rather than pretend.
- Vector drawings. A plan, a map or a chart drawn as lines rather than pixels is instructions, not a picture, and there are no pixels to remove.
- The font files. Fonts are left alone. A document that embeds three full font families is carrying a few hundred kilobytes that this will not touch.
- A scan, past a point. A scanned document is one big picture per page, and it will shrink a great deal — but it is still a picture afterwards, not text. If what you want is a small, searchable file, read the scan with OPTIC first, which writes the words behind the picture.
Look at a page before you keep it
Compression is a judgement about how much detail a document needs, and no setting is right for every file. PRESS shows the page before and after at the same size so you can see what the setting did to the photographs, and lists every picture it changed with the pixels it started and ended with. If it looks wrong, choose a higher setting; nothing has been overwritten, because the original file on your disk was never touched.
What this does not do to the words
The text stays selectable and searchable, the links stay links, and a form stays fillable. What comes out is the same document with lighter pictures — not a picture of the document, which is what "print to PDF" gives you and is the usual reason somebody's compressed file is no longer searchable.
Before you send it anywhere
A smaller file is not a cleaner one. A PDF carries the author's name, the program that made it, and sometimes earlier versions of itself. X-RAY shows what is in there, STRATA digs out the earlier versions a PDF saved inside itself, and CLEANROOM strips the lot in one pass.
The short version
| The job | Here | Notes |
|---|---|---|
| Bring a heavy PDF under an attachment limit | Yes | Usually the Screen setting |
| Keep the file off somebody else's server | Yes | Read and rewritten in the tab; works offline |
| Keep the text selectable and searchable | Yes | Words, fonts and form fields untouched |
| Keep logos and screenshots sharp | Yes | Lossless pictures stay lossless |
| See what the setting did before keeping it | Yes | Before and after, page by page |
| Shrink a PDF that has no pictures in it | No | There is nothing to bring down |
| Shrink one that was compressed already | No | The page says so rather than pretending |
| Subset or remove the embedded fonts | No | Fonts are left as they are |
| Turn a scan into searchable text | No | OPTIC does that first |
Questions people ask about compressing a PDF