Sign up ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

Is it possible to find out what compression algorithms have been used for images in a PDF document?

share|improve this question
If this includes paid-for software, use Acrobat Pro, which has an Object Inspector. – Jongware Nov 18 at 21:25

2 Answers 2

You can use pdfimages -list $file on Unix/Linux systems, on Windows maybe you can install poppler to get access to the tool (see Note that this is a command line application, without graphical user interface. Its output will look like

page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
   1     0 image    1240  1753  gray    1   8  image  no         8  0   150   150  301K  14%
   2     1 image    1240  1753  gray    1   8  image  no        22  0   150   150  281K  13%
   3     2 image    1240  1753  gray    1   8  image  no        36  0   150   150  336K  16%

Where the enc column tells you the encoding algorithm, the possible values are listed in the manpage for pdfimages.

share|improve this answer
note xpdf web page seems to have windows and mac binaries – Yorik Nov 18 at 22:24

Sort of.

If you open a PDF in a text editor, you'll find a line like this for each image:

<</Subtype/Image/Length 7986/Filter/FlateDecode/BitsPerComponent 8/ColorSpace 34 0 R/Width 368/Height 110/Type/XObject>>stream

This image uses the FlateDecode filter, "a commonly used filter based on the zlib/deflate algorithm (a.k.a. gzip, but not zip)"

<</Subtype/Image/Length 892/Filter/DCTDecode/BitsPerComponent 8/ColorSpace 34 0 R/Width 44/Height 23/Type/XObject>>stream

This image uses the DCTDecode filter, "a lossy filter based on the JPEG standard"

Filter definitions are from the Portable Document Format Wikipedia page, which has a list of all the supported filters.

However, it can be difficult to work out which image is which in a text editor - the objects do not necessarily occur in reading order. Breaking the PDF into single pages might help here.

I think Enfocus Pitstop Pro, an Acrobat plugin, may well give you this info (along with dimensions, position, DPI etc) in its object inspector, but I no longer have it, and can't seem to find any mention of this specific attribute in their manual.

share|improve this answer
Acrobat also has a myriad of predefined preflight reports. Not sure if they are available in the free version (?) – horatio Sep 4 '12 at 16:30
Note that PNG also uses the DEFLATE compression algorithm (zlib is an implementation of DEFLATE). So you can think of the first example as being like a PNG image in many respects such as how well it will compress. – thomasrutter Sep 5 '12 at 0:30
@horatio: They are not. Also the free version is called "Adobe Reader" not "Adobe Acrobat Reader" these days. – e100 Sep 5 '12 at 18:03
I thought it was Acrobat X or AcrobatZ or something :) – horatio Sep 5 '12 at 18:08
It's always been confusing. It's currently Adobe Reader X, Adobe Acrobat X, Adobe Acrobat X Pro. What really annoys me is when people refer to "Adobe" when they mean a single app. – e100 Sep 5 '12 at 18:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.