[cups.general] A duplex printing problem

Johannes Meixner jsmeix at suse.de
Wed Aug 17 00:21:49 PDT 2005


Hello,

On Aug 16 20:06 Don Felix wrote (shortened):
> I have some users who use a hand rolled 'a2ps' script to produce 2-up pages
....
> when sent to a CUPS queue which is set up for duplex printing, their output
> prints out single sided.

This is a known problem when the psutils (e.g. pstops, psnup, ...)
are used to convert the PostScript.
Doesn't a2ps call the psutils to produce 2-up pages?

Some time ago Helge explained the reason on this list:
-------------------------------------------------------------------
The culprit is the pstops utility from the PSUtils package.
It inserts a procset into the PS job just after the
header comments which - among other tings - defines the
setpagedevice operator as a noop.
Thus, any defaults defined by your printer's PPD or given
as options in the print command are just ignored.
-------------------------------------------------------------------


The CUPS compliant way is to use the CUPS "Document Options"
(e.g. number-up) and the CUPS "Text Options",
see the "CUPS Software Users Manual"
http://www.cups.org/doc-1.1/sum.html#4_3


If you cannot use the CUPS "Document Options" or "Text Options":

Create two PostScript code snippet files duplexnotumble.ps
--------------------------------------------------------------------
%!PS
statusdict /setduplexmode known
{statusdict begin true setduplexmode end} if {} pop
--------------------------------------------------------------------
and duplextumble.ps:
--------------------------------------------------------------------
%!PS
statusdict /setduplexmode known
{statusdict begin true setduplexmode end} if {} pop
statusdict /settumble known
{statusdict begin true settumble end} if {} pop
--------------------------------------------------------------------
and send this files before the real printing data like
cat duplexnotumble.ps file.ps | lp -d <queue>
or to avoid any additional CUPS filtering
cat duplexnotumble.ps file.ps | lp -d <queue> -o raw

You may have to adapt the PostScript code snippets
according to your printer.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/





More information about the cups mailing list