PDF ExplainedApril 2, 20264 min read

What Is JPEG Compression in PDF? DCTDecode Explained

JPEG (DCTDecode) is the lossy compression used for photographs in PDF. Learn how JPEG quality settings affect PDF file size and image quality, and when to use it.

JPEG compression (called DCTDecode in PDF — after the Discrete Cosine Transform it uses) is the standard lossy compression applied to photographic images in PDFs. It achieves very high compression ratios — typically 10:1 to 20:1 — by discarding high-frequency image detail that the human visual system is less sensitive to. JPEG is responsible for the largest file size savings in image-heavy PDFs.

How JPEG Compression Works in PDF

JPEG divides an image into 8×8 pixel blocks. Each block is transformed from pixel values to frequency coefficients using the Discrete Cosine Transform (DCT) — similar to how audio is decomposed into frequency components. High-frequency coefficients (fine detail) are quantized (rounded to coarser values) based on a quality setting. The quantized coefficients are then Huffman-coded. Lower quality = more aggressive quantization = smaller file = more visible "compression artifacts" (blocky edges, color banding, blur).

JPEG Quality in PDF Export

PDF export tools typically offer JPEG quality settings from 1-100 or Low/Medium/High/Maximum. Common recommended levels: Quality 75-80: excellent for screen-only PDFs — typically indistinguishable from original at normal viewing distances; good compression ratio (5:1 to 10:1). Quality 90-95: for print PDFs where high fidelity matters; minimal visible artifacts; moderate compression (3:1 to 5:1). Quality 100: near-lossless JPEG; very large file; marginal improvement over 95 for most images. Below quality 50: visible artifacts at normal zoom; only acceptable for thumbnail-size images.

JPEG Limitations in PDF

JPEG should not be used for: line art and text images (the blockiness artifacts are very visible on sharp edges and text; use lossless compression for these), images with large flat-color areas (compression creates color banding), images requiring transparency (JPEG has no alpha channel — PNG or JPEG2000 with alpha is needed), or medical and scientific images where exact pixel values matter. In mixed-content PDFs, use JPEG for photographs and Flate/lossless compression for screenshots, diagrams, and text images.

JPEG 2000 in PDF

JPEG 2000 (JPXDecode in PDF) is a more modern compression standard that offers better quality at the same file size (or same quality at smaller size) than JPEG, supports lossless compression, and handles alpha channels. It's used in PDF/A-2 and later, and in some professional workflows. However, JPEG 2000 is computationally more expensive to encode and decode, and some older PDF workflows don't support JPXDecode. For most practical purposes, JPEG at quality 80-85 and JPEG 2000 at equivalent quality produce similar results.

Try Compress PDF Now — Free

Browser-based, private, and instant. No account or software required.

Open Compress PDF
Report Bug
Send Feedback
Feature Request