Closed YtvwlD closed 2 years ago
My Atom package is just a wrapper for the pdf.js library and viewer. It was relatively easy to adapt the UI components to the current Atom theme, but to do the same for the PDF display itself would mean to go deeply into this quite complex software, which I'm afraid is beyond my abilities.
If you create the PDFs yourself, as a workaround you could create them with a dark background and light text, e.g. in LaTeX with the xcolor package.
If not, you could submit a feature request on their repository, pdf.js.
Ah, okay. There are multiple issues upstream - it think this is closest to the one I want.
In the meantime I added
.page {
filter: invert(100%);
}
to pdfjs/web/viewer.less
which is fine for me. :)
I didn't realize it would be that simple!
I'll think about whether it makes sense to make that a package option.
That would be great. Oh, and the CSS has to be added to the thumbnails as well, so it's
.page, .thumbnailImage {
filter: invert(100%);
}
I added an option "Invert PDF colors" which appends your CSS to the stylesheet.
published with v1.3.0
I have a dark UI and syntax theme configured in Atom but most of the PDFs I look at are mostly white. It would be great if I could invert the displayed colors.