[Pkg-cups-devel] Bug#168954: cupsys: Duplex not working -- a psutils bug? [patch]

Ronald Lembcke es186 at fen-net.de
Sat Apr 22 16:08:21 UTC 2006


Hi!

I've had the same problem with duplex not working when printing
Postscript generated/modified by psutils. I'm not sure if it's a bug in
psutils or cupsys. If you think it's a bug in psutils please forward
my message or reassign this bug.

The bug can be fixed either in Cups or in psutils. Psutils disables the
command /setpagedevice. But cups inserts the commands to disable
duplex-printing _after_ the command has been disabled.  Obviously either
duplex-printing and other options have to be enabled earlier or the
command must be disabled later.

You can try the following patch (to psutils) which does the latter. It
works for me and I didn't notice any ill side effects.



--- ../../psunu/psutils-1.17/psspec.c	1997-03-11 23:53:04.000000000 +0100
+++ psspec.c	2006-04-22 18:02:32.000000000 +0200
@@ -109,8 +109,6 @@
    " /monarchenvelope/c5envelope/dlenvelope/lettersmall/note",	/* paper */
    " /folio/quarto/a5]{dup where{dup wcheck{exch{}put}",	/* operators */
    " {pop{}def}ifelse}{pop}ifelse}forall",
-   "/setpagedevice {pop}bind 1 index where{dup wcheck{3 1 roll put}",
-   " {pop def}ifelse}{def}ifelse",
    "/PStoPSmatrix matrix currentmatrix def",
    "/PStoPSxform matrix def/PStoPSclip{clippath}def",
    "/defaultmatrix{PStoPSmatrix exch PStoPSxform exch concatmatrix}bind def",
@@ -166,6 +164,8 @@
       writestring("userdict/PStoPSxform PStoPSmatrix matrix currentmatrix\n");
       writestring(" matrix invertmatrix matrix concatmatrix\n");
       writestring(" matrix invertmatrix put\n");
+      writestring("/setpagedevice {pop}bind 1 index where{dup wcheck{3 1 roll put}\n");
+      writestring(" {pop def}ifelse}{def}ifelse\n");
    }
    writesetup();
    for (thispg = 0; thispg < maxpage; thispg += modulo) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20060422/55ff904a/attachment.pgp


More information about the Pkg-cups-devel mailing list