Skip to content
ToolkitHub

Compress PDF

Reduce PDF file size

Guide

About lossless vs lossy PDF compression

By Logappradeep · ServiceNow developer

Most oversized PDFs are big for one reason: images. A scanned page saved at high resolution, phone photos dropped into a report or a slide deck with full-size pictures can push a document past email limits even if it only has a few pages. Text and vector graphics, by comparison, take very little space. Understanding that difference helps you pick the right compression level.

The three levels

  • Lossless: the document is re-saved with compact object streams and unused objects are dropped. Nothing visible changes. Savings are modest and depend on how efficiently the original was written; a file exported by a careful program may barely shrink.
  • Strong: embedded images are decoded and re-encoded as JPEG at a lower quality and, where they are larger than needed, a lower resolution. Text, fonts and vector drawings are left alone, so text remains sharp and selectable. This is usually the best balance for scanned documents and image-heavy reports.
  • Extreme: every page is rendered to an image and the PDF is rebuilt from those images. This gives the most predictable small size for complex files, but the text is no longer real text: you cannot select, search or copy it, and it may look slightly soft when zoomed in.

Why images dominate file size

An A4 page scanned at 300 DPI is about 2480 by 3508 pixels, nearly nine million pixels. Stored losslessly, that can be several megabytes per page. JPEG compression discards detail the eye barely notices, and lowering the resolution to around 150 DPI quarters the pixel count while staying readable on screen. A page of plain text, meanwhile, might take only a few kilobytes because it is stored as characters and font references.

Privacy and processing

Compression runs in your browser with pdf-lib, pdf.js and the Canvas API. Images are decoded and re-encoded on your own device, so contracts, IDs and financial statements are not uploaded to a compression service.

Choosing a level

  1. Start with Lossless for text-heavy documents; if the result is still too big, try the next level.
  2. Use Strong for scans and photo-heavy files that must stay searchable.
  3. Reserve Extreme for when you only need a readable copy under a strict size limit, such as a portal capped at 2 MB.

Pitfalls

Compression cannot do much for a PDF that is already optimized; sometimes the output is the same size or even marginally larger, in which case keep the original. Fine print in scans and detailed charts can blur at aggressive settings, so zoom in and check before sending. Extreme mode removes form fields, links and selectable text, and any digital signature is invalidated by any level of recompression. Always keep the original file.

Frequently asked questions

Why did my PDF barely get smaller?

Files that are mostly text or were already optimized have little to remove. Strong compression only helps when the file contains large images.

Will I still be able to search the text?

With Lossless and Strong, yes. Extreme turns each page into an image, so text can no longer be selected or searched.

Where is my document processed?

On your own device. The PDF is compressed in the browser tab and never sent to a server.

Is there a file size limit?

No fixed limit, but large scanned files need a lot of memory to decode. If a big file fails on a phone, try a desktop browser.