How can you invert the colors of a PDF?

17

4

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?

legr3c

Posted 2011-07-15T15:05:46.417

Reputation: 481

Similar question : http://superuser.com/questions/286403/software-to-read-pdfs-with-inverted-colors-windows

– landroni – 2014-11-04T10:38:27.460

7

Possible duplicate of Is it possible to invert text and background colors in a PDF when printing?

– Mark Jeronimus – 2018-06-18T14:04:18.883

1Hey, man, try using the PDF reader called Evince. I know that it allow you to invert colors (inclusive images) for reading, but I don't know about an option to print them in that way (I don't have a local copy and cannot install here to see). – kokbira – 2011-07-15T17:51:30.953

So if I understand correctly you must keep text as text... but if you realize that you just need to have a pdf (also an image in a pdf) you can use ImageMagick by calling "convert input.pdf -negate output.pdf" – David Costa – 2011-07-18T10:25:30.870

Answers

7

Did you try:

Edit, Preferences, Accessibility, then check the box that says replace colors. 

enter image description here

Fergus

Posted 2011-07-15T15:05:46.417

Reputation: 1 541

this does not answer the question; the question explicitly said they want to permanently alter the file, not just invert colors for the viewer – xdavidliu – 2019-05-24T00:09:04.150

Foxit Reader has an option like this, but it doesn't seem to affect images. – NiteCyper – 2014-05-31T17:12:27.537

5

I rigged together a Ruby script (using Inkscape and ImageMagick as subroutines) pdfinvert. It proceeds as follows:

  1. Split PDF into individual pages.
  2. Convert each page to SVG.
  3. Invert colors¹ in the SVG; embedded PNG images are taken care of².
  4. Reconvert each page to PDF.
  5. 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.


  1. You can also specify a color replacement table.
  2. The approach probably extends to JPG or any other format ImageMagick's convert can deal with.

Raphael

Posted 2011-07-15T15:05:46.417

Reputation: 305

0

i managed to do it like this:

download PDF24 creator; open your .pdf and save it as .png or .jpg; open the new created image, modify it as you wish (ex. invert colors) and save; open and merge* files in pdf24 and save it as .pdf :)

*the bad part: must do page by page :( a good compromise in order to save precious ink

no point

Posted 2011-07-15T15:05:46.417

Reputation: 11

"Rasterizing the document and using image manipulation software is also not an option." – G-Man Says 'Reinstate Monica' – 2015-01-27T22:11:04.827

This solve might not work for OP but google brings more general questions here. – AnneTheAgile – 2019-06-28T20:43:45.440