changeset 98845:5eadfa7d3021

(doc-view-pdf->txt, doc-view-ps->pdf): Give an error if the needed external programs were not found.
author Glenn Morris <rgm@gnu.org>
date Sat, 18 Oct 2008 22:30:44 +0000
parents 6bf63c11e5e6
children 7d3f3273efda
files lisp/doc-view.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/doc-view.el	Sat Oct 18 22:09:19 2008 +0000
+++ b/lisp/doc-view.el	Sat Oct 18 22:30:44 2008 +0000
@@ -654,6 +654,8 @@
 
 (defun doc-view-pdf->txt (pdf txt callback)
   "Convert PDF to TXT asynchronously and call CALLBACK when finished."
+  (or doc-view-pdftotext-program
+      (error "You need the `pdftotext' program to convert a PDF to text"))
   (doc-view-start-process "pdf->txt" doc-view-pdftotext-program
                           (list "-raw" pdf txt)
                           callback))
@@ -684,6 +686,8 @@
 
 (defun doc-view-ps->pdf (ps pdf callback)
   "Convert PS to PDF asynchronously and call CALLBACK when finished."
+  (or doc-view-ps2pdf-program
+      (error "You need the `ps2pdf' program to convert PS to PDF"))
   (doc-view-start-process "ps->pdf" doc-view-ps2pdf-program
                           (list
                            ;; Avoid security problems when rendering files from