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?

link|improve this question
Operating system? – frabjous Jan 17 '11 at 20:43
feedback

2 Answers

On Linux (and probably mac/other Unix), the following very short BASH script seems to do the trick:

 #!/bin/bash
 file="$1"
 for page in $(identify -density 12 -format '%p ' "$file") ; do
     if convert "$file[$((page-1))]" -colorspace RGB -unique-colors txt:- | sed -e 1d | egrep -q -v ': \(\s*([0-9]*),\s*\1,\s*\1' ; then
         echo $page
     fi
 done

Name the script something like coloredpages.sh, and make it executable with chmod +x coloredpages.sh and then run ./coloredpages.sh "pdfname.pdf" and it should return a list of page numbers.

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).

link|improve this answer
Thanks, I will give it a shot when I have a linux running. I may find a better print shop that can detect it. – None Jan 18 '11 at 7:45
feedback

We have a tool Rapid PDF Count that can count Color and BW/Gray pages in pdf's

see: http://www.traction-software.co.uk/rapidpdfcount/index.html

link|improve this answer
1  
Care to explain what features this products has or why its any good? – Ivo Flipse Mar 28 at 12:48
feedback

Your Answer

 
or
required, but never shown

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