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:
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 number-up printing.
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 number-up printing.
I am using cups 1.3.5 from subversion repository r7167.
Compiled with Sun Studio 11 on a sparcv8, Solaris 9/10.
Version: 1.3.5 CUPS.org User: mardur
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);
}
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 number-up printing.
if (number && (doc->number_up > 1) && cupsArrayLast(doc->pages)) { ... nup-stuff }
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 number-up printing.
I am using cups 1.3.5 from subversion repository r7167. Compiled with Sun Studio 11 on a sparcv8, Solaris 9/10.