Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
11–20 of 38 posts
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#12https://github.com/rootVIII/pdfinverter/blob/master/utils.go... using go to wrap a python script - this is some "hacker man" stuff right here
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#13Not sure why this needs a dedicated application, you can do this in Chrome or FF with a single line of JS: javascript:(function(){viewer.style = 'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';})()
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#14So PDF viewers apps on MacOS do not support color changing by way of accessibility options?
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#15You can do this on-the-fly with Zathura... in Linux
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#16Not sure why this needs a dedicated application, you can do this in Chrome or FF with a single line of JS: javascript:(function(){viewer.style = 'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';})()
Bookmarklet
javascript:(function() { var v = document.getElementsByTagName("html"); v[0].style.background = "white"; v[0].style.filter = "invert(90%) sepia(60%) brightness(70%)"; v[0].style.backgroundColor = "black"; document.getElementsByTagName("body")[0].style.background = "white"; })();
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#17Not sure why this needs a dedicated application, you can do this in Chrome or FF with a single line of JS: javascript:(function(){viewer.style = 'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';})()
That does not work with the Chrome PDF viewer for me. (Chrome 87, Mac)
chrome://flags/#pdf-viewer-update
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#18https://getpolarized.io/2020/10/05/Polar-2-0-Release.html
the issue we had was that we were using a CSS filter like other commenters mentioned.
The problem is that it inverts images too and pdfjs doesn't actually specify which parts of the document are an image as it's just writing to a canvas.
My plan moving forward is to fix pdfjs so it can invert natively and the actual canvas is inverted so that images won't be inverted.
I think figures would STILL be a problem though.
EPUBs are much easier and we're not inverting there because we can see which one is an img.
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#19So PDF viewers apps on MacOS do not support color changing by way of accessibility options?
Why would that be a feature of an application? That’s an OS function ( https://www.apple.com/accessibility/mac/vision/ )
Re: Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs
#20We went full dark mode when we released the 2.0 version of our app which has PDF and EPUB support: https://getpolarized.io/2020/10/05/Polar-2-0-Release.html the issue we had was that we were using a CSS filter like other commenters mentioned. The problem is that it inverts images too and pdfjs doesn't actually specify which parts of the document are an image as it's just writing to a canvas. My plan moving forward is…