summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2018-10-08 21:25:14 +0200
committerAndreas Politz <politza@hochschule-trier.de>2018-10-08 21:25:14 +0200
commit63754825e81c1a157d5b5c3d8bfca0e9002740dd (patch)
treec33724458ddbb85c6307160c36625fb533b5e9a4
parentd8dc23f48a44135f48b2bace16a182d501fa9744 (diff)
Improve compatibility of imagemagick's convert with MS Windows
-rw-r--r--lisp/pdf-util.el6
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