Skip to content
English
The WorkbenchTools that upload nothing
A workshop by the ODERSA associationNothing leaves, nothing is kept, nothing reaches us.

The workshop · Shrink a PDF

How it works : Shrink a PDF

The weight of a PDF is nearly always its images. The tool lists them one by one, says what it can do with each, and shows the real gain before and after. When there is nothing to gain, it says so instead of handing you the same file under another name.

Open the tool

A twenty megabyte PDF is nearly always a scan or an illustrated document: its images carry all the weight and the text carries none. That is the first thing to understand if you do not want to be taken in by sites promising to compress any PDF at all.

Rewriting a PDF without touching its images gains almost nothing, and we measured it: on a three image document, a full rewrite returned five bytes. The standard does in fact exclude image streams from the object compression mechanism. The only real lever is to RE-ENCODE the images, and that is what this tool does.

It works in the open. Every image in the document is listed with its dimensions, its weight and how it is encoded. The ones it can re-encode, it says so; the ones it must not touch, it says so too, with the reason. At the end the gain is shown image by image, and the file you get is read back to count its pages.

How it works

  1. Drop your PDF in. The tool opens the document, finds its images, and lists them for you before touching anything.
  2. Set the maximum width and the quality. On a scan, cutting the resolution usually gains more than lowering the quality.
  3. Click. The file arrives, and the gain table tells you what was re-encoded and what was left alone.

Formats accepted

PDFs only. To shrink a single image, the “Compress and resize” tool in the image corner is more direct and works in batches.

PDF document

Text, fonts and page structure are copied without being touched. Only the document's JPEG images are re-encoded, and only the ones your browser can decode.

See the compatibility matrix

Its limits

The tool re-encodes JPEG images, and only those

They are the ones that make the weight of a scan or a photo document, and they are the ones a browser can decode on its own. An image stored some other way in the document (lossless compression, black and white fax image, one bit stencil image) is left untouched and its row in the table says so, with its reason. Reworking what you cannot read back is the surest way to wreck a file.

A four colour print image is left untouched, and the tool names it

A four component JPEG comes out of a printing chain. Browsers do not decode it, and Adobe also inverts its values in a way you have to know about if you do not want to hand back a negative. We spot those images by reading their header, we leave them exactly as they are, and we say so: a tool that returned your photos as negatives would be worse than a tool that does nothing.

A PDF that is only text will not shrink here

There is nothing to re-encode: the text of a PDF is already stored compactly, its fonts weigh a few tens of kilobytes, and the standard (clause 7.5.7) excludes streams from the object compression mechanism. We measured it: minus five bytes on a three image document. The tool will tell you, instead of handing back a nearly identical file and letting you believe work was done.

Re-encoding is a permanent LOSS

An image re-encoded as a lower quality JPEG cannot be restored: the detail that was wiped out is gone. Keep the original if the document has archival value. The tool shows the gain for each image so you can judge whether the trade was worth it, and a preview of the first re-encoded image is shown before and after.

A transparent image keeps its mask, which is not re-encoded

In a PDF, an image's transparency lives in a second greyscale image sitting beside it. JPEG cannot carry transparency: so we re-encode the visible image and leave its mask intact. That is the safest behaviour, and it is also why a transparent image gains less than the others.

80 MB

The whole document, its decoded images and its lightened version all live in memory at the same time. That is the honest limit of one tab on a modest device, and re-encoding images is the hungriest operation on this whole site.

A password protected PDF will not open here

It has to be unlocked first, which takes its password. The “Password protect a PDF” tool in the same corner knows how.

Questions about this tool

Is my document sent anywhere?

No, and you can check it in thirty seconds. Open the inspector with the F12 key, the “Network” tab, clear the list, then drop the document in and shrink it. Not one line appears. Cut your connection and do it again: the tool works the same, because decoding and re-encoding the images is done by your browser itself.

Why will my text PDF not shrink?

Because there is nothing to shrink, and that is good news. The text of a PDF is already stored compactly, its fonts run to a few tens of kilobytes, and the standard forbids compressing streams along with the rest of the objects. We measured the gain of a full rewrite on a three image document: five bytes. Sites announcing “up to 90 %” on any PDF at all are really talking about documents full of images, and they re-encode those images exactly as we do.

Is it better to cut the width or lower the quality?

Cut the width, nearly always, and above all on a scan. The weight of an image runs roughly with its area: halving the width quarters the area. Dropping the quality below 60 visibly damages flat colours and the fine text of a screenshot, for a smaller gain. Start by bringing the width down to what you are actually going to look at.

Why are some images left untouched?

Because the tool only touches what it can read back, and it names every case for you. A four colour print image comes out of a printing chain, browsers do not decode it and Adobe inverts its values: re-encoding it would return a negative. A losslessly compressed image, a black and white fax image or a one bit stencil image is either already tiny or destroyed by a trip through JPEG. In all of those cases the tool leaves the image exactly where it is.

Can the file I get be heavier than the original?

Yes, and the tool says so plainly instead of hiding it. That happens when the document's images were already better compressed than we can manage, or when you ask for a quality higher than the original's. In that case, keep your original: it is the better one, and an honest tool has to be able to say it brought nothing.

Does this strip my metadata?

No, and that is deliberate: shrinking and cleaning are two different acts, and mixing them would let you believe you had done one when you meant the other. The document's identity card, its XML block and whatever sits on the pages all stay in place. The “Clean a PDF's metadata” tool in the same corner shows them, strips them, then reopens the produced file to say what is left.

Is the quality of the text affected?

No. The text of a PDF is not an image: it is drawing instructions and a font. The tool does not even copy them, it leaves them in the document. The only case where text suffers is a scan, where the text IS an image of text: there, cutting the width makes it less sharp, and that shows up at once in the before and after preview.