This question has been asked several times on StackExchange but I could not find a solution that really works. Is there a (desirably) pure ghostscript way to invert the colours of a PDF? The command
gs \
-sOutputFile=output.pdf \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 \
-dNOPAUSE \
-dBATCH \
input.pdf
turns input.pdf into a grayscale output.pdf. Is there a similar command that inverts the colours?
-c "{1 exch sub}{1 exch sub}{1 exch sub}{1 exch sub} setcolortransfer"(see here for example). – epR8GaYuh Aug 30 '20 at 19:40