How can you invert the colors of a PDF?
I need to invert all the colors of a PDF document (background, text, graphics, and images). I want it persistent in the file so the inverted viewing options, that some viewers offer, won't help.
Rasterizing the document and using image manipulation software is also not an option.
I read somewhere that this can be done with the Enfocus PitStop plugin for Acrobat. However I didn't see a corresponding command anywhere. Am I missing something?
Then I read that the ARTS PDF Crackerjack plugin for Acrobat offers negative printing so I tried that, too. The option is there but it simply doesn't work.
I have been searching for very long for a way to do this. It seems like a common enough task but I just can't find out how to do it.
Are there maybe any virtual printer drivers or something of the sort that support negative printing?
Can anyone help?
Solution 1:
Did you try:
Edit, Preferences, Accessibility, then check the box that says replace colors.
Solution 2:
I rigged together a Ruby script (using Inkscape and ImageMagick as subroutines) pdfinvert. It proceeds as follows:
- Split PDF into individual pages.
- Convert each page to SVG.
- Invert colors¹ in the SVG; embedded PNG images are taken care of².
- Reconvert each page to PDF.
- Join pages together for the final result.
It was designed for drawings but it may work in many more cases (it seems to need some extensions to work with uncolored backgrounds).
As it is, this will probably only work on GNU/Linux (and maybe other Unix-ish systems) due to the way third-party tools are called, but you may be able to adapt what does not work to Windows.
- You can also specify a color replacement table.
- The approach probably extends to JPG or any other format ImageMagick's
convert
can deal with.