Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Broken Website] PDFs converted to PDFium, used within Chromium based browsers, tested on Brave #3585

Closed
coughingmouse opened this issue Sep 3, 2020 · 3 comments

Comments

@coughingmouse
Copy link

Website
Example pdf link: Emma by Jane Austen

How to Reproduce

  1. Go to some pdf file online or open a local pdf file with Brave browser
  2. Hover into the top section or the bottom-right corner of the page if you can't see any UI besides the background.

Expected behavior

The contents in PDF should be inverted, but the UI and background, which by default is dark-themed, should not have been

Actual behavior

Everything within the page is affected by Dark Reader.
The brightness of UI and background shines through your dark room onto your fragile retina.

Screenshots
Screen Shot of something already described above

System info:

  • OS: macOS Catalina 10.15.6, Debian 10
  • Browser: Brave Version 1.13.82 Chromium: 85.0.4183.83 (Official Build) (64-bit)
  • Darkreader Version: 4.9.17

Additional context
This could be really useful if fixed.

@Gusted
Copy link
Contributor

Gusted commented Sep 3, 2020

Hi @coughingmouse!

Unfortunate PDF's in chromium are exposed as 1 big element as seen here so we can only invert it so the effect will get the PDF inverted and giving the effect of a darkend PDF however the background-color get unfortunate a gray-ish color. At this moment we can't do anything.

Regards,
Gusted

@Gusted Gusted closed this as completed Sep 3, 2020
@coughingmouse
Copy link
Author

@Gusted Thanks for pointing out very kindly that I didn't even try to press F12.

@luo-chuan
Copy link

If you use Firefox, you can edit userContent.css like this:

@media (prefers-color-scheme: dark){
  .pdfViewer{filter: invert(1) hue-rotate(180deg);}
}

If you use Chrome or Edge, install the extention "PDF Reader", then edit the extention option like this:

html[data-theme*="dark"] .pdfViewer{
  filter: invert(1) hue-rotate(180deg);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants