andras-simonyi/citeproc-el@9f783967c1 -> andras-simonyi/citeproc-el@ba49516265 bdarcus/citar@b24b5b94b7 -> bdarcus/citar@79512aefdf cjohansson/emacs-ssh-deploy@7c5fe8af2d -> cjohansson/emacs-ssh-deploy@9311f9b4f8 editorconfig/editorconfig-emacs@2ab86dc9a8 -> editorconfig/editorconfig-emacs@3c03cef311 emacs-lsp/lsp-mode@f49ea4e365 -> emacs-lsp/lsp-mode@cb7ec94435 joaotavora/eglot@dade5a1487 -> joaotavora/eglot@0f352213fc k1LoW/emacs-ansible@40af0d2bbb -> k1LoW/emacs-ansible@d89ac0ee57 magit/forge@0ff9b8a0de -> magit/forge@5586863f98 magit/magit@0ac05f3962 -> magit/magit@4e29d5827c paradoxxxzero/jinja2-mode@ecd19a40b7 -> paradoxxxzero/jinja2-mode@03e5430a7e purcell/envrc@456c4100de -> purcell/envrc@e161624b91 tmalsburg/helm-bibtex@aa775340ba -> tmalsburg/helm-bibtex@db73156576 tmalsburg/helm-bibtex@aa775340ba -> tmalsburg/helm-bibtex@db73156576 tumashu/posframe@6c0e63d6b3 -> tumashu/posframe@c91d4d53fa vedang/pdf-tools@4e6c778194 -> vedang/pdf-tools@72ef774320 zx2c4/password-store@04cd3023f4 -> zx2c4/password-store@eea24967a0
tools/pdf
Description
This module improves support for reading and interacting with PDF files in Emacs.
It uses pdf-tools
, which is a replacement for the built-in doc-view-mode
for
PDF files. The key difference being pages are not pre-rendered, but instead
rendered on-demand and stored in memory; a much faster approach, especially for
larger PDFs.
Displaying PDF files is just one function of pdf-tools
. See its project
website for details and videos.
Maintainers
This module has no dedicated maintainers.
Module Flags
This module provides no flags.
Plugins
Hacks
- Added out-of-the-box support for HiDPI or Retina displays.
Prerequisites
This module requires epdfinfo
, a program the the pdf-tools
plugin will build
automatically when you open your first pdf file, unless you're on Windows.
Windows users must build it themselves.
Building epdfinfo
on Windows
- Install MSYS2 and update the package database and core packages using the instructions provided.
-
Update and install dependencies, skipping any you already have
pacman -Syu pacman -S base-devel pacman -S mingw-w64-x86_64-toolchain pacman -S mingw-w64-x86_64-zlib pacman -S mingw-w64-x86_64-libpng pacman -S mingw-w64-x86_64-poppler pacman -S mingw-w64-x86_64-imagemagick
-
Install PDF tools in Emacs, but do not try to compile the server. Instead, get a separate copy of the source somewhere else.
git clone https://github.com/politza/pdf-tools
- Open mingw64 shell (Note: You must use mingw64.exe and not msys2.exe)
-
Compile pdf-tools:
# Cask requires python2 (important: not 3!) pacman -S python2 # Make the mingw-shell aware of your python installation. Adjust the path if # Emacs is installed elsewhere! export PATH="/c/Program Files (x86)/Emacs/bin/:$PATH" # Cask needs to know where git.exe is; change this path if git is installed # elsewhere! export PATH="/c/Program Files/Git/bin:$PATH" # Install cask. Certificate errors can be ignored with (unsafe) -k option. curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python # Make sure the build process can see cask export PATH="$HOME/.cask/bin:$PATH" cd /path/to/pdf-tools make -s
- This should produce a file
server/epdfinfo.exe
. Copy this file into the~/.emacs.d/.local/straight/build/pdf-tools/
. - Start Emacs.
- Open a pdf file (or run
M-x pdf-tools-install
) - Test it out:
M-x pdf-info-check-epdfinfo