pr-ps-printer-alist

pr-ps-printer-alist is a variable defined in `printing.el'.
Its value is
((default "lpr" nil "-P" "Document"))


Documentation:
Specify an alist for all PostScript printers (PostScript printer database).

The alist element has the form:

(SYMBOL COMMAND SWITCHES PRINTER-SWITCH NAME DEFAULT...)

Where:

SYMBOL It's a symbol to identify a PostScript printer. It's for
setting option `pr-ps-name' and for menu selection.
Examples:
'prt_06a
'my_printer

COMMAND Name of the program for printing a PostScript file. On MS-DOS
and MS-Windows systems, if the value is an empty string then
Emacs will write directly to the printer port given by NAME
(see text below), that is, the NAME should be something like
"PRN" or "LPT1:".
If NAME is something like "\\\\host\\share-name" then
COMMAND shouldn't be an empty string.
The programs `print' and `nprint' (the standard print programs
on Windows NT and Novell Netware respectively) are handled
specially, using NAME as the destination for output; any other
program is treated like `lpr' except that an explicit filename
is given as the last argument.
If COMMAND is nil, it's used the default printing program:
`print' for Windows system, `lp' for lp system and `lpr' for
all other systems. See also `pr-path-alist'.
Examples:
"print"
"lpr"
"lp"
"cp"
"gsprint"

SWITCHES List of sexp's to pass as extra options for PostScript printer
program. It is recommended to set NAME (see text below)
instead of including an explicit switch on this list.
Example:
. for lpr
'("-#3" "-l")
nil

. for gsprint.exe
'("-all" "-twoup")

PRINTER-SWITCH A string that specifies PostScript printer name switch. If
it's necessary to have a space between PRINTER-SWITCH and NAME,
it should be inserted at the end of PRINTER-SWITCH string.
If PRINTER-SWITCH is nil, it's used the default printer name
switch: `/D:' for Windows system, `-d' for lp system and `-P'
for all other systems.
Examples:
. for lpr
"-P "

. for lp
"-d "

. for print.exe
"/D:"

. for gsprint.exe
"-printer "

NAME A string that specifies a PostScript printer name.
On Unix-like systems, a string value should be a name
understood by lpr's -P option (or lp's -d option).
On MS-DOS and MS-Windows systems, it is the name of a printer
device or port. Typical non-default settings would be "LPT1:"
to "LPT3:" for parallel printers, or "COM1" to "COM4" or
"AUX" for serial printers, or "\\\\hostname\\printer"
(or "/D:\\\\hostname\\printer") for a shared network
printer. You can also set it to a name of a file, in which
case the output gets appended to that file. If you want to
discard the printed output, set this to "NUL".
Examples:
. for cp.exe
"\\\\host\\share-name"

. for print.exe or gsprint.exe
"/D:\\\\host\\share-name"
"\\\\host\\share-name"
"LPT1:"
"PRN"

. for lpr or lp
"share-name"

DEFAULT It's a way to set default values when this entry is selected.
It's a cons like:

(VARIABLE . VALUE)

Which associates VARIABLE with VALUE. When this entry is
selected, it's executed the following command:

(set VARIABLE (eval VALUE))

Note that VALUE can be any valid lisp expression. So, don't
forget to quote symbols and constant lists.
If VARIABLE is the special keyword `inherits-from:', VALUE must
be a symbol name setting defined in `pr-setting-database' from
which the current setting inherits the context. Take care with
circular inheritance.
Examples:
'(ps-landscape-mode . nil)
'(ps-spool-duplex . t)
'(pr-gs-device . (my-gs-device t))

This variable should be modified by customization engine. If this variable is
modified by other means (for example, a lisp function), use `pr-update-menus'
function (see it for documentation) to update PostScript printer menu.

Examples:

* On GNU or Unix system:

'((lps_06b "lpr" nil "-P" "lps_06b")
(lps_07c "lpr" nil nil "lps_07c")
(lps_08c nil nil nil "lps_08c")
)

* On Windows system:

'((lps_06a "print" nil "/D:" "\\\\printers\\lps_06a")
(lps_06b "print" nil nil "\\\\printers\\lps_06b")
(lps_07c "print" nil "" "/D:\\\\printers\\lps_07c")
(lps_08c nil nil nil "\\\\printers\\lps_08c")
(b/w1 "gsprint" ("-all" "-twoup") "-printer " "b/w-pr-name")
(b/w2 "gsprint" ("-all" "-twoup") nil "-printer \\\\printers\\lps_06a")
(LPT1 "" nil "" "LPT1:")
(PRN "" nil "" "PRN")
(standard "redpr.exe" nil "" "")
)


gsprint:

You can use gsprint instead of ghostscript to print monochrome PostScript files
in Windows. The gsprint utility documentation says that it is more efficient
than ghostscript to print monochrome PostScript.

To print non-monochrome PostScript file, the efficiency of ghostscript is
similar to gsprint.

Also the gsprint utility comes together with gsview distribution.

As an example of gsprint declaration:

(setq pr-ps-printer-alist
'((A "gsprint" ("-all" "-twoup") "-printer " "lps_015")
(B "gsprint" ("-all" "-twoup") nil "-printer lps_015")
;; some other printer declaration
))

The example above declares that printer A prints all pages (-all) and two pages
per sheet (-twoup). The printer B declaration does the same as the printer A
declaration, the only difference is the printer name selection.

There are other command line options like:

-mono Render in monochrome as 1bit/pixel (only black and white).
-grey Render in greyscale as 8bits/pixel.
-color Render in color as 24bits/pixel.

The default is `-mono'. So, printer A and B in the example above are using
implicitly the `-mono' option. Note that in `-mono' no gray tone or color is
printed, this includes the zebra stripes, that is, in `-mono' the zebra stripes
are not printed.


Useful links:

* GSPRINT - Ghostscript print to Windows printer
`http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'

* Introduction to Ghostscript
`http://www.cs.wisc.edu/~ghost/doc/intro.htm'

* How to use Ghostscript
`http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm'

* Information about the print command (print.exe)
`http://www.computerhope.com/printhlp.htm'

* RedMon - Redirection Port Monitor (redpr.exe)
`http://www.cs.wisc.edu/~ghost/redmon/index.htm'

* Redirection Port Monitor (redpr.exe on-line help)
`http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm'

* UNIX man pages: lpr (or type `man lpr')
`http://bama.ua.edu/cgi-bin/man-cgi?lpr'
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr'

* UNIX man pages: lp (or type `man lp')
`http://bama.ua.edu/cgi-bin/man-cgi?lp'
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp'

* GNU utilities for w32 (cp.exe)
`http://unxutils.sourceforge.net/'


You can customize this variable.