Inverted colors for PDF previews in DTTG

“PDF IS based on PostScript which is a programming language (albeit a peculiar one). Basically, all commands in a PS file generate graphics. So how exactly would one determine what to invert and what not?
You can never know for certain if something is an image (defined by what criteria, exactly?) and what isn’t.”

Indeed, I remember when PS came out. (In fact John Warnock and I went to the same U, and worked at the same company, Evans & Sutherland, though he was several years ahead of me). I don’t know postscript and I don’t know how it’s processed, my point was only that the background itself could perhaps be modified. If that’s not parsable then it’s not a good idea. I honestly don’t feel it’s such a big deal and I can live with the settings as they are.

PS/PDF has no background. It is simply leaving marks on a supposedly white canvas. I guess that makes it complicated to adapt to the dark mode loved by many (not me, though).

1 Like

Correct. Before we founded DEVONtechnologies I worked as an editor for a prepress magazine. Our number one topic was the then-new PDF format and how it can be used in the printing process.

When inverting a PDF you can, of course, render (“print”) the PDF content on a black background (“paper”) and invert black text. Text is easy as it exists as such: text strings with position, size, font, and color metadata.

Images however could be any of the following: photos (should not be inverted), logos (should or should not be inverted, depending on their looks), ornaments and dividers (should probably be inverted unless they have a color other than black, or some shade of grey that is not too light).

So the PDF engine could try to assign an asset class to an image and make a good guess. But it could still miserably fail.


And also scanned text, e.g. a Tiff or jpeg embedded in the PDF. Which looks like an image to the PDF engine (don’t invert!) but as text to a human (why isn’t that inverted?).

Also, simply inverting colors might render text unintelligible. But we’re all seeing that everyday now in screenshots. People in the printing industry knew it ages ago.

Personally, I’d just not do it (wedding dark mode with PDF). It’s ok if you can change the style dynamically with CSS, to adjust the font width for example. For a paper-oriented format, it is a bad idea.

And all of Adobe’s and Microsoft’s attempts on creating a reflowable PDF were ill-fated unless I’m very much mistaken.

1 Like

This is now an option in 3.2!

Really appreciate the option to keep PDF light and have everything else dark. That’s a killer feature for me. Thanks guys.

You’re welcome, @pviglucci