Bug 692679

Summary: pdf2ps produces broken PostScript output on the attached PDF file
Product: Ghostscript Reporter: Till Kamppeter <till.kamppeter>
Component: PS WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: jackie.rosen, sven
Priority: P4    
Version: 9.04   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: REC10889-2-printout.pdf
REC10889-2-printout.ps

Description Till Kamppeter 2011-11-12 23:45:59 UTC
Created attachment 8105 [details]
REC10889-2-printout.pdf

Convert the attached PDF file to PostScript with

pdf2ps REC10889-2-printout.pdf

Then try to display the resulting file with

gs REC10889-2-printout.ps

Output is as follows:

----------
till@till:~/ghostscript/testfiles$ gs REC10889-2-printout.ps 
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%[ Error handled by opdfread.ps : ioerror; OffendingCommand: --nostringval-- ]%%
>>showpage, press <return> to continue<<

Loading NimbusMonL-Regu font from /usr/share/fonts/type1/gsfonts/n022003l.pfb... 3636440 2256496 6877360 4918268 1 done.
%%[STACK:
-mark-
-mark-
-mark-
-mark-
%%]%
>>showpage, press <return> to continue<<


till@till:~/ghostscript/testfiles$ 
----------

GS produces a blank page at first and then a page with the text:

----------
ERROR:
ioerror
OFFENDING COMMAND:
--nostringval--
STACK:
-mark-
-mark-
-mark-
-mark-
----------

This happens with Ghostscript 9,04 on Ubuntu Oneiric (11.10).
Comment 1 Till Kamppeter 2011-11-12 23:48:24 UTC
Created attachment 8106 [details]
REC10889-2-printout.ps

PostScript resulting from applying pdf2ps to the PDF file.
Comment 2 Sven Meier 2011-11-13 08:18:59 UTC
I'm the 'owner' of the pfd file. Let me know if I can help with further informations.
Comment 3 Ken Sharp 2011-11-14 09:09:41 UTC
This works fine for me with the latest HEAD. I checked with the 9.04 released binary and it fails as described, so it has already been fixed.

Checking with Distiller, the 9.04 release code output fails (as described), and the current HEAD works, so this does seem to have been a fix in pdfwrite/ps2write rather than a fix in the interpreter, but it is possible that the real fix was in some internal area, such as font handling.
Comment 4 Till Kamppeter 2011-11-14 09:13:53 UTC
Can you find out which change fixed it, so that I can issue an update for Ubuntu Oneiric? Thanks.
Comment 5 Ken Sharp 2011-11-14 13:11:26 UTC
(In reply to comment #4)
> Can you find out which change fixed it, so that I can issue an update for
> Ubuntu Oneiric? Thanks.

This appears to have been a fix to the LZWEncode filter :
42582272f2b4dce1ccd5c600a2d6dc71794b4d3e

I'd strongly recommend taking this patch anyway, its quite an important one.