Bug 152448 - Duplex not working with psnup -2
Summary: Duplex not working with psnup -2
Status: RESOLVED DUPLICATE of bug 43507
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Printing (show other bugs)
Version: unspecified
Hardware: x86-64 SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: ---
Assignee: Johannes Meixner
QA Contact: Johannes Meixner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-21 11:16 UTC by Catia Lavalle
Modified: 2006-02-21 12:41 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Catia Lavalle 2006-02-21 11:16:13 UTC
Hello,
I have just changed my print server to a suse linux 10.0 x86-64 box.
The duplex itself is working without problem i.e. lpr -Pduplex file.ps prints duplex, but as soon as I print a file produced bu psnup -2 I get a single page print: i.e. psnup -2 file.ps|lpr -Pduplex --> 2 single pages (with 2 pages each sheet).
I already had this problem long time ago with the cd original cups of suse 9.0, in the net was marked as bug and it got fixed in the time.
In my  previous print server (suse 9.0 prof (i386),  cups 1.1.19-104) the duplex was working with psnup -2 (on the same printer).

The installed cups in the actual printer (where I have the problem) is: cups-1.1.23-21.2.
Comment 1 Johannes Meixner 2006-02-21 12:33:07 UTC
I wonder why it has ever worked.
This is a duplicate of bug #43507

Perhaps the next major CUPS version 1.2 has a changed pstops filter
which can work correctly even with the problematic PostScript output
of the psutils. Note that it is no bug in CUPS but in the psutils.

For number-up printing use the CUPS options and not the psutils,
see the "CUPS Software Users Manual": "Document Options".

If you want to print a booklet (which is not supported by the current
CUPS Document Options) use the workaround in bug #43507

*** This bug has been marked as a duplicate of 43507 ***
Comment 2 Johannes Meixner 2006-02-21 12:41:19 UTC
It seems bug 43507 is not public accessible.

Therefore here the explanation what exactly goes wrong
when using the psutils and the workaround from bug 43507:

On the CUPS mailing list the reason was explained:
---------------------------------------------------------------------------
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 only chance you'd have is with printers that need things
like media size, duplexing or the like to be specified by PJL
commands or with native IPP printers that natively support
these attributes via the IPP interface.
---------------------------------------------------------------------------


Workaround:

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
---------------------------------------------------------------------------
You may have to adapt the exact PostScript code to fit
for your particular printer. 

Send this files before the real printing data to activate duplex
without or with tumble like in the following examples:

  echo -e "1\f2\f3\f4\f5\f6\f7\f" \
  | a2ps -1 -o - \
  | psnup -4 \
  | cat duplexnotumble.ps - \
  | lp -d QUEUE

to print 4 pages on one sheet with duplex

and

  echo -e "1\f2\f3\f4\f5\f6\f7\f" \
  | a2ps -1 -o - \
  | psnup -2 \
  | cat duplextumble.ps - \
  | lp -d QUEUE

to print 2 pages per sheet with duplex and tumble.