Categories
LaTeX Printing

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
Categories
Debian Linux Printing

Yellow pages when printing with Debian?

We had the problem of yellow tinted printouts on our Debian Testing machines. With my OS X machine, I did not have this problem, although both system use CUPS 1.4.3 for printing. It seems that Ghostscript was the culprit. The pstopdf filter to be exact. This bug report in the Debian bug tracker describes the exact same problem. The idea is to comment out the “-dUseCIEColor” option. I am not sure in how far this will also change the colour reproduction, but since our systems are not colour calibrated anyhow, I think this will not matter.