I have been using dark reader to force any page I visit to use dark mode. Then, I open a pdf and I get ambushed by piercing white light.
Create a bookmarklet with the following code. Or, just run it in the console of the pdf.
javascript: (function () {
viewer.style = "filter: grayscale(1) invert(1) sepia(1) contrast(75%)";
})();