Last active
December 19, 2018 16:57
-
-
Save jsrjenkins/b0e4cef1ef6a38d8a59cc8a8dabf5764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-pdf-misc-print-document (filename copies &optional interactive-p) | |
(interactive | |
(list (pdf-view-buffer-file-name) current-prefix-arg t)) | |
(cl-check-type filename (and string file-readable)) | |
(let ((programm (pdf-misc-print-programm interactive-p)) | |
(args (append pdf-misc-print-programm-args | |
(list (concat "-# " | |
(if (null copies) "1" | |
(number-to-string copies)))) | |
(list filename)))) | |
(unless programm | |
(error "No print program available")) | |
(apply #'start-process "printing" nil programm args) | |
(message "Print job started: %s %s" | |
programm (mapconcat #'identity args " ")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to remap the C-c C-p to this new printing function, put in the init.el :
(define-key pdf-misc-minor-mode-map (kbd "C-c C-p") 'my-pdf-misc-print-document)