editorconfig/editorconfig-emacs@f830b86 -> editorconfig/editorconfig-emacs@048c553 emacs-helm/helm-pass@ed5798f -> emacs-helm/helm-pass@4ce46f1 emacs-lsp/dap-mode@5450af5 -> emacs-lsp/dap-mode@aa15b9c emacs-lsp/helm-lsp@fc09aa0 -> emacs-lsp/helm-lsp@e934fea emacs-lsp/lsp-mode@3ca25e6 -> emacs-lsp/lsp-mode@c3cbadc emacs-lsp/lsp-ui@732992a -> emacs-lsp/lsp-ui@0ac3e12 jacktasia/dumb-jump@ff9fc93 -> jacktasia/dumb-jump@f6a1165 joaotavora/eglot@398b81e -> joaotavora/eglot@a2d1fc9 magit/forge@8683b14 -> magit/forge@fa80a87 magit/magit@62dfe5a -> magit/magit@1c60edc millejoh/emacs-ipython-notebook@069e54c -> millejoh/emacs-ipython-notebook@4ff76e5 nicolaisingh/saveplace-pdf-view@b037091 -> nicolaisingh/saveplace-pdf-view@54ed966 spotify/dockerfile-mode@58b7380 -> spotify/dockerfile-mode@ed1d04c tkf/emacs-request@0183da8 -> tkf/emacs-request@accd430 tmalsburg/helm-bibtex@94807a3 -> tmalsburg/helm-bibtex@ca09076 zx2c4/password-store@f152064 -> zx2c4/password-store@918992c Fix #4677
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