Bernd Schmitt
2014-04-25 08:08:43 UTC
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
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