Is there a pdf reader allowing me to change background color of (arXiv) pdfs?
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:
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)
- Zathura - with settings like those mentioned in this older answer
and
can change color of both pages and fonts even in image-based pdf files.
Select "more" to have any color:
With an image/scanned text, a value of#3b3537
for the page color and #b0afac
for the font color gives this:
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:
- Foxit Reader for Linux has the option of changing both the color of background and of text — either by selecting a color profile
or by selecting any color
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.
Then, for easy access, configure toolbar and add Toggle change color. It works for picture/scanned pages too.
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
.
Related videos on Youtube
Comments
-
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 onAcrobat 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 about 10 yearsThat depends on the PDF not the PDF reader...or so I think.
-
Parto about 10 yearspossible duplicate of How to change pdf background color in evince?
-
Parto about 10 yearsFrom ubuntuforums.org/showthread.php?t=1127012&page=2 you can try KPDF. It supposedly has this feature.
-
msmpro about 9 yearsTrue 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 over 5 yearsReading white characters on black background is better, please check this on Nature.com nature.com/articles/s41598-018-28904-x/email/correspondent/c1
-
cipricus over 3 yearsQpdfview 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 almost 9 yearsThank 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 almost 8 yearsI could not find an options to print/save it like this. Is there one?
-
Mohamed Slama almost 7 yearsawesome 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 over 5 yearsThe 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 over 5 yearsFor 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 almost 5 yearsThis is exactly what I was looking for. Who knows an option like this is hidden in the Accessibility options.
-
cipricus over 4 yearsThe 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 over 4 yearsHave 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 over 4 yearsAdobe Reader 9 can do much more than Okular to improve readability. Okular cannot change font color as such, only inverts colors.
-
cipricus over 4 yearsZathura 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 over 4 yearsIn 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 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 almost 4 yearsJust to second that Master PDF Editor is a great tool.
-
craymichael almost 4 yearsUpdate 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 over 3 yearsJust 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 about 3 yearsOP wrote in their question: "[...] I just get the inversion of colors as suggestion – which is sometimes even worse for the eyes."