[ESS] printing a file

Pfaff, Bernhard Dr. Bernhard_Pfaff at fra.invesco.com
Thu Jan 5 09:29:34 CET 2006

Hello list member,

As an alternative to Richard's suggestion with respect to ps printing, I
have the following in my .emacs:

(setq ps-lpr-command "c:\\ghostgum\\gsview\\gsprint.exe")
(setq ps-lpr-switches '("-query"))
(setq ps-printer-name t) 

The second line can be dropped, if you have only one printer.


-----Ursprüngliche Nachricht-----
Von: Richard M. Heiberger [mailto:rmh at temple.edu] 
Gesendet: Donnerstag, 5. Januar 2006 01:35
An: Mark Leeds; ESS-help at stat.math.ethz.ch
Betreff: Re: [ESS] printing a file

Printing is a problem because we are mostly using "Windows Printers".
That means that the printer is only capable of printing dots that the
software sends it.  It is not capable of printing streams of ascii

You therefore have two choices.
1. Use PostScript
   M-x ps-print-region
   M-x ps-print-buffer

You need the following settings in your .emacs
;; Use GhostScript to PostScript print files
(setenv "GS_LIB" "c:\\gs\\gs8.00;c:\\gs\\fonts")
(setq ps-lpr-command "c:/gs/gs8.00/bin/gswin32c")
(setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH" "-sDEVICE=mswinpr2"))
(setq ps-printer-name t)
(setq ps-print-header nil) ;; from ps-print.el

If you have gs newer than gs8.00, put the corresponding numbers in the above

2. Run printing through Notepad.

;;; experiments with "notepad /p", based on S-Plus objprint()
(setq printer-name "")         ;; notepad takes the default
(setq lpr-command "notepad")   ;; notepad
(setq lpr-switches nil)        ;; not needed
(setq lpr-printer-switch "/P") ;; run notepad as batch printer
(setq lpr-headers-switches nil);; must turn this off

ESS-help at stat.math.ethz.ch mailing list
Confidentiality Note: The information contained in this mess...{{dropped}}

More information about the ESS-help mailing list