Fork me on GitHub
#emacs
<
2017-09-30
>
gonewest81816:09:56

I have set lpr-switches to include “-o lpi=14” to produce more lines of output per page. However, when I print with print-buffer emacs itself paginates the text and inserts a header with date and buffer name and page number, and it seems to cut every page short. It doesn’t know I’m using a smaller font. What’s the setting for this?

gonewest81821:09:10

ok, I got the answer from the source. By default, print-buffer uses pr to paginate, and the switches for pr will be lpr-page-header-switches. See https://github.com/emacs-mirror/emacs/blob/master/lisp/lpr.el#L168-L184

gonewest81821:09:59

so therefore my init.el is now

(setq lpr-switches '("-o" "cpi=14"          ; characters per inch
                     "-o" "lpi=8"           ; lines per inch
                     "-o" "page-top=32"     ; margins in points (1/72 inch)
                     "-o" "page-bottom=32"
                     "-o" "page-left=32"
                     "-o" "page-right=32"))
(setq lpr-page-header-switches '("-l" "80") ; lines per page