How can I print out a PDF substituting pixels for blue pixels?
Maybe you can set an option in the printer driver to print black as composite from yellow, magenta and cyan.
Install Ghostscript (first) and then ImageMagick, and then you can use the following command:
magick convert -density 300 input.pdf -fill blue -opaque black output.pdf
This will convert all the black in input.pdf
with blue in output.pdf
.
[Thanks to Nick's comment below for the part about ghostscript.]
Note added later: If you have a newer version of imagemagick that doesn't have a convert
binary, use magick convert
instead of simply convert
.
There's a free online tool that's built for this very purpose:
https://supertool.org/automatically-add-color-to-pdfs-to-print-without-black-ink/
It took a little while to load and process, but it made it possible to print a return shipping label without black ink.
An addendum to frabjous' answer requiring Ghostscript and ImageMagick are installed, including the updates according to Alexander Taubenkorb's comment.
This still didn't work because I had the problem that the 'gray' of my image was not pure gray. To overcome this I switch the colorspace “back and forth” to ensure there is a clean definition of ‘gray’ to be converted to blue in that final command.
convert -density 300 input.pdf -colorspace RGB -colorspace Gray tmp1.pdf
convert -density 300 tmp1.pdf -colorspace Gray -colorspace RGB tmp2.pdf
convert -density 300 tmp2.pdf +level-colors blue,white output.pdf