I have a 100 page PDF document that I need to print. My print shop needs to be told which pages contain color. I don't want to scan manually. Is there a program that detects pages with color and can ouput the page number?
On Linux (and probably mac/other Unix), the following very short BASH script seems to do the trick:
Name the script something like
This requires ImageMagick and probably Ghostscript to be installed. And it's not the speediest thing in the world.
Sorry, I have no clue how to adapt this for Windows (without Cygwin or similar, anyway).
Found this over at http://root42.blogspot.de/2012/10/counting-color-pages-in-pdf-files.html
Worked well for me
Total page count can be found by
Having the same task as the OP and working in Windows, I've found the following solution to work quickly and nicely: Spool File Page Counter SDK is non-free but the evaluation version still does the job. Download the zip file from the above link, unzip it and run
The Rapid PDF Count mentioned in another answer here requires installation (which for my one-time job---dissertation printing) is a disadvantage. However it also does the job and provides a GUI. After installing it, run it, drag-and-drop the PDF file into it, check
Interestingly, the results for my thesis differ by 1 page (99/44 vs. 100/43). I believe, this is because some figure (I made all with Inkscape) is actually black-and-white but is described as colour in metadata. I am not sure. What I didn't find in Rapid PDF Count is a list of all colour/B&W pages, so I cannot tell the exact source of this discrepancy.