← Back to All Guides
PDF Optimization • 8 min read • September 18, 2026

The Comprehensive Guide to PDF Compression: Lossless vs Lossy, DPI, and Stream Optimization

An engineering breakdown of PDF internals, raster image downsampling, font subsetting, and techniques to meet strict upload limits without losing readability.

By ToolHero PDF Engineering Team

Why Do PDF Files Become So Large?

The Portable Document Format (PDF) was developed by Adobe in 1993 to present documents consistently across diverse hardware and operating systems. However, modern PDFs created by Word, Google Docs, scanners, and design software frequently balloon into massive 20MB–100MB files.

The primary culprits behind bloated PDF sizes include:

  • Uncompressed Embedded Bitmaps: When you paste photos or scanned receipts into a document, the original raw resolution (often 300 to 600 DPI) is stored inside the PDF container.
  • Full Font Embedding: Instead of embedding only the glyphs used in the text (font subsetting), software often embeds the entire font family (Regular, Bold, Italic, Greek, Cyrillic) inside the file.
  • Redundant XML Metadata & Revision History: PDF editors frequently retain unneeded metadata, editing session checkpoints, thumbnail caches, and private application blobs.
  • Duplicate Graphic State Dictionaries: Multiple identical vector state objects repeatedly defined across multiple pages.

Understanding the Two Types of PDF Compression

PDF COMPRESSION
                               │
            ┌──────────────────┴──────────────────┐
            ▼                                     ▼
     LOSSLESS COMPRESSION                  LOSSY COMPRESSION
  (Metadata, Fonts, Streams)           (Raster Image Downsampling)
            │                                     │
   • Strip metadata dictionaries          • Downsample 300 DPI -> 150 DPI
   • Flate stream deflation               • Recompress JPEG at 0.75 quality
   • Font subsetting                      • Convert RGBA to RGB
   • Zero visual change                   • Subtle, controlled loss

1. Lossless Stream Optimization

Lossless compression reduces file size without altering a single pixel or character of your document:
  • Flate / Deflate Algorithm: PDF content streams (page layout instructions, vector lines, text positioning) are compressed using the Lempel-Ziv 1977 (LZ77) and Huffman coding algorithms (/FlateDecode).
  • Object Stream Consolidation: Grouping individual small PDF objects into compressed object streams, reducing cross-reference table (xref) overhead.
  • Metadata & Cache Stripping: Removing unnecessary author metadata, scanner software signatures, and thumbnail previews.
  • 2. Lossy Image Downsampling & Requantization

    Because images typically account for 80% to 95% of a PDF's total file size, intelligent image optimization provides the greatest space reduction:
  • DPI Downsampling: Print documents require 300 DPI, but standard computer screens and mobile displays only render between 72 DPI and 150 DPI. Reducing image resolution from 300 DPI to 150 DPI reduces pixel count by 75% with zero discernible loss on screens.
  • JPEG Quantization Optimization: Recompressing raw or uncompressed TIFF/PNG streams into high-quality JPEG streams at quality factors between 0.65 and 0.85 yields dramatic size reductions.

  • Optimal Compression Settings by Use Case

    | Target Destination | File Size Limit | Target DPI | Recommended Quality | Expected Savings |
    | :--- | :--- | :--- | :--- | :--- |
    | Email Attachments | 20MB – 25MB | 150 DPI | Balanced (65–75%) | 50% – 70% |
    | Govt / University Portals | 1MB – 2MB | 120 DPI | High Compression (50–60%) | 70% – 85% |
    | Strict Application Forms | 500KB | 96 DPI | Ultra Compact (35–45%) | 80% – 92% |
    | Archival / Digital Legal | No strict limit | 200 DPI | High Quality (80–90%) | 30% – 50% |


    Step-by-Step Optimization Strategies

    1. Scanned Paper Documents

    Scanners frequently output documents as raw 300 DPI or 600 DPI color images. If your document is primarily black-and-white text:
  • Convert color scans to grayscale or monochrome. Color scans contain 24 bits per pixel (8 bits each for Red, Green, Blue), whereas grayscale requires only 8 bits per pixel—instantly slashing image data by 66%.
  • Use our client-side Compress PDF tool with "Strong Compression" to automatically downsample pages to 120–150 DPI.
  • 2. Digital Presentations & Resumes

    Resumes and slide decks exported to PDF often contain oversized company logos or high-resolution background graphics:
  • Ensure embedded profile photos are cropped to the actual display dimensions before export.
  • Avoid exporting PDFs with "Print Quality / Press Quality" presets unless you are sending the document to an offset printing press. Always choose "Standard / Screen Quality".

  • Frequently Asked Questions

    Will compressing a PDF make text blurry?

    No. Vector text in PDFs is rendered using mathematical Bezier curves and font glyphs, not raster pixels. Text remains razor-sharp at any zoom level. Only embedded bitmap photographs and scanned images are affected by lossy downsampling.

    Can I re-expand a compressed PDF back to its original size?

    Lossless stream optimizations can be reversed, but lossy image downsampling permanently discards redundant pixel data. If you need original 600 DPI prints in the future, always keep a copy of the original uncompressed file.

    Frequently Asked Questions

    What is the difference between lossless and lossy PDF compression?

    Lossless PDF compression optimizes text streams, vector paths, and metadata tables without altering a single pixel. Lossy compression downsamples high-resolution embedded raster photographs and re-encodes DCT streams at calibrated quality levels.

    Why did my compressed PDF barely reduce in file size?

    If your PDF already contains pre-optimized, highly compressed JPEG images and lacks redundant embedded font subsets or uncompressed streams, additional compression cannot yield significant reductions without degrading visual clarity.

    Are vector graphics and text sharpness affected by PDF compression?

    No. Vector fonts and mathematical curve paths retain full crispness at any zoom level. Only embedded raster photographs are resized.

    Put This Theory Into Practice

    Experience zero-upload, client-side processing with ToolHero suite of free online utilities.

    Explore All Free Tools →