Red Hat Bugzilla – Bug 424951
Cannot produce number-up prints from paps output
Last modified: 2008-06-24 23:00:52 EDT
Description of problem:
paps does not produce DSC-compliant PostScript and so printing e.g. 4-up pages
from paps output does not work.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.echo -e '\n\n1\n\014\n\n2\n\014\n\n3\n\014\n\n4\n' >4.txt
2.lp -onumber-up=4 4.txt
The foomatic filter for the print job stops due to a ghostscript error.
Single sheet of paper with four numbers written on the front.
Running 'cupstestdsc' on the paps filter output shows that it is not DSC
compliant. Note that cupstestdsc can only point out errors; it does not
But the first two problems are:
1. there are two %%BeginProlog sections.
2. the setpagesize call needs to be moved to a new Begin/EndSetup section after
Even with these things corrected, gs is still not happy with the output after
pstops tries to number-up the pages onto a single sheet.
Here is how to run the filters individually:
/usr/lib/cups/filter/texttopaps 1 me '' 1 'number-up=4' 4.txt >paps.ps
/usr/lib/cups/filter/pstops 1 me '' 1 'number-up=4' paps.ps >ps.ps
GPL Ghostscript 8.61 (2007-11-21)
Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb...
3340872 1769483 2264160 971586 2 done.
Error: /undefined in last_x
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904
1 3 %oparray_pop 1888 1 3 %oparray_pop 1771 1 3
%oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- %loop_continue --nostringval--
--dict:1143/1684(ro)(G)-- --dict:0/20(G)-- --dict:81/200(L)--
--dict:27/42(L)-- --dict:5/11(L)-- --dict:13/21(L)-- --dict:4/11(L)--
Current allocation mode is local
Current file position is 7539
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
I originally reported this as a CUPS bug, thinking that pstops was behaving
Created attachment 290466 [details]
self-modified PostScript file
This is a self-modified PostScript according to CUPS guys and your suggestion
that was generated through paps. however I'm still getting an error on gs
because pstops restores objects after showpage. this breaks off all the
changes happened in the local virtual memory during drawing the previous page.
which paps relies on for next page.
Then paps is not producing a DSC-compliant document. It needs to put that sort
of thing in %PageSetup, surely?
Ok. should be fixed in 0.6.8-2.fc9.
Brilliant, that works!
One final change: the final '%%Pages:' line should appear after the '%%Trailer'
line, not before. After that change, 'cupstestdsc' now reports PASS for the output.
Fixed in 0.6.8-3.fc9.