Why is this one-page PDF so large?
By Anton Samper · Reviewed
This one-page invoice contains a little text and a small coloured square, yet the file is over 4 MB. Almost all of those bytes belong to the square's uncompressed image.
Open this exampleDownload sample PDF
1. Look at the page
Open the example, choose First page, then open the page preview. The coloured square takes up little space on the page, but the PDF still stores every pixel of its source image.

2. Find the image and its stored size
In Resources → Images, open image object 6 0 R. In Properties, check these entries:
/Widthand/Height- 1200 × 1200 pixels.
/ColorSpace/DeviceRGB: three colour components per pixel./BitsPerComponent- 8 bits, or one byte, per component.
/Length- 4,320,000 stored stream bytes. There is no
/Filterentry: this stream is uncompressed.
That adds up to 1200 × 1200 × 3 = 4,320,000 bytes, about 4.32 MB (4.12 MiB). The PDF structure and text add a small amount on top. Use the stored stream size to account for bytes in the PDF. Exporting the image as a PNG encodes it differently, so the download size can differ.
3. Check how the image is drawn
Return to page object 3 0 R. Its /Resources dictionary maps /XObject → /Im1 to 6 0 R. Follow /Contents to 4 0 R and choose Decoded → Decoded byte text. Find:
q
144 0 0 144 72 464 cm
/Im1 Do
QIn this sample's default page coordinates, the matrix draws the image 144 × 144 points, or two inches square. All 1200 × 1200 pixels are still stored, giving 600 pixels per inch at that size. The resource reference identifies the image; the Do instruction shows it is drawn.
What to change in the generator
One raw RGB image accounts for more than 99% of this file. Adjust the PDF generator to resize images for the intended output and compress them. Try lossless compression for this simple gradient, then compare the file size and visual quality.
PDF Internals does not optimise or save modified PDFs, and it has no automatic size breakdown. Other large files may contain embedded fonts, attachments, duplicated resources, or earlier updates, so check what accounts for the bytes in your own file.