Variable: pdf-info-epdfinfo-program

pdf-info-epdfinfo-program is a customizable variable defined in pdf-info.el.

Value

"/nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/epdfinfo"

Documentation

Filename of the epdfinfo executable.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-info.el
(defcustom pdf-info-epdfinfo-program
  (let ((executable (if (eq system-type 'windows-nt)
                        "epdfinfo.exe" "epdfinfo"))
        (default-directory
          (or (and load-file-name
                   (file-name-directory load-file-name))
              default-directory)))
    (cl-labels ((try-directory (directory)
                  (and (file-directory-p directory)
                       (file-executable-p (expand-file-name executable directory))
                       (expand-file-name executable directory))))
      (or (executable-find executable)
          ;; This works if epdfinfo is in the same place as emacs and
          ;; the editor was started with an absolute path, i.e. it is
          ;; meant for Windows/Msys2.
          (and (stringp (car-safe command-line-args))
               (file-name-directory (car command-line-args))
               (try-directory
                (file-name-directory (car command-line-args))))
          ;; If we are running directly from the git repo.
          (try-directory (expand-file-name "../server"))
          ;; Fall back to epdfinfo in the directory of this file.
          (expand-file-name executable))))
  "Filename of the epdfinfo executable."
  :type 'file)