andras-simonyi/citeproc-el@538fed794c -> andras-simonyi/citeproc-el@9f783967c1 bdarcus/citar@51b30f2e40 -> bdarcus/citar@b24b5b94b7 emacs-lsp/lsp-mode@3d6a01dde9 -> emacs-lsp/lsp-mode@c228bce435 gagbo/consult-lsp@aaa9a31bc8 -> gagbo/consult-lsp@f4f195046b joaotavora/eglot@28092ba3af -> joaotavora/eglot@2c0f262c24 magit/forge@a44afa81f1 -> magit/forge@0ff9b8a0de magit/magit@2e73b66c29 -> magit/magit@0ac05f3962 millejoh/emacs-ipython-notebook@c6696c12eb -> millejoh/emacs-ipython-notebook@6063cee7fb purcell/envrc@8a9a142cf9 -> purcell/envrc@456c4100de realgud/realgud@978b455d7d -> realgud/realgud@3c88611c4e tumashu/posframe@3b1dc400d2 -> tumashu/posframe@6c0e63d6b3 vedang/pdf-tools@a8847b75d3 -> vedang/pdf-tools@4e6c778194 wandersoncferreira/code-review@136c0933ba -> wandersoncferreira/code-review@ccc3795a72 yoshiki/yaml-mode@63b637f846 -> yoshiki/yaml-mode@a79d2a7b92 Close: #5977 Ref: emacs-lsp/lsp-mode#3295
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