Commit c9af3434 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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.
parent 58847eaf
Pipeline #3371 passed with stage
in 85 minutes and 58 seconds
......@@ -607,6 +607,9 @@ its functions.
*** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'.
*** Added support for password-protected PDF files
*** A new variable 'doc-view-pdftotext-program-args' has been added to
allow controlling how the conversion to text is done.
** Ido
*** New user option 'ido-big-directories' to mark directories whose
names match certain regular expressions as big. Ido won't attempt to
......@@ -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)
......@@ -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))
(defun doc-view-current-cache-doc-pdf ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment