summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r--lisp/doc-view.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 49d2b56b7d6..9d10d036285 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -172,6 +172,11 @@
:type 'file
:version "24.4")
+(defcustom doc-view-pdftotext-program-args '("-raw")
+ "Parameters to give to the pdftotext command."
+ :version "27.1"
+ :type '(repeat string))
+
(defcustom doc-view-pdf->png-converter-function
(if (executable-find doc-view-pdfdraw-program)
#'doc-view-pdf->png-converter-mupdf
@@ -1132,7 +1137,8 @@ Start by converting PAGES, and then the rest."
(or (executable-find 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)
+ (append doc-view-pdftotext-program-args
+ (list pdf txt))
callback))
(defun doc-view-current-cache-doc-pdf ()