diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-29 14:26:26 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-29 14:26:26 +0200 |
commit | c9af343448e890a80093db03dd9a70f55c0cbde3 (patch) | |
tree | 9335f94f6ebbe34bcc461bc403bed006040c311b /lisp/doc-view.el | |
parent | 58847eaf0d66ec4747ca56974327ccff2ba6c264 (diff) | |
download | emacs-c9af343448e890a80093db03dd9a70f55c0cbde3.tar.gz |
Allow customising pdf-to-text parameters
* lisp/doc-view.el (doc-view-pdf->txt): Allow customising the
parameters (bug#8519).
(doc-view-pdftotext-program-args): New variable.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 8 |
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 () |