Skip to main content
VVertex Solutions
All toolsPDF ToolsImage ToolsText ToolsCalculatorsDeveloperBlog
VVertex Solutions

Browse tools for merging and compressing PDFs, resizing and converting images, formatting text and JSON, running calculators, and working with code.

Popular Tools

  • Mortgage Calculator
  • GPA Calculator
  • Tip Calculator
  • BMI Calculator
  • Percentage Calculator
  • EMI Calculator
  • Merge PDF
  • JSON Formatter

Categories

  • All tools
  • PDF Tools
  • Image Tools
  • Text Tools
  • Calculators
  • Developer Tools

Company

  • About
  • About the Author
  • Editorial Standards
  • How We Verify Tools
  • How Data Is Processed
  • Calculator Comparisons
  • Disclaimer
  • Privacy Policy
  • Cookie Policy
  • FAQ
  • Accessibility
  • Changelog
  • Terms of Service
  • Contact
  • Blog
  • RSS Feed

© 2026 Vertex Solutions. All rights reserved.

Free tools. No signup. Privacy first.

  1. Home
  2. Blog
  3. How PDF Compression Works Under the Hood
Digital Documentsinformational6 min readPublished 2026-03-24 · Last updated 2026-10-23

How PDF Compression Works Under the Hood

PDF compression is a set of choices about images, fonts, and structure. Here is what actually changes when you hit compress.

By Rehan Baqir

Related

  • when compression is a bad idea
  • what sets an image file’s size

Quick answer

PDF compression shrinks files mainly by downsampling and re-encoding embedded raster images (such as scanned pages and photos) and stripping duplicate font subsets or unused objects. Born-digital text pages are already compact vector instructions, which is why a 12-page scan can drop by 80% while a 100-page text report barely changes.

Compress PDF mostly rewrites embedded images and leftover objects. It does not invent a smaller copy of text that is already compact, and it cannot undo a page that was flattened into a picture. A 120-page annual report exported from Word may shrink by only 4% in the same tool that takes a 12-page scan of signed contracts from 48 MB to 6 MB. The gap follows from what is inside the file.

A PDF is a container, not a single image

From the outside, a PDF is one file. Inside, it is a bundle:

  • Pages that reference content streams
  • Fonts, embedded or referenced
  • Images: photos, logos, scanned page bitmaps
  • Vector graphics: lines, shapes, text outlines
  • Metadata: title, author, creation date
  • Optional extras: bookmarks, forms, attachments

Compression targets the heavy parts, which are almost always images, and it tidies structural waste. It rarely rewrites body text character by character.

Where the bytes actually live

| Source type | Typical weight | Compression impact | |-------------|----------------|-------------------| | Phone scan saved as PDF | Very high | Large. The entire page is an image | | Word / Google Docs export | Low to medium | Small unless many high-res images | | PowerPoint export | Medium to high | Moderate. Slides often rasterize effects | | CAD / design export | Variable | Depends on embedded previews | | Mixed merge (scan + digital) | High | Images dominate savings |

When compression is a bad idea is the decision. This page is about what changes when you compress. If you are combining files, Merge PDF comes first so you compress the result once. Split PDF and PDF to JPG are the other exits when a smaller PDF is the wrong output.

Image compression inside PDFs

Most of the size reduction comes from re-encoding embedded images:

  1. Downsampling lowers resolution, for example 300 dpi to 150 dpi for screen reading.
  2. Lossy JPEG recompression merges similar color blocks and reduces fine detail.
  3. Color space changes, such as RGB to grayscale, suit monochrome scans.
  4. Stripping invisible layers removes OCR layers or duplicate preview images some scanners add.

Text stored as real text objects stays sharp because it is vector instructions: draw glyph A at position x, y. Compression does not pixelate that the way it pixelates a photograph of a page.

When the whole page is an image

Flatbed scans and phone "document" modes often produce a PDF where each page is one big bitmap. Compression then behaves like photo compression, because that is what it is, wrapped in a PDF. Contract scans shrink a lot. Spreadsheets barely move. A 12-page scan can drop by about 80%, while a 100-page text report barely changes.

Object and stream optimization

Beyond images, an optimizer may:

  • Remove duplicate font subsets when the same font was embedded again after a merge
  • Drop unused objects left from editing
  • Compress content streams with Flate (zlib-style) encoding, which is lossless packing of PDF instructions
  • Remove thumbnails or alternate images you never see

Those fixes add up on messy files, especially after merging several PDFs. They will not halve a clean two-page letter.

What compression usually leaves alone

Searchable text layers stay, unless the whole page is an image. Hyperlinks and bookmarks stay in most consumer tools. Vector line art at ordinary complexity stays. Form field structure usually stays, though some aggressive optimizers flatten forms. Test that if you rely on fillable fields.

Compress with the output open

  1. Identify the source: scan-heavy, or a digital export.
  2. Merge first if you are combining files (Merge PDF), then compress once.
  3. Open Compress PDF and start at medium for mixed documents.
  4. Download and check the smallest text on page 1, a photo or scan page if there is one, and the file size against the original.
  5. If email still rejects it, see email attachment limits before you turn the setting to maximum.

Worked example: board pack

Input: a 35 MB merged PDF, 10 slides exported from PowerPoint plus 40 pages of scanned approvals.

What compression likely did:

  • Recompressed the images embedded in the slides, moderately
  • Downsampled the 40 scan pages aggressively, which is where most of the bytes lived
  • Removed duplicate font entries from the slide exports

Result: about 9 MB, readable on a laptop, acceptable for email. Signatures still legible at 100% zoom, and not print-archive quality.

The archive copy is the original 35 MB, kept offline.

Common misconceptions

Compression does not improve quality. On image-heavy content it trades detail for size.

PDF compression is not encryption. A smaller file is not a protected file. See PDF password protection for access control, and for the limits of that control.

Print-to-PDF and then compress does not fix a bad export. Print-to-PDF often rasterizes content into images, which makes files bigger and harder to search. Compression cannot fully undo that.

ZIP is a different operation. ZIP wraps the whole file. PDF compression rewrites objects inside the PDF, especially images and duplicate resources. Compression also does not remove viruses. Scan a suspicious file with antivirus regardless of size.

Privacy and browser-based compression

When compression runs in the browser (how browser PDF tools protect privacy), the algorithm still reads image streams locally. "Upload-free" means the bytes may never leave the device. Sensitive documents still need a tool you trust, and you should keep the original.

When compression is not enough

  • Split PDF and send chapters separately
  • Re-scan at a lower dpi, such as 300 down to 200 for internal reference
  • Replace scan pages with digital signatures where that is legally acceptable
  • Share a link instead of an attachment

Limitations

Lossy image compression is one-way. Once high-resolution scans are downsampled to 150 dpi, you cannot recover print sharpness from the compressed copy.

Vector-heavy CAD or illustration PDFs with hundreds of thousands of path nodes may stay large, because image downsampling does not simplify vector geometry.

Some rasterizing compressors flatten interactive form fields. Test a fillable form after you compress it.

Related reading

  • When Should You Compress a PDF?
  • How to Compress PDF Files Without Losing Quality
  • Combining Scanned and Digital PDFs

You can predict the result once you know the file is a bundle of objects. Image-heavy scans shrink. Clean text barely moves. Keep an untouched original when you still need print sharpness, instead of chasing megabytes on the only copy.

Related Tools

Free browser-based tools referenced in this article.

Featured
Merge PDF
Merge PDF files into one document with pdf-lib in your browser. Pages are copied, not re-rendered.
Featured
Compress PDF
Compress PDF by redrawing pages as JPEGs. Text selection, links, and form fields are not kept.
Split PDF
Split PDF pages into separate files or extract a page range with pdf-lib on your device.
PDF to JPG
PDF to JPG by rendering each page with PDF.js. The worker script loads from unpkg.com.

Key takeaways

  • Embedded raster images and full-page scans account for most PDF size. Vector text and shapes are already compact.
  • Merge source PDFs first, then run a single compression pass so images are not re-encoded twice.
  • Always keep an uncompressed archival master before applying lossy image downsampling for email or web delivery.

Frequently Asked Questions

Common questions answered to help you get the most from this tool.

Most tools re-encode embedded images and remove redundant objects. Pure text pages often shrink only slightly because the text itself is already compact vector data.

Scans are usually full-page bitmaps, so the image streams are huge. Word exports are mostly text and vector shapes, which take less space to begin with.

No. ZIP wraps the whole file. PDF compression optimizes objects inside the PDF structure, especially images and duplicate resources.

No. Compression changes encoding, not trustworthiness. Scan suspicious files with antivirus regardless of size.

Lossless preserves exact image pixels (PNG-style inside PDF). Lossy reduces detail (JPEG-style) for smaller files. Aggressive settings lean lossy on photos and scans.

About the author

Rehan Baqir is the founder & editor of Vertex Solutions. He builds browser-based tools and writes guides about PDF workflows, calculators, image tools, and developer utilities. Article pages show their publication and update dates when available. Read the editorial standards and tool-testing method for the site's stated approach to content and verification.

More about Rehan Baqir →

pdfcompressionfile-sizeimagestechnical
Back to all articles

On this page

  • A PDF is a container, not a single image
  • Where the bytes actually live
  • Image compression inside PDFs
  • When the whole page is an image
  • Object and stream optimization
  • What compression usually leaves alone
  • Compress with the output open
  • Worked example: board pack
  • Common misconceptions
  • Privacy and browser-based compression
  • When compression is not enough
  • Limitations
  • Related reading

Related Articles

  • When PDF to Word conversion fails, and what to try next
  • What a context window actually holds
  • Embeddings and keyword search