Red Hat Bugzilla – Bug 187834
ghostscript converting ps and eps to invalid pdf
Last modified: 2007-11-30 17:11:29 EST
Description of problem:
The ps2pdf and epstopdf scripts use ghostscript to convert postscript and
encapsulated postscript files to pdf. Ater upgrading to FC5, I found that both
seem to now be producing invalid pdf files. xpdf shows the file only partly
drawn, and acroread reports an error. The problem doesn't appear to be in
ghostscript per se, because I also tried compiling older known-good ghostscript
versions (7.07) under FC5, and they showed the same problems. On the other hand,
ghostscript-8.15-0.rc3.3 under FC4 works fine. Perhaps a library issue (zlib)?
Version-Release number of selected component (if applicable):
I'm using FC5 package ghostscript-8.15.1-7, but I also compiled ghostscript
versions 7.07 and 8.53, with the same results.
Pretty much every time for me, although there may be .ps documents (without
images, for example) that convert with a problem.
Steps to Reproduce:
1. Produce a .ps or .eps file (matlab, firefox, etc.)
2. "ps2pdf file.ps" or "epstopdf file.eps"
3. "xpdf file.pdf" or "acroread file.pdf"
Sometimes xpdf shows part of the file, as if it stopped partway through drawing
it. Other times it throws errors like "Error (34748): Unexpected end of file in
flate stream", which makes me wonder if it's a zlib problem.
Acroread sometimes shows nothing, and other times reports "A drawing error occurred"
ghostscript itself reports the following for a converted pdf file:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3
%oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2
--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
--nostringval-- --nostringval-- --nostringval-- --nostringval--
--nostringval-- %array_continue --nostringval-- false 1 %stopped_push
--nostringval-- %loop_continue --nostringval-- 709
--dict:1122/1686(ro)(G)-- --dict:0/20(G)-- --dict:85/200(L)--
--dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:20/24(L)--
--dict:4/6(L)-- --dict:20/20(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)--
Current allocation mode is local
ESP Ghostscript 815.01: Unrecoverable error, exit code 1
A pdf file that can be viewed with xpdf, acroread, gv, etc.
I've attached a .eps file (from matlab, if it matters) and the output of ps2pdf
from ghostscript-8.15-0.rc3.3 on FC4 (a good pdf file) and ghostscript-8.15.1-7
on FC5 (which is corrupt). Running epstopdf produces identical results except
for the bounding box.
Created attachment 127256 [details]
Example .eps file and good (FC4) and bad (FC5) ps2pdf output
*** Bug 187856 has been marked as a duplicate of this bug. ***
*** Bug 188071 has been marked as a duplicate of this bug. ***
You can find mor infos for this bug here:
As written there, this has been fixed in their svn with revision r128. Maybe the
package maintainer of ghostscript-8.15.1-7 can incorporate the fix?
Does this test update fix the problem?:
*** Bug 188352 has been marked as a duplicate of this bug. ***
It does fix the problem for me, thanks!
The test update seems to fix my problems also. Thanks. I'm unclear why my
hand-compiled versions 7.07 and 8.53 showed the problem also, but perhaps I
wasn't running the version I thought I was.
(It's not actually an official update yet.. changing back to ASSIGNED)
Fixed in ghostscript-8.15.1-7.2.