Function: doc-view-pdf->png-converter-ghostscript

doc-view-pdf->png-converter-ghostscript is a byte-compiled function defined in doc-view.el.gz.

Signature

(doc-view-pdf->png-converter-ghostscript PDF PNG PAGE CALLBACK)

Aliases

doc-view-ps->png-converter-ghostscript

Source Code

;; Defined in /usr/src/emacs/lisp/doc-view.el.gz
(defun doc-view-pdf->png-converter-ghostscript (pdf png page callback)
  (let ((pdf-passwd (if (doc-view-pdf-password-protected-ghostscript-p pdf)
                        (read-passwd "Enter password for PDF file: "))))
    (doc-view-start-process
     "pdf/ps->png" doc-view-ghostscript-program
     `(,@doc-view-ghostscript-options
       ,(concat "-sDEVICE=" doc-view-ghostscript-device)
       ,(format "-r%d" (round doc-view-resolution))
       ,@(if page `(,(format "-dFirstPage=%d" page)))
       ,@(if page `(,(format "-dLastPage=%d" page)))
       ,@(if pdf-passwd `(,(format "-sPDFPassword=%s" pdf-passwd)))
       ,(concat "-sOutputFile=" png)
       ,pdf)
     callback)))