New Tool Radar

AI PDF

How to Check Image Resolution in a PDF After Compression to Find Figures That Were Downsampled Too Far

Run pdfimages -list on a compressed PDF and compare the x-ppi and y-ppi of each figure against the resolution your output needs.

Schematic with three steps: List the images with their rendered resolution; Compare each figure with your minimum; Recompress or replace the worst figures.

Compression often downsamples images to shrink the file, and a figure that was sharp at 300 ppi can come back at 72 ppi and look blurred in print. Listing the rendered resolution of every image after compression shows which figures were pushed too far.

What you need

  • poppler-utils installed, which provides pdfimages
  • A PDF that was compressed
  • The minimum resolution your output needs, for example 300 ppi for print
  • A terminal

Step 1: List the images with their rendered resolution

Run pdfimages -list file.pdf and read the x-ppi and y-ppi columns, which give the horizontal and vertical resolution of each image as rendered on the page.

Step 2: Compare each figure with your minimum

Mark every image whose x-ppi or y-ppi falls below your minimum. Note the page number and the image size so you can find the figure in the document.

Step 3: Recompress or replace the worst figures

Recompress from the original with a higher downsampling limit, or replace the low-resolution figures with the originals, then re-run the listing to confirm the fix.

Worked example: synthetic resolution check on a compressed catalogue

The table below is a synthetic example. It shows the expected result of the pdfimages listing; no listing was run.

Page Image Rendered ppi
Page 4 Product photo 312 x 312
Page 9 Diagram 96 x 96
Page 14 Logo 298 x 298
Total 3 images 1 below the 300 ppi minimum

Expected result (UNTESTED). two images render at about 300 ppi, but the diagram on page 9 renders at 96 ppi and must be replaced with a higher-resolution original before printing. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • pdfimages reports the resolution as rendered on the page, which depends on how large the image is placed, not only on its pixel count.
  • A small image placed at a small size can show a high ppi even though its pixel count is low.
  • Recompressing a file that is already downsampled cannot restore the lost pixels.

Sources

See all