Counting Color Pages in PDF Files

Printing books and such in color can be expensive. So here is how to count the color pages using a recent version of GhostScript and a UNIX shell:


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

Leave a Reply

Your email address will not be published.