diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2018-10-08 21:25:14 +0200 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2018-10-08 21:25:14 +0200 |
| commit | 63754825e81c1a157d5b5c3d8bfca0e9002740dd (patch) | |
| tree | c33724458ddbb85c6307160c36625fb533b5e9a4 | |
| parent | d8dc23f48a44135f48b2bace16a182d501fa9744 (diff) | |
Improve compatibility of imagemagick's convert with MS Windows
| -rw-r--r-- | lisp/pdf-util.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el index d711963..43f61fb 100644 --- a/lisp/pdf-util.el +++ b/lisp/pdf-util.el @@ -923,7 +923,10 @@ See also `regexp-quote'." ;; * Imagemagick's convert ;; * ================================================================== * -(defcustom pdf-util-convert-program (executable-find "convert") +(defcustom pdf-util-convert-program + ;; Avoid using the MS Windows command convert.exe . + (unless (memq system-type '(ms-dos windows-nt)) + (executable-find "convert")) "Absolute path to the convert program." :group 'pdf-tools :type 'executable) @@ -1070,6 +1073,7 @@ Return the converted PNG image as a string. See also (plist-get (cdr (pdf-view-current-image)) :data))) (with-temp-file in-file (set-buffer-multibyte nil) + (set-buffer-file-coding-system 'binary) (insert image-data)) (pdf-util-munch-file (apply 'pdf-util-convert |
