Installing the epdfinfo server from source on Windows (+ Gotchas)
If using the GNU binaries for Windows, support for PNG and zlib must first be installed by copying the appropriate dlls into emacs’ bin/ directory. Most third-party binaries come with this already done.
- install MSYS2 and update the package database and core packages using the instructions provided.
- Open
mingw64shell (Note: You must usemingw64.exeand notmsys2.exe) - Compile the
epdfinfoserver using Installation steps described in Installing the `epdfinfo` server - This should produce a file
server/epdfinfo.exe. Copy this file into thepdf-tools/installation directory in your Emacs. - Make sure Emacs can find
epdfinfo.exe. Either add the MINGW install location (e.g.C:/msys2/mingw64/bin) to the system path withsetx PATH "C:\msys2\mingw64\bin;%PATH%"or set Emacs’s path with(setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH"))). Note that libraries from other GNU utilities, such as Git for Windows, may interfere with those needed bypdf-tools.pdf-info-check-epdinfowill succeed, but errors occur when trying to view a PDF file. This can be fixed by ensuring that the MSYS libraries are always preferred. pdf-toolswill successfully compile using Cygwin, but it will not be able to open PDFs properly due to the way binaries compiled with Cygwin handle file paths. Please use MSYS2.