Package: psutils Version: 1.17-21 Tags: patch psnup can't cope with files from at least some versions of the Gnome printing system. (In particular, for example, PostScript files from gedit 2.14.1-0ubuntu1.) On investigating, I found that the PostScript files were correct. The problem is that they do `/showpage load' which bypasses psnup's per-virtual-page rebinding of the word `showpage'.
The attached patch changes the way psnup does things: now, showpage is redefined once in the prologue to a procedure which checks at runtime whether to actually invoke showpage. (This bug was first reported by an Ubuntu user, at https://launchpad.net/distros/ubuntu/+source/gedit/+bug/28311 and I have just uploaded a version with this patch to Ubuntu dapper.) Ian. diff -u psutils-1.17/debian/changelog psutils-1.17/debian/changelog --- psutils-1.17/debian/changelog +++ psutils-1.17/debian/changelog @@ -1,3 +1,13 @@ +psutils (1.17-21ubuntu1) dapper; urgency=low + + * Make psnup (pstops, etc. etc.) cope with output from Gnome printing + system, which does `/showpage load', thus defeating attempts to + redefine showpage from virtual page to virtual page. Instead, we + redefine showpage to a procedure which looks at PStoPSenablepage, a + new variable, which is what changes from page to page. Malone #28311. + + -- Ian Jackson <[EMAIL PROTECTED]> Mon, 3 Apr 2006 16:23:14 +0100 + psutils (1.17-21) unstable; urgency=low * Fix packaging bug that prevented /etc/papersize from being inspected. only in patch2: unchanged: --- psutils-1.17.orig/psspec.c +++ psutils-1.17/psspec.c @@ -93,10 +93,13 @@ static char *prologue[] = { /* PStoPS procset */ #ifndef SHOWPAGE_LOAD + /* Wrap these up with our own versions. We have to */ "userdict begin", - "[/showpage/erasepage/copypage]{dup where{pop dup load", /* prevent */ - " type/operatortype eq{1 array cvx dup 0 3 index cvx put", /* binding */ - " bind def}{pop}ifelse}{pop}ifelse}forall", /* in prolog */ + "[/showpage/erasepage/copypage]{dup where{pop dup load", + " type/operatortype eq{ /PStoPSenablepage cvx 1 index" + " load 1 array astore cvx {} bind /ifelse cvx 4 array" + " astore cvx def}{pop}ifelse}{pop}ifelse}forall" + " /PStoPSenablepage true def", #else "userdict begin", "[/showpage/copypage/erasepage]{dup 10 string cvs dup", @@ -228,7 +231,7 @@ } if (add_next) { #ifndef SHOWPAGE_LOAD - writestring("/showpage{}def/copypage{}def/erasepage{}def\n"); + writestring("/PStoPSenablepage false def\n"); #else writestring("/PStoPSshowpage{}store/PStoPScopypage{}store/PStoPSerasepage{}store\n"); #endif -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]