Bug 216154 - pstops creates extra EOF
pstops creates extra EOF
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: 216152 (view as bug list)
Depends On:
Blocks: FC6Update
  Show dependency treegraph
Reported: 2006-11-17 10:29 EST by Steve Hanselman
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.2.7-1.5.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-02 11:11:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tcpdump capture of generated postscript (150.54 KB, application/octet-stream)
2006-11-17 10:30 EST, Steve Hanselman
no flags Details
ppd file (97.72 KB, text/plain)
2006-11-17 10:32 EST, Steve Hanselman
no flags Details
out.ps (23.84 KB, application/octet-stream)
2006-11-21 07:09 EST, Tim Waugh
no flags Details
fail.ps (23.91 KB, application/octet-stream)
2006-11-21 07:20 EST, Tim Waugh
no flags Details
fails.ps (23.91 KB, application/postscript)
2006-11-21 07:57 EST, Steve Hanselman
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 2111 None None None Never

  None (edit)
Description Steve Hanselman 2006-11-17 10:29:31 EST
Description of problem:

(presumably) following an update fo cups the ability to specify certain options 
via lpd is now failing.

Version-Release number of selected component (if applicable):


How reproducible:

Always fails now

Steps to Reproduce:
An example would be as follows:-
  fax2ps -H11.5 -W8.25 -S ../recvq/fax000000825.tif |lpr -P sales_laser -o 
OutputBin=Left -o InputSlot=Tray2

However, the following works, so it is specific to an option rather than all 
options (actually, I could be wrong, it could just be that the printer ignores 
the error rather than dying on the job as it does for outputbin) :-
fax2ps -H11.5 -W8.25 -S ../recvq/fax000000825.tif |lpr -P sales_laser -o 

Actual results:
postscript job is rejected by printer and no output is produced

Expected results:
Job will run and produce output, tyaking paper fromt he specified bin and 
placing in the specified output tray.

Additional info:
Comment 1 Steve Hanselman 2006-11-17 10:30:46 EST
Created attachment 141482 [details]
tcpdump capture of generated postscript
Comment 2 Steve Hanselman 2006-11-17 10:31:43 EST
Also, I should add that
(a) It was working up until a few days ago
(b) the date of the ppd file is unchanged
Comment 3 Steve Hanselman 2006-11-17 10:32:44 EST
Created attachment 141483 [details]
ppd file
Comment 4 Tim Waugh 2006-11-17 10:33:52 EST
*** Bug 216152 has been marked as a duplicate of this bug. ***
Comment 5 Tim Waugh 2006-11-17 10:55:42 EST
What does 'rpm -q cups' say?
Comment 6 Steve Hanselman 2006-11-17 11:17:06 EST
Comment 7 Tim Waugh 2006-11-17 12:45:41 EST
Could you provide a small input file that demonstrates the problem?  Does this
exhibit the problem for instance?:

echo test | lpr -P sales_laser -o OutputBin=Left -o InputSlot=Tray2

or does it need to be something more than 'test'?
Comment 8 Steve Hanselman 2006-11-17 12:51:08 EST
Just running down the stairs to check... 5 mins
Comment 9 Steve Hanselman 2006-11-17 12:55:19 EST
Fails with the echo.
Comment 10 Tim Waugh 2006-11-20 07:46:22 EST
Okay.  How about this?:

lpr -P sales_laser -o OutputBin=Left -o InputSlot=Tray2 \

It should print a test page.
Comment 11 Steve Hanselman 2006-11-21 04:14:50 EST
Nothing comes out, printer just reports processing job and then back to idle 
within a second (i.e. same as before).
Comment 12 Tim Waugh 2006-11-21 07:09:40 EST
Created attachment 141757 [details]

Please save this file as 'out.ps' and print it like this:

lpr -P sales_laser -o raw out.ps

Does it work?  This file was created using your PPD in conjunction with the
'pstops' filter from cups-1.2.3-1.2, with options 'OutputBin=Left
Comment 13 Steve Hanselman 2006-11-21 07:14:28 EST
Yes, that works fine.
Comment 14 Tim Waugh 2006-11-21 07:20:32 EST
Created attachment 141758 [details]

And just to be sure, does this 'fail.ps' fail when printed in the same way?

lpr -P sales_laser -o raw fail.ps

This came from the pstops in cups-1.2.7-1.1.fc6.
Comment 16 Steve Hanselman 2006-11-21 07:26:36 EST
Still worked, just did a quick diff and there aren't any real differences of 
note, are you sure it's the right file (was also called out.ps)
Comment 17 Tim Waugh 2006-11-21 07:44:26 EST
Please paste these three lines into a terminal window:

PPD=/etc/cups/ppd/sales_laser.ppd \
./pstops 1 me '' 1 'OutputBin=Left InputSlot=Tray2' \
/usr/share/cups/data/testprint.ps /tmp/fails.ps

(it's one long command).  You should end up with a /tmp/fails.ps file.  Now try
printing that like this:

lpr -P sales_laser -o raw /tmp/fails.ps

Does that fail?  If so, please attach /tmp/fails.ps to this bug report.  Thanks.
Comment 18 Steve Hanselman 2006-11-21 07:50:20 EST
Seeing an error, I'll take a quick look at pstops and see what it wants:-

[root@dell download]# which pstops
[root@dell download]# cd /usr/bin
[root@dell bin]# PPD=/etc/cups/ppd/sales_laser.ppd ./pstops 1 me '' 
1 'OutputBin=Left 
InputSlot=Tray2' /usr/share/cups/data/testprint.ps /tmp/fails.ps
./pstops: page specification error:
  <pagespecs> = [modulo:]<spec>
  <spec>      = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]
                modulo>=1, 0<=pageno<modulo
[root@dell bin]#

Comment 19 Steve Hanselman 2006-11-21 07:53:30 EST
Ok, I see, it's teh filter one, still complaining, but it'll just take me a mo 
to figure out why.
Comment 20 Steve Hanselman 2006-11-21 07:56:00 EST
Ok, just needed a redirect top the file, fails (which is good!), I'll attach 
and then diff to see what the changes are.
Comment 21 Tim Waugh 2006-11-21 07:57:02 EST
Sorry, instead of './pstops' use '/usr/lib/cups/filter/pstops'.
Comment 22 Steve Hanselman 2006-11-21 07:57:26 EST
Created attachment 141760 [details]
Comment 23 Steve Hanselman 2006-11-21 08:00:18 EST
I can't see any noticable differences, let me check that it really did print 
and that they're not looking at the last one that did......
Comment 24 Tim Waugh 2006-11-21 08:03:45 EST
Just to clarify, did you end up using this command line for attachment id=141760?:

PPD=/etc/cups/ppd/sales_laser.ppd \
/usr/lib/cups/filter/pstops 1 me '' 1 'OutputBin=Left InputSlot=Tray2' \
/usr/share/cups/data/testprint.ps /tmp/fails.ps

(sorry for giving the wrong command line in comment #17)
Comment 25 Steve Hanselman 2006-11-21 08:05:22 EST
Bit of confusion, but fails.ps doesn't print and out.ps does, ok, there's two 
EOF's in the fails.ps
Comment 26 Steve Hanselman 2006-11-21 08:06:30 EST
Yes, (almost) I was lazy so I cd'd to the filter directory and had to add a 
redirect > before the output filename.
Comment 27 Tim Waugh 2006-11-21 08:14:32 EST
Could you try the attachment from comment #14 again please?  Yes, it's also
called out.ps.  The extra EOF was what I thought might be the problem, so it
would be good to just check what the attachment from comment #14 does.  Thanks.
Comment 28 Steve Hanselman 2006-11-21 08:18:51 EST
14 fails, they weren't taking off the printed ones.... (don't comment!)

So the extra EOF is the issue.
Comment 29 Tim Waugh 2006-11-21 09:28:32 EST
Okay, thanks for double-checking!  Reported upstream.
Comment 31 Tim Waugh 2006-12-07 05:18:44 EST
Please try cups-1.2.6-1.3.fc5 from updates-testing.

e.g. yum --enablerepo=updates-testing update 'cups*'
Comment 32 Tim Waugh 2006-12-13 09:05:51 EST
Have you had a chance to try this test update?
Comment 33 Steve Hanselman 2006-12-13 09:07:49 EST
Sorry, distracted!

I'll try it now.

Comment 34 Steve Hanselman 2006-12-13 09:45:08 EST
Yes, all sorted, close this entry.

Thanks for sorting it.


Comment 35 Fedora Update System 2007-01-02 11:03:49 EST
Fixed in update: cups-1.2.7-1.5.fc6

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