Using PDF Tools instead of Docview

Since the docview sometimes borks up, and PDF Tools is much better.
This commit is contained in:
Howard Abrams 2022-05-10 12:03:40 -07:00
parent 3a77274878
commit d3907c810a

View file

@ -1593,7 +1593,26 @@ Making demonstrations /within/ Emacs with my [[https://github.com/howardabrams/d
:straight (:type git :protocol ssh :host github :repo "howardabrams/demo-it") :straight (:type git :protocol ssh :host github :repo "howardabrams/demo-it")
:commands (demo-it-create demo-it-start)) :commands (demo-it-create demo-it-start))
#+END_SRC #+END_SRC
** PDF Viewing
Why not [[https://github.com/politza/pdf-tools][view PDF files]] better? To do this, first install the following on a Mac:
#+BEGIN_SRC sh
brew install poppler automake
#+END_SRC
And the equivalent on Linux. Actually, it is better to run [[help:pdf-tools-install][pdf-tools-install]], as it will do the above for the system.
Finally, lets install the Emacs connection to the =pdfinfo= program:
#+BEGIN_SRC emacs-lisp
(use-package pdf-tools
:mode ("\\.pdf\\'" . pdf-view-mode)
:init
(setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo")
:general
(:states 'normal :keymaps 'pdf-view-mode-map
"gp" 'pdf-view-goto-page
">" 'doc-view-fit-window-to-page))
#+END_SRC
Make sure the [[help:pdf-info-check-epdfinfo][pdf-info-check-epdfinfo]] function works.
* Technical Artifacts :noexport: * Technical Artifacts :noexport:
Let's provide a name so that the file can be required: Let's provide a name so that the file can be required: