Advanced PDF Compression Settings — A Complete Guide
Most PDF compression guides tell you to select 'Medium' quality and move on. That's fine for casual use, but if you regularly compress PDFs for different purposes — client deliverables, web publishing, email attachments, professional printing — you need to understand what each setting actually does so you can make informed choices rather than guessing. PDF compression primarily works by controlling three variables: the target DPI for embedded images (how many pixels per inch after compression), the JPEG quality coefficient applied to each image (how aggressively the JPEG algorithm compresses), and the colour mode (colour, greyscale, or black-and-white). Understanding these three levers gives you precise control over the file-size-to-quality trade-off.
Understanding DPI Targets in Compression Presets
DPI (dots per inch) determines how many pixels are stored per inch of printed page. Higher DPI means more pixels, more detail, and larger file size. The relationship is quadratic: doubling DPI quadruples the number of pixels (and roughly quadruples image file size). This is why going from 300 DPI to 150 DPI reduces image data by 75%, while going from 300 DPI to 72 DPI reduces it by 94%. Ghostscript's (and LazyPDF's) quality presets map to these DPI targets: Screen = 72 DPI, Ebook = 150 DPI, Printer = 300 DPI, Prepress = 300 DPI with colour preservation. Choose your target DPI based on the lowest-quality display or print scenario you need to support.
- 1For email attachments viewed on screens only: use Screen (72 DPI) or Ebook (150 DPI).
- 2For documents that may be printed on a home/office printer: use Printer (300 DPI).
- 3For professional print shop output: use Prepress or no compression.
- 4Test your chosen setting by zooming to 100% in a PDF viewer before distributing.
JPEG Quality and Its Effect on Image Appearance
JPEG compression introduces blocking artifacts — the characteristic pixelated blocks visible in low-quality images. The JPEG quality coefficient runs from 0 (maximum compression, severe artifacts) to 100 (minimal compression, nearly lossless). Ghostscript's Screen preset uses JPEG quality around 30–40, Ebook uses 60–70, and Printer uses 80+. Artifacts are most visible at image edges, in areas of subtle tonal gradation (sky, skin), and in text rendered as images. For documents where image quality is critical, use Printer or Prepress quality. For documents with mostly vector text and only occasional photos, Screen quality works well because vector text is unaffected by JPEG compression — only the raster images degrade.
Colour Mode Selection for Maximum Compression
Colour PDFs are significantly larger than greyscale PDFs because colour images store three values per pixel (R, G, B) instead of one. Converting a colour PDF to greyscale can reduce file size by 50–70% on top of any DPI-based compression. For text-only documents, legal contracts, academic papers, or any document where colour adds nothing — greyscale compression is the right choice. For marketing materials, product catalogues, or anything where colour conveys information or brand identity — keep colour. LazyPDF and Ghostscript use RGB colour mode by default, which is correct for screen-viewed documents. For documents going to professional printing, Prepress quality uses CMYK-compatible colour handling. Mixing colour spaces incorrectly can cause colour shifts, so stick to RGB for screen and web distribution.
- 1Assess whether your document actually needs colour — text documents rarely do.
- 2For greyscale conversion: open the PDF in GIMP or use a Ghostscript greyscale command.
- 3Combine greyscale conversion with 150 DPI resampling for dramatic size reduction.
- 4For screen documents, always output in RGB colour mode rather than CMYK.
Optimise Differently for Different Content Types
The optimal compression strategy depends on what your PDF contains. For text-only PDFs (no images): Ghostscript compression adds little value since fonts are already efficiently encoded — the main gain comes from subsetting fonts more aggressively. For scanned PDFs: compression is extremely effective, often achieving 70–80% reduction. For mixed content: the settings affect raster images but not vectors, so you can use aggressive settings without worrying about text quality. For image-heavy PDFs that are professional deliverables, consider the two-pass approach: extract pages with images using PDF-to-JPG, manually compress those images in an image editor at your chosen quality level, then reassemble. This gives more control than a blanket PDF compression setting.
Frequently Asked Questions
What is the 'Prepress' compression setting and when should I use it?
Prepress quality targets professional offset printing. It maintains 300 DPI image resolution and uses colour profiles appropriate for print colour management (CMYK output intent). Unlike the Printer setting, Prepress preserves ICC colour profiles embedded in images rather than converting to a standard RGB colour space. Use Prepress only when sending files to a professional print shop that has told you they need press-ready PDFs. For all other uses, Printer quality is appropriate and produces smaller files.
Why does my PDF get slightly larger after running through some compressors?
Some PDFs are already very efficiently compressed, or they use specialised lossless compression that a general-purpose compressor replaces with less efficient JPEG compression. PDFs containing mostly vector graphics (no raster images) show the smallest gains from compression and can occasionally get marginally larger if the compressor re-encodes streams with more overhead than the original. If a compressor makes your file larger, the original was already well-optimised — leave it as-is.
How do I compress a PDF to exactly a specific file size target?
Exact file size targeting isn't directly supported by standard compression presets — they target quality levels, not specific sizes. The practical approach is iterative: compress at Screen quality and measure the result. If still too large, split the PDF and compress sections separately, or pre-process images at lower resolution before creating the PDF. For a specific size like 'under 10 MB for email', Screen quality is almost always sufficient for documents of typical length. For 'under 1 MB', you likely need to split the document or reduce image content significantly.