Home / Blogs

Guides

PDF Compression Explained: Lossless vs. Lossy & Meeting Upload Limits

How PDF compression works under the hood, how downsampling and stream deflation reduce size, and how to keep text crisp while hitting strict 200 KB or 1 MB portal caps.

Few error messages are as frustrating as an upload gatekeeper that rejects your file: "Document exceeds maximum file size of 200 KB." Whether applying for a civil service exam, submitting university admissions, filing corporate taxes, or attaching a resume to an employer portal, strict size limits are everywhere.

To successfully shrink a PDF without turning your important documents into unreadable blurry smudges, it helps to understand what makes a PDF heavy in the first place and how modern compression algorithms optimize internal data streams.

What Actually Takes Up Space Inside a PDF?

A PDF is essentially a container structured as an internal object graph. When a PDF balloons to 5 MB or 15 MB, the size almost always originates from one of four sources:

  • High-Resolution Raster Scans: When you scan a document or photograph a certificate with a modern smartphone, the camera captures an image at 300 to 600 DPI (Dots Per Inch) in full 24-bit RGB color. A single page image can easily take 2 to 4 megabytes.
  • Full Font Embedding: When saving from desktop publishing software, the entire character set of several fonts might be embedded in the document, even if only a dozen letters are used.
  • Uncompressed Metadata and Object Streams: Edit histories, structural XML tags, thumbnails, and uncompressed PDF stream dictionaries inflate file overhead.
  • Repeated or Duplicated Assets: Background logos, letterhead headers, and company banners embedded multiple times across different pages.

Lossless vs. Lossy Compression: What's the Difference?

PDF compression uses two distinct strategies depending on the nature of the content:

1. Lossless Compression (Flate / Deflate)

Lossless compression works like a ZIP archive. Algorithms like Flate/Deflate find repetitive patterns in vector graphics, font dictionaries, and text streams, encoding them into compact mathematical representations without altering a single bit of information. Text remains 100% identical and razor-sharp, but the file size decreases by 10% to 30%.

2. Lossy Compression (Image Downsampling & Re-Encoding)

Because raster photographs and scans account for over 90% of file weight in most bloated PDFs, lossy image compression provides the most dramatic size reduction. This involves two steps:

  • DPI Downsampling: A 300 or 600 DPI image is rescaled to 150 DPI (standard print quality) or 72 DPI (standard web screen resolution). This reduces the total pixel count by up to 75% without compromising legibility on standard screens.
  • DCT (JPEG) & WebP Quantization: Image blocks are compressed using perceptual quantization that discards subtle color nuances imperceptible to the human eye while preserving sharp contrast around letter edges.

Practical Tips for Hitting Strict Portal Limits (e.g., 200 KB or 500 KB)

If you have an aggressive upload limit, follow these proven techniques:

  1. Convert Scans to Grayscale: Full-color scans store red, green, and blue color channels (24 bits per pixel). Converting an all-text document to grayscale or pure black and white immediately cuts image payload by two-thirds without losing legibility. Use the B&W PDF tool before compressing.
  2. Remove Blank and Extraneous Pages: Review the document in Organize PDF or Trim PDF to drop cover pages, blank separator sheets, and legal disclaimers not required by the form.
  3. Avoid Multi-Pass Compressing: Compressing an already compressed JPEG creates digital compression artifacts (halos around text). Always start with your clean original file when trying different target sizes.
  4. Target 150 DPI for Balanced Submissions: For official portals where documents might be printed by officials, 150 DPI is the sweet spot: text remains readable and clear, but file size drops by up to 80%.

Private, In-Browser Compression

With PDFMasala's Compress PDF tool, you can select specific DPI presets or enter an exact target file size in kilobytes. Because the compression runs locally on your device, your government IDs, academic transcripts, and personal bank statements are compressed safely without ever leaving your computer.

Keep reading