Digital compression visualization with PDF files and optimization tools

How to Reduce PDF File Size Without Losing Quality

Illustration of a large PDF compressed into a smaller file without quality loss

The honest version of this topic starts with a correction. "Without losing quality" is achievable for some PDFs and impossible for others, and which category your file falls into is decided before you open any compression tool. So the first job is not compressing. It is finding out what is actually taking up the space.

First, work out why your file is big

Divide the file size by the page count. That single number tells you most of what you need to know.

A second check takes five seconds: try to select text on a page. If the cursor highlights words, you have a text PDF. If it selects nothing, or draws a box across the whole page, every page is an image and you are dealing with a scan. These two file types need opposite treatment, and confusing them is the most common mistake people make.

What is actually lossless, and what it saves you

There are genuinely lossless ways to shrink a PDF. They just do not save much, which is why nobody advertises them.

Everything else that shrinks a PDF meaningfully is lossy. Downsampling images throws away pixels. Re-encoding them at a lower JPEG quality throws away detail. Converting to grayscale throws away colour. These are the levers that actually move a 40 MB scan, and every one of them costs you something. The only real question is whether the cost is visible at the size the document will be read.

Resolution targets that mean something

Exactly what RaptorPDF's compressor does

We would rather describe this precisely than call it intelligent. Our compressor renders each page with pdf.js and re-embeds the result as a JPEG image. That is the whole mechanism. The three settings are:

Less compression

Renders at 2.0× scale and encodes at JPEG quality 0.85. Because scale 1.0 corresponds to 72 dpi, that is roughly 144 dpi. Fine for screen, marginal for print.

Recommended

1.4× scale at quality 0.70, or about 101 dpi. An A4 page comes out around 833 × 1,179 pixels. This is the setting that suits most scans destined for email.

Extreme

0.9× scale at quality 0.50, about 65 dpi. Use it when the alternative is not sending the file at all. Anything smaller than 12-point text will suffer visibly.

Grayscale switch

Available with any level. On a scan of black text on white paper this is often the largest single saving available, and it costs you nothing you were using.

When this approach is wrong

Rasterising a page is a blunt instrument, and on the wrong document it does real damage. Before you run our compressor on a text PDF, know what happens:

For a text document that is genuinely too large, the fix is upstream. Go back to the original Word document, Google Doc, or Keynote file, downsample the images inside it, and export again. Word and Pages both have a reduced-size PDF export option that downsamples images while leaving text as text, which is the thing a page-rasterising compressor cannot do. If the source file is gone, a desktop tool with a real image-level optimiser is the correct purchase; we do not have one.

The one case where local processing costs you

Server-side compressors can afford to parse the PDF's object graph, find each embedded image, downsample that image alone, and leave the text and vector layers untouched. That is the right algorithm, and it is why a good cloud compressor beats us on a mixed text-and-image document. What they need in exchange is your file. We chose the other side of that trade: nothing is uploaded, and the price is a cruder algorithm. On scans the difference barely shows. On a 200-page report with a chart on every page, it shows a lot.

There is also a hard ceiling. The document has to fit in your browser tab, several times over once it is rendered. Our free plan accepts files up to 50 MB and Pro up to 300 MB, but on a phone the practical limit arrives well before either number, and a 300-page scan will take minutes of your own CPU rather than seconds of somebody's server farm.

Compressing for email, with the arithmetic

Gmail caps messages at 25 MB, and this is where people get caught out. Attachments are base64 encoded for transport, which inflates them by about a third. A 19 MB PDF becomes roughly 25.3 MB on the wire and bounces. Aim for 18 MB or less if you want a 25 MB limit to hold, and lower if you do not know the recipient's server configuration, because corporate mail gateways are often stricter than the consumer services.

If the file will not get under the limit without becoming unreadable, stop compressing and change the delivery method. Split the document into parts, or share a link. A split by page range is lossless, because it copies the original page objects rather than re-rendering them, so two halves of a scan are exactly as sharp as the original was.

Check the result before you send it

  1. Try to select text. If you cannot, the page was rasterised. Decide whether that is acceptable for this document.
  2. Zoom to 100% and read the smallest text on the page. Not the heading. The footnote, the figure caption, the signature block.
  3. Check one photograph closely. JPEG at quality 0.50 produces blocking artefacts around high-contrast edges, and faces show it first.
  4. If it will be printed, print one page. Screens forgive 100 dpi. Paper does not.

Compress a scan without uploading it

Three quality levels and a grayscale option, all running in your browser. Best on scans and photo-heavy documents; poor on text-only files, for the reasons above.

Open the compressor

All RaptorPDF tools

The rule worth remembering

Scans compress well because they are photographs of paper and contain far more data than the information on the page requires. Text PDFs compress badly because they are already close to the minimum size their content allows. If your file is a scan, compress aggressively and use grayscale. If it is text and still too big, the problem is an oversized image inside it, and you fix that where the document was written, not here.

Related reading

Compress PDFHow to change PDF sizeCompress PDF for email