>From 31244c43ecf24945db95c823c020eccb68d3ef1d Mon Sep 17 00:00:00 2001 From: Elias Pipping Date: Thu, 10 Jan 2013 01:12:45 +0100 Subject: [PATCH 3/3] Detect properly if PDFs can be handled --- lisp/doc-view.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 5f2d70d..8065b3e 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -708,11 +708,18 @@ OpenDocument format)." (executable-find doc-view-dvipdf-program)) (and doc-view-dvipdfm-program (executable-find doc-view-dvipdfm-program))))) - ((or (eq type 'postscript) (eq type 'ps) (eq type 'eps) - (eq type 'pdf)) - ;; FIXME: allow mupdf here + ((or (eq type 'postscript) (eq type 'ps) (eq type 'eps)) (and doc-view-ghostscript-program (executable-find doc-view-ghostscript-program))) + ((eq type 'pdf) + (pcase doc-view-pdf->png-converter-function + (`doc-view-pdf->png-converter-ghostscript + (and doc-view-ghostscript-program + (executable-find doc-view-ghostscript-program))) + (`doc-view-pdf->png-converter-mupdf + (and doc-view-pdfdraw-program + (executable-find doc-view-pdfdraw-program))) + (_ t))) ;; Assume the user knows what he/she is doing ((eq type 'odf) (and doc-view-unoconv-program (executable-find doc-view-unoconv-program) -- 1.8.1