[cups.bugs] [LOW] STR #2663: pstops filter produces incorrect output with number-up=2 on some documents
mardur at gmx.net
Wed Jan 9 10:35:55 PST 2008
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
On some documents (ps-files created with LaTeX-beamer package, or with cups
pdftops-filter, see attachment for an example input file (gzipped)) with an
odd number of pages, the pstops filter produces incorrect output with
option 'number-up=2'. The ps-viewer gv is hanging on displaying the last
page. The last page is not printed on an HP LaserJet 4350.
filter/pstops.c (7067 2007-11-09 19:54:09Z mike) contains the code:
if (number && !is_first_page(number) && cupsArrayLast(doc->pages))
pageinfo = (pstops_page_t *)cupsArrayLast(doc->pages);
start_nup(doc, doc->number_up, 0, doc->bounding_box);
pageinfo->length = cupsFileTell(doc->temp) - pageinfo->offset;
which is not executed on the last output page with an odd-page input
document, due to the "!is_first_page(number)". Instead of testing for a
single page on the last output page, the filter should check for activated
if (number && (doc->number_up > 1) && cupsArrayLast(doc->pages))
I am not familiar with postscript, so I don't know what start/end_nup are
doing together with 'showpage', but the change above resolved the problem.
This code is working fine on all tested documents with and without
I am using cups 1.3.5 from subversion repository r7167.
Compiled with Sun Studio 11 on a sparcv8, Solaris 9/10.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 62938 bytes
Desc: not available
More information about the cups-devel