Discussion:
Doc-View (pdf) inverted
(too old to reply)
Bernd Schmitt
2014-04-25 08:08:43 UTC
Permalink
Hello,

most likely there is an already built-in solution, but i did not find
it. I like to read white letters on dark background for pdf-files,
too. So this is my solution:

(defun doc-view-invert ()
"to view inverted pdfs"
(interactive)
(let ((pattern (format "%s/*.png" doc-view-current-cache-dir)) )
(dolist (png-fname(file-expand-wildcards pattern))
(start-process-shell-command
"-doc-view-inverting-" "-doc-view-inverting-"
"convert" png-fname "-negate" png-fname))
(clear-image-cache ) ))


(defun doc-view-clear-image-cache ()
"to get doc-view-invert(ed) current page update"
(interactive)
(clear-image-cache))


doc-view-invert works fine except for the current page - therefore you
might need to run doc-view-clear-image-cache.

If you know a better and easier solution (maybe the built-in one),
please let me know.


Bernd
Emanuel Berg
2014-05-17 22:03:23 UTC
Permalink
Post by Bernd Schmitt
most likely there is an already built-in solution,
but i did not find it. I like to read white letters
on dark background for pdf-files, too. So this is my
solution
I use xpdf for that: in ~/.Xresources -
xpdf.reverseVideo: true
- or use the -r option.

This is possible in evince as well.

It is *much* better for your eyes, so Emacs should
definitely have a good way of providing that. If your
solution is good, propose they include it!
--
underground experts united:
http://user.it.uu.se/~embe8573
Emanuel Berg
2014-05-19 22:27:20 UTC
Permalink
Post by Emanuel Berg
It is *much* better for your eyes, so Emacs should
definitely have a good way of providing that. If
your solution is good, propose they include it!
Reverse video has been in GNU Emacs a long time.
Yes, I know how to set the colors in Emacs in general
but my impression was the OP looked for a PDF-specific
setting, which there might be as well - as I said, I
use xpdf for quick views of PDFs, otherwise I print
them.

PS. I take it you meant to send to comp.emacs, and not
as a mail to me privately? I include what you
wrote. DS.
Reverse video has been in GNU Emacs a long time.
You want the -r or --reverse-video command-line option
to GNU Emacs to get dark background with light text.
emacs -r or emacs --reverse-video or emacs -bg
#000000' -fg '#ffffff'
See also
C-h i m Emacs RET m Emacs Invocation RET m Colors X
RET
Or, you can play with colors in your .Xresources file
Emacs*Backgroun: #000000 Emacs*Foreground: #ffffff
--
underground experts united:
http://user.it.uu.se/~embe8573
Continue reading on narkive:
Loading...