Summary: | PDF File Renders Badly | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Ben Rousch <brousch> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | chris.liddell, robin.watts |
Priority: | P4 | ||
Version: | 9.04 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
42x30 blueprints
Screenshot of scrambled PDF output file Scrambled output from provided ghostscript command Scrambled output from gs command on Debian 6.0.4 with gs 8.64 |
This is a 34 page PDF file, which page do you see a problem ? What is the nature of the problem ? "Bad rendering", while descriptive, doesn't tell the developer much, and on a huge page it will be much easier to find the problem if you can say *where* on the page it is. What Ghostscript command line are you using ? The problem is on any of the pages. The entire page appears scrambled with letters and symbols scattered seemingly at random. I am using Ghostscript behind Imagemagick, so I'm not sure exactly how it's called. However you can easily see the problem by using the gs command to view the page and comparing that to one of the other PDF viewers. (In reply to comment #2) > The problem is on any of the pages. The entire page appears scrambled with > letters and symbols scattered seemingly at random. I don't see this at all. > I am using Ghostscript behind Imagemagick, so I'm not sure exactly how it's > called. However you can easily see the problem by using the gs command to view > the page and comparing that to one of the other PDF viewers. Not what I see. For example the file you sent, on page 1 has the text 'Purdue University Discovery Park' at the top (or right if the page is rotated for reasonable reading) just under the engineers signature. Other text on the page appears correct as well. If you can't supply a means for us too reproduce your problem, then I'm afraid we can't fix it. You could try using the current release (9.05) instead of an older version but that's all I can suggest. I believe it is possible to retrieve the command ImageMagick is using, but I have no idea how to go about it. Created attachment 8405 [details]
Screenshot of scrambled PDF
A screenshot of page 1 of the original PDF showing the scrambling.
I tried Ghostscript 9.05 and had the same scrambled result. I have attached a screenshot to demonstrate what I am seeing. I'm pretty sure you were running 9.04 when you took that screenshot... Created attachment 8406 [details] output file (In reply to comment #5) > I tried Ghostscript 9.05 and had the same scrambled result. I have attached a > screenshot to demonstrate what I am seeing. That's quite different to what I see. How sure are you that ImageMagick is using the installed version of Ghostscript and not some earlier version ? I'm afraid that unless you can give us a means to reproduce this with Ghostscript itself, we can't help. This command line: gs -sDEVICE=png16m -r72 -dFirstPage=1 -dLastPage=1 -o out.png Add_3_Bugs.pdf produces the attached PNG output from current code. My screenshot is from 9.04, but the result is the same in 9.05. I booted into an Ubuntu 12.04 LiveCD to try Ghostscript 9.05. Created attachment 8407 [details]
Scrambled output from provided ghostscript command
This is the PNG file produced from the gs command you suggested.
I wonder if this is a third party problem, given that Ubuntu insist on building Ghostscript with shared libraries. I would suggest building Ghostscript from source and trying that so that you get our versions of the libraries rather than using the system ones. As you can see, your experience differs from mine and I can't reproduce your results. Created attachment 8408 [details]
Scrambled output from gs command on Debian 6.0.4 with gs 8.64
This scrambled PNG was produced by the original PDF and suggested gs command using Debian 6.0.4 with Ghostscript 8.71.
The file contains JBIG2 images. Your distribution's jbig2dec code is out of date compared to that in the latest Ghostscript release. There is some resistence to continuing jbig2dec as a separate "product" as we are not aware of any other projects which use it. It looks like I have jbig2dec 0.11-1ubuntu1 installed, which is newer than the current version according to http://jbig2dec.sourceforge.net/ Is there a better version that I and Ubuntu should be using? I cloned and installed jbig2dec from here http://git.ghostscript.com/?p=jbig2dec.git . It now reports version 0.11pre. This seems to have had no effect. The jbig2dec in the Ghostscript repository is the latest code (it will still say 0.11 as it hasn't been formally released as a standalone package). *** Bug 692905 has been marked as a duplicate of this bug. *** |
Created attachment 8402 [details] 42x30 blueprints The attached PDF renders correctly in Adobe Reader X, Foxit Reader 5.1, Okular 4.7.4, and Evince 3.2.1, but it doesn't render correctly using Ghostscript 8.4 (Windows) or Ghostscript 9.04 (Ubuntu Linux 11.10).