PDF compression reduces file size by optimizing how data is stored within the document. There are two fundamental approaches: lossless compression, which reduces size without any quality loss, and lossy compression, which sacrifices some quality for significantly smaller files. Understanding the difference helps you choose the right method for each document. The choice between lossless and lossy compression depends on how the PDF will be used — screen viewing, email sharing, archival storage, or professional printing each have different quality requirements.
Lossless compression works by eliminating redundant data — removing duplicate objects, optimizing the internal file structure, and applying algorithms like Flate (ZIP) compression to streams. The decompressed output is bit-for-bit identical to the original. Typical savings are 10-30%. Lossy compression primarily targets images within the PDF, re-encoding them at lower quality using JPEG compression. Text and vector graphics remain untouched. Typical savings are 50-90%, depending on how aggressively images are compressed. The quality loss is often imperceptible for screen viewing but may be noticeable in print.
What Gets Compressed
PDF compression can target several elements: images (the biggest opportunity — downsampling resolution and increasing JPEG compression), fonts (subsetting to include only used characters), metadata (stripping unnecessary information), document structure (removing duplicate objects, unused resources, and obsolete data), and content streams (applying more efficient encoding). Most compression tools focus on images because they typically account for 80-95% of file size in image-heavy documents.
How to Compress a PDF Effectively
1
Assess the document
Determine what the PDF will be used for — screen viewing, email sharing, or printing. This determines your acceptable quality level.
2
Choose your compression level
Use lossless for documents where every detail matters. Use moderate lossy compression for general sharing. Use aggressive compression for email attachments where size is critical.
3
Compress and compare
Run the compression, then compare the result with the original. Check images, text clarity, and any fine details that matter for your use case.
Advanced Compression Algorithms in PDFs
PDFs employ multiple compression algorithms, each optimized for different content types. Flate (deflate/ZIP) compression is the standard lossless method for text and vector graphics. JPEG compression handles photographic images with configurable quality levels. JPEG2000, available since PDF 1.5, offers better compression ratios than JPEG with wavelet-based encoding and supports both lossy and lossless modes. JBIG2 is specifically designed for bi-level (black and white) images like scanned text, achieving compression ratios of 3 to 10 times better than standard methods. CCITT compression, based on fax encoding standards, is used for monochrome images. Choosing the right algorithm for each content element is key to optimal compression.
Compression for Different Use Cases
The optimal compression strategy varies by document purpose. For email attachments, aggressive lossy compression at JPEG quality 60 to 75 produces the smallest files while remaining readable on screen. For web publishing, moderate compression at quality 75 to 85 balances download speed with acceptable visual quality. For office printing, light compression at quality 85 to 95 preserves sufficient detail for standard printers. For commercial printing, use lossless compression only to maintain every detail the printer can reproduce. For archival storage, PDF/A-2 allows JPEG2000 lossless compression, combining standards compliance with efficient storage.
Measuring and Comparing Compression Results
Effective compression requires measuring results objectively. Compare file sizes before and after to calculate the compression ratio. Visually inspect key areas at 100 percent zoom — not at higher zoom levels, which reveal artifacts invisible at normal viewing. For critical documents, compare specific details like fine text, thin lines, and gradient transitions. Note that compression effectiveness varies dramatically between document types: a scanned document might compress by 90 percent while a text-only document might save only 15 percent. Establish target size ranges for your common document types so you can quickly assess whether compression settings are appropriate.