Is there a pdf reader allowing me to change background color of (arXiv) pdfs?

48,927

Solution 1

You can do this in Okular if you don't mind pulling in kde dependencies.

sudo apt-get install okular

The option is found in Settings/Configure Okular.../Accessibility by checking Change colors then Color mode: Change Paper Color and select a color in the swatch below. Works with several pdf files I have from arxiv, but perhaps unsurprisingly, doesn't work with pdf files that are simply scans of pages.

Solution 2

There is another possibility. Install zathura. It is a lightweight PDF, DJVU and PS reader. It is highly configurable and of course it allows changing the color of the background and the text. Just add these lines to ~/.config/zathura/zathurarc:

set recolor true
set recolor-darkcolor "#dcdccc"
set recolor-lightcolor "#1f1f1f"

The above color variables will give you this:

enter image description here

I also recommend you to set these options:

set window-title-basename "true"
set selection-clipboard "clipboard"

For help go to the Arch forums.

Look here for mouse and key bindings.

Disclaimer: I am in no way related to the development of zathura. I am just a happy user.

Solution 3

With most of the tools already mentioned under this question, only pdf files made out of text files (and not of scanned/photocopied text saved as image) can be treated so that colors of page and fonts (or at least of page, as expected by the OP) are changed. In case the available text is a pdf formed of images (e.g. paper that was scanned) the pages will in many cases show paper-like black-on-white text (even if images are extracted and converted to an ebook format as said here). There, the only possible color change of image-based pdf-s is inverting colors with viewers that have that option: Evince, Qoppa-PDFStudioViewer), xpdf (with the -rv argument, see here), mupdf (here). There are exceptions, though, viewers that can do more than just inverting colors or changing only the background:

For all pdf (including image-based) files

(image-based = e.g. a book or article scanned/photocopied and saved as pdf)

and

can change color of both pages and fonts even in image-based pdf files.

enter image description here

enter image description here

Select "more" to have any color:

enter image description here

With an image/scanned text, a value of#3b3537 for the page color and #b0afac for the font color gives this:

enter image description here

Thus, a scanned pdf text can be read with different color profiles, just like an epub can in an ebook reader.

For text-based pdf files

(text-based= e.g. text files saved/exported/printed as pdf)

(A)

PDF readers, beside Master PDF Editor and Zathura:

enter image description here

  • Foxit Reader for Linux has the option of changing both the color of background and of text — either by selecting a color profile

enter image description here

or by selecting any color

enter image description here

But there are some limitations of Foxit Reader for the moment (version 2.4.4): it has no dark GUI (while not following a dark desktop theme) and no full-screen.

Having a large white area on the screen all the time comes against the purpose of improving readability, so I prefer other solutions.

(B)

E-book readers

Most eBook readers offer color settings for page and font, but only some of them can open pdf documents. As far as I can tell they do not display the text as well as a pdf viewer in all cases. I have tested only two:

  • Bookworm - it has 3 color profiles but each profile can be edited (fully adjustable colors for background and fonts under Preferences). Poor pdf text rendering in the document tested by me - sometimes lacking spaces between words and wrong display of non-English accented characters.

  • Calibre's Ebook Viewer - better rendering of pdf text (very few problems with the same document tested in Bookworm). Color settings are accessed by opening a book, right-clicking, then selecting Preferences - Colors.

The quality of pdf display in an ebook reader may depend on the pdf too. I have noticed that, when trying to open a pdf, ebook readers run pdftohtml tool.


UPDATE on Okular:

In newer versions of Okular (like 1.9.3) both font and page colors can be edited — and a dark-mode look can be enabled — through a new and rather non-intuitive setting, under Configure Okular - Accessibility - Color mode: Change Dark and Light Colors, by selecting a light color for dark and a dark one for light color option.

enter image description here

Then, for easy access, configure toolbar and add Toggle change color. It works for picture/scanned pages too.

enter image description here

enter image description here

Solution 4

The given answer based on okular is perfect.

Another option is to configure Acrobat Reader to do that.

Go to

Edit > Preferences > Accessibility > Replace Document Colors > Check box in Custom Colors

then choose your colors; the new preferences are loaded automatically next time you open the same kind of pdf's (LaTeX generated?).

Solution 5

You can use the cross-platform Master PDF Editor, which is closer in functionality to Adobe Acrobat than to a mere PDF reader.

In Tools > Settings > Display activate Replace Document Colors and choose the colors that you want to use. Click Ok.

Open a PDF file and in the View menu select Replace Document Colors.

Share:
48,927

Related videos on Youtube

c.p.
Author by

c.p.

Student.

Updated on September 18, 2022

Comments

  • c.p.
    c.p. almost 2 years

    Its quite common that one wishes or has to read lots of PDF files which are intended to be printed, but since one would read them only once, and one wishes to save some trees, one reads them on Acrobat Reader, evince, xpdf or whatever your choice.

    It would be an advantage to be able to control the background's color. Instead of black text on white background, I'd like to have a gray background. By googling I just get the inversion of colors as suggestion – which is sometimes even worse for the eyes.

    Is there a pdf reader allowing me to change background color (without changing the color of the text)?

    Edit: The first comment below suggests it depends on the file. Therefore I added to the title arXiv's.

    • Parto
      Parto about 10 years
      That depends on the PDF not the PDF reader...or so I think.
    • Parto
      Parto about 10 years
    • Parto
      Parto about 10 years
      From ubuntuforums.org/showthread.php?t=1127012&page=2 you can try KPDF. It supposedly has this feature.
    • msmpro
      msmpro about 9 years
      True but the development of KPDF stopped in 2008. It was part of KDE3 and in KDE4 it was replaced with Okular. I believe it is hard to install it in a recent OS.
    • Amr Lotfy
      Amr Lotfy over 5 years
      Reading white characters on black background is better, please check this on Nature.com nature.com/articles/s41598-018-28904-x/email/correspondent/c‌​1
    • cipricus
      cipricus over 3 years
      Qpdfview is much lighter and easier to install outside KDE than Okular. The darker background can be set under Edit-Settings-Graphics-General-'Paper color' by selecting for example 'grey' or 'darkgrey'.
  • dmb
    dmb almost 9 years
    Thank you so much for mentioning Zathura, it's really great! Note for others: don't forget to install zathura-extras package in order to get support for djvu and ps.
  • 3244611user
    3244611user almost 8 years
    I could not find an options to print/save it like this. Is there one?
  • Mohamed Slama
    Mohamed Slama almost 7 years
    awesome works for me , another way to do that simply Right click toolbar -> configure toolbar -> main tool bar <okular part> -> toggle change color this will add shortcut to the option
  • msmpro
    msmpro over 5 years
    The OP specifically mentioned that the color of the text should not be altered. I once tried to modify Evince's source code to allow choosing the colors, but the way it was written requires non-trivial code refactoring to achieve that.
  • Michael Hoffmann
    Michael Hoffmann over 5 years
    For scans of pages (like my textbook pdf), the Invert Colors color mode works really well. It inverts the image colors as well obviously, but for most diagrams that doesn't matter.
  • G 1
    G 1 almost 5 years
    This is exactly what I was looking for. Who knows an option like this is hidden in the Accessibility options.
  • cipricus
    cipricus over 4 years
    The OP doesn't like inverted colors - which is sometimes even worse for the eyes - and so just wants the background a little darker. But the above answer is still useful in general.
  • cipricus
    cipricus over 4 years
    Have you noticed? — Master PDF Editor can change color of background and font even in a pdf made of image/scanned pages! — More details in my answer.
  • cipricus
    cipricus over 4 years
    Adobe Reader 9 can do much more than Okular to improve readability. Okular cannot change font color as such, only inverts colors.
  • cipricus
    cipricus over 4 years
    Zathura can adjust colors of image-based PDF text too (scaned paper pages), something that most PDF viewers cannot do; as far as I know, the only other one that can is Master PDF.
  • Abhishek Ghosh
    Abhishek Ghosh over 4 years
    In master pdf is there any way to view the entire document in full screen, i.e. as the thing happens in acrobat reader. I want to view the entire page of the document to cover the entire rastor of my screen. I dont want the side, top and left and bottom panels remaining in full screen(just as the one happens in slide show) thank you...
  • cipricus
    cipricus over 4 years
    @AbhishekGhosh - in version 5.4.38: with F11 (View-Fullscreen) I only see the right scrollbar to the right, (nothing at top, left and bottom). You could ask a new question, link it here, and I'll provide a lengthy answer, considering version, screenshots etc.
  • Déjà vu
    Déjà vu almost 4 years
    Just to second that Master PDF Editor is a great tool.
  • craymichael
    craymichael almost 4 years
    Update Okular has a significantly better option now. Under the same accessibility configuration window, choose one of the Invert Luma color modes instead. This not only inverts the colors, but also rotates the hue, i.e. PDFs will be white text on black backgrounds, AND blues will be blues, and reds will be reds. (Available starting version 20.08.0)
  • cipricus
    cipricus over 3 years
    Just like Qpdfview, Okular cannot set the text color except to white-on-dark (inverted colors). Qpdfview is much lighter and easier to install outside KDE. The darker background can be set under Edit-Settings-Graphics-General-'Paper color' by selecting for example 'grey' or 'darkgrey'.
  • Levente
    Levente about 3 years
    OP wrote in their question: "[...] I just get the inversion of colors as suggestion – which is sometimes even worse for the eyes."