Count BW / color pages in PDF


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?

Best Answer

Found this over at

gs -o - -sDEVICE=inkcov input.pdf | grep -v "^ 0.00000  0.00000  0.00000" | grep "^ " | wc -l

Worked well for me

Total page count can be found by

pdfinfo input.pdf | grep Pages: