Bug 424951 - Cannot produce number-up prints from paps output
Cannot produce number-up prints from paps output
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: paps (Show other bugs)
8
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-14 08:42 EST by Tim Waugh
Modified: 2008-06-24 23:00 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-24 23:00:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
self-modified PostScript file (8.03 KB, application/postscript)
2007-12-27 21:02 EST, Akira TAGOH
no flags Details

  None (edit)
Description Tim Waugh 2007-12-14 08:42:28 EST
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):
paps-0.6.8-1.fc8

How reproducible:
100%

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
  
Actual results:
The foomatic filter for the print job stops due to a ghostscript error.

Expected results:
Single sheet of paper with four numbers written on the front.

Additional info:
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
guarantee compliance.

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
the prolog.

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
gs ps.ps

I get:

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
Operand stack:
   last_x   -7414
Execution stack:
   %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--  
--nostringval--
Dictionary stack:
   --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
incorrect:
  http://www.cups.org/str.php?L2626
Comment 1 Akira TAGOH 2007-12-27 21:02:28 EST
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.
Comment 2 Tim Waugh 2008-01-10 06:53:11 EST
Then paps is not producing a DSC-compliant document.  It needs to put that sort
of thing in %PageSetup, surely?
Comment 3 Akira TAGOH 2008-01-10 09:46:33 EST
Ok. should be fixed in 0.6.8-2.fc9.
Comment 4 Tim Waugh 2008-01-10 10:17:08 EST
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.
Comment 5 Akira TAGOH 2008-01-14 22:51:48 EST
Fixed in 0.6.8-3.fc9.

Note You need to log in before you can comment on or make changes to this bug.