The PDF isn't always where the unnecessary file size begins.
Writing
Resize Images Before Exporting a PDF
A PDF containing photographs can become surprisingly large.
The obvious response is to compress the PDF after exporting it.
Sometimes that helps. But another place to look is the source image itself.
Four PDFs, one useful result
I tested four PDFs and compared their combined file sizes after changing the source image resolutions.
Test result Combined PDF size
Original sources 1,111 KB
Intermediate result 626 KB
Intermediate result 279 KB
Final reduced result 71 KB
The results came from this particular test, not a universal compression formula.
The important observation is that reducing unnecessary source-image dimensions can have a considerable effect on the resulting document.
Why dimensions matter
An image can contain far more pixels than a document needs.
For example, an image intended to occupy a relatively small area on a screen may have been captured at a much higher resolution.
Embedding that entire image without considering its destination can add unnecessary data.
A smaller source image can be entirely sufficient for the intended display size.
Resize first, export second
A practical workflow:
Decide the image's final physical or screen dimensions.
Check the source resolution.
Resize where appropriate.
Export the PDF.
Inspect the pages at normal viewing size.
Check the resulting PDF size.
Avoid reducing dimensions blindly. Print documents and detailed diagrams may need more resolution than ordinary screen-viewed material.
Limits of this approach
Resizing isn't a replacement for every form of PDF compression.
It also doesn't mean that every document will shrink by the same percentage. Text, embedded fonts, vector graphics and other document content contribute to the final size.
The source images are only one part of the file.
Who should resize first?
Web documents: Often benefit from appropriately sized screen images.
Email attachments: Can benefit from removing unnecessary image dimensions.
Print documents: Need resolution appropriate to the intended output.
Archival material: May require preserving the original high-resolution sources.
Try resizing an image
Pocket PDF's image resizer lets you change image dimensions in the browser.
https://www.pocketpdf.site/image-resizer
The main idea is simple: don't make the PDF carry more image data than the finished document needs.
Destination: Image resizer.
Canonical: Notes article is the original reference for the broader four-test research. This article is an independent Dev.to article.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.