Skip to content

Instantly share code, notes, and snippets.

@yiufung
Last active July 22, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yiufung/196c69379fc8bf7a55b0ac97489c6cda to your computer and use it in GitHub Desktop.
Save yiufung/196c69379fc8bf7a55b0ac97489c6cda to your computer and use it in GitHub Desktop.
Emacs: Use pdf-tools under Windows
;; m-parashar has released pre-compiled pdf-tools for Windows at
;; https://github.com/m-parashar/emax64/releases/download/20180529/pdf-tools-20180428.827.7z
;; Extract it and change :load-path accordingly.
(use-package pdf-tools
;; Dependency of pdf-tools
:ensure tablist
:load-path (lambda () (expand-file-name "bin/pdf-tools-20180428.827/"
my-emacs-conf-directory))
;; Tell Emacs to autoload pdf-tools
:init (load "pdf-tools-autoloads" nil t)
;; Swiper don't work well in pdf-tools
:bind (:map pdf-view-mode-map
("C-s" . 'isearch-forward)
("C-r" . 'isearch-backward)
)
:magic ("%PDF" . pdf-view-mode)
:config
(setq pdf-view-display-size 'fit-height)
(setq pdf-annot-activate-annotation t)
(pdf-tools-install)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment