Bug 196982

Summary: something broke between FC4 and FC5?
Product: [Fedora] Fedora Reporter: james
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.61-5.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-10 13:11:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Document1.ps none

Description james 2006-06-27 22:34:00 UTC
Description of problem:
Hmm - this latest version of ghostscript can no longer read
WordPerfect8-generated postscript files which were generated after around the
summer of 2004.  These later files most noticeably now have the top line
"12345X@PJL ENTER LANGUAGE = POSTSCRIPT".  Everything was working fine on FC4.

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

How reproducible:
Every time.

Steps to Reproduce:
1. gv <file> or lpr <file>
2.
3.
  
Actual results:
ESP Ghostscript 815.02: Unrecoverable error, exit code 1


Expected results:


Additional info:
These newly-become problem postscipt files were all generated with WordPerfect
8.  Other files, mostly graphic image postscript files, and postscipt recently
generated from pdf, still seem to work normally.  A "problem-file" is attached.

Comment 1 Tim Waugh 2006-06-28 07:22:20 UTC
This sounds like a PJL-encapsulated PostScript job, so perhaps something like
this is what's needed:

http://www.rz.uni-karlsruhe.de/~andy/source/Local/pjlstrip-1.0/pjlstrip.c

I didn't think that ghostscript intentionally stripped PJL before.  Could you
attach the file in question please?  Thanks.

Comment 2 james 2006-07-28 19:46:23 UTC
Did you get the test file I sent?

This is still a problem for me since I have to print reports every month with WP.

Comment 3 Tim Waugh 2006-12-15 15:32:26 UTC
No, there is no attachment to this bug report.

Comment 4 Tim Waugh 2006-12-15 16:22:05 UTC
Created attachment 143781 [details]
Document1.ps

[sent by email]

Comment 6 Espen Stefansen 2007-04-26 17:28:42 UTC
I just had a look at this and it seems that it's the line containing 
setpagedevice and PreferredMediaSelection that fails. 

If u remove "PreferredMediaSelection true" from line 392, the document is 
working.

Comment 7 james 2007-04-26 18:34:27 UTC
Yes!  Thanks for looking at that.  That difference seems to be consistent 
across other working and non-working postscript files I have.

There are two WordPerfect files which contain that term - err, which is 
not "PreferredMediaSelection", but correctly "DeferredMediaSelection":
 shlib10/hpla4pps.prs
 shlib10/wp60ps01.us.all

This was not a change between FC4 and FC5, but instead, my starting to use an 
HP LaserJet 4 Plus around that time, which apparently makes use of the 
shlib10/hpla4pps.prs file.

The remaining question would be: Is there anything wrong with the way 
ghostscript is interpreting that line, or is that line invalid postscript from 
WordPerfect?

Comment 8 Tim Waugh 2008-01-10 13:11:55 UTC
This seems to work fine now in Fedora 8 (ghostscript-8.61-5.fc8).