ToolSink
Back to blog

How to Compress a PDF Without Losing Quality

ToolSink Team

Introduction

A PDF's biggest advantage — consistent formatting across every device — is also why file sizes balloon. High-resolution scanned images, embedded fonts, and interactive form fields all add up fast, and "file too large" errors when emailing a document are common enough to be genuinely annoying.

Compression doesn't have to mean visible quality loss. Understanding what compression actually does lets you pick a method that shrinks the file without wrecking the parts that matter.

What compression actually does

Lossless vs. lossy

  • Lossless compression removes redundant data (repeated patterns, unused metadata) without touching the actual image or text data. Quality is 100% preserved, but the size reduction is usually modest.
  • Lossy compression — mainly applied to embedded images — permanently discards some image data to shrink file size much further. Done well, it's visually indistinguishable from the original; done aggressively, it introduces visible blur or JPEG artifacting.

Image downsampling

Images are usually the main contributor to PDF file size. Downsampling reduces image resolution (measured in DPI — dots per inch). 72–150 DPI is generally enough for on-screen reading; print output needs at least 300 DPI. Compressing a PDF meant for printing down to screen-resolution DPI is the most common way people accidentally wreck print quality.

Font subsetting

If a PDF uses a custom font, the entire font file might be embedded even though the document only uses a fraction of its characters. Subsetting keeps only the glyphs actually used — a lossless size reduction with zero visual impact.

Removing unnecessary elements

Hidden metadata, unused bookmarks, embedded thumbnails, and orphaned objects can be stripped out safely — this is also lossless.


Method 1: Online compressors

For a one-off file, a browser-based compressor is the fastest route — no installation, and it works the same regardless of your OS. Most give you a compression level choice:

  • Basic/Recommended — modest size reduction, minimal visual impact. Good default for most documents.
  • Strong/High — larger reduction, but check the output images at actual size afterward; this is where lossy image compression starts to show.

Privacy note: if you're compressing anything sensitive, use a tool that either processes files client-side in your browser (nothing is ever uploaded) or that explicitly states files are deleted from their servers after processing. ToolSink's PDF Compressor processes files without requiring an account or watermarking the output.

Method 2: Built-in OS tools

If you'd rather not use a web tool at all, both major desktop OSes have a compression route already installed.

macOS — Preview:

  1. Open the PDF in Preview
  2. File → Export (not "Export as PDF")
  3. In the dialogue, open the Quartz Filter dropdown
  4. Select Reduce File Size
  5. Click Save

Preview's default filter can be aggressive on images — if the result looks noticeably blurry, a custom Quartz Filter (built via ColorSync Utility) gives finer control over the compression level.

Windows — Print to PDF:

  1. Open the PDF in a browser or reader
  2. Ctrl+P
  3. Set the printer/destination to Microsoft Print to PDF
  4. Print, then save the output file

This effectively flattens the document — it reduces size but also removes interactive elements like fillable form fields and hyperlinks, so it's a poor choice for anything you still need to be interactive.

Method 3: Command line (Ghostscript)

For batch-processing many files, or when you want precise control over the compression setting, Ghostscript (free, cross-platform) handles PDF compression directly:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
   -dPDFSETTINGS=/ebook \
   -dNOPAUSE -dQUIET -dBATCH \
   -sOutputFile=output_compressed.pdf input.pdf

The -dPDFSETTINGS flag controls the trade-off directly:

  • /screen — lowest quality, smallest file (72 DPI images)
  • /ebook — medium quality, good balance for most documents (150 DPI)
  • /printer — higher quality (300 DPI), larger file
  • /prepress — highest quality, preserves color fidelity for commercial printing

This is the same underlying compression logic as the GUI tools above, just with an explicit, repeatable setting — useful if you're compressing dozens of files the same way rather than checking each one individually.


Choosing the right approach

Know your destination first. Compressing for print and compressing for screen are different jobs:

  • For print: stay at 300 DPI or above; avoid aggressive lossy image compression
  • For screen/web: 72–150 DPI is fine, and you can compress more aggressively

Keep the original. Lossy compression is one-directional — save the compressed version as a new file rather than overwriting your source, in case you need the full-quality original again.

Check the actual output. Numbers on a progress bar don't tell you if text got blurry or a hyperlink broke. Open the compressed file, zoom into a few images, and click a link or two before sending it anywhere that matters.

Conclusion

Whether you use an online tool for convenience, your OS's built-in export for a no-install option, or Ghostscript for repeatable batch compression, the underlying trade-off is the same: lossless techniques (font subsetting, metadata removal) cost nothing, while lossy image compression is where you actually decide how much quality to trade for file size.