How to compress a PDF for email attachments
By the Converterzilla Team
We build privacy-first PDF and image tools that run entirely in your browser. Our team has shipped JavaScript file-processing apps used by thousands every day, and we write here about the libraries, trade-offs and patterns we use.
Gmail, Outlook and Yahoo all cap attachments at 25 MB. PDFs balloon past that limit easily — a single high-DPI scan can be 30 MB before you've added anything. The fix is targeted compression, but most "compress PDF online" services either butcher quality or upload your file somewhere unsecured.
What actually shrinks a PDF
Three things drive PDF size: embedded images, embedded fonts, and metadata + structure overhead. The biggest wins usually come from re-encoding images at lower resolutions and stripping duplicated metadata.
Lossless first, lossy second
Always try lossless compression first — strip metadata, repack object streams, deduplicate fonts. If that's not enough, then look at downsampling images. The order matters because lossless techniques are reversible-ish, while image downsampling is permanent.
- Strip metadata — saves 1-5%, costs nothing
- Repack object streams — saves 5-15%, costs nothing visible
- Downsample 300dpi to 150dpi — saves 60-80% on image-heavy docs, slightly visible
Our PDF compressor does the lossless pass in your browser today; image re-compression is on the roadmap for the next release.