[gs-bugs] [Bug 691865] New: x11alpha target has trouble with many PDF documents
bugzilla-daemon at ghostscript.com
bugzilla-daemon at ghostscript.com
Tue Jan 4 02:06:43 UTC 2011
Summary: x11alpha target has trouble with many PDF documents
Component: X Display Driver
AssignedTo: hintak at ghostscript.com
ReportedBy: daw-misc at taverner.cs.berkeley.edu
QAContact: gs-bugs at ghostscript.com
Estimated Hours: 0.0
I've been noticing that, in my experience, ghostscript is unable to display
many PDF files. It got annoying enough that I decided to run a more rigorous
experiment. Based upon that, I can say that ghostscript's x11alpha driver
seems to have serious problems: there are many PDF documents it cannot display.
To quantify the magnitude of the problem, I wrote a script to find every .pdf,
.ps, and .eps file on my computer, and then try displaying that document using
ghostscript, with the following two invocations:
gs -q -dBATCH -dNOPAUSE -sDEVICE=x11alpha $file
gs -q -dBATCH -dNOPAUSE -sDEVICE=x11 $file
This rapidly scrolls through every page of the document. I record for which
files ghostscript successfully completes and for which it crashes with an
error. I iterate over the files, from smallest to largest.
This batch job takes a long time and has not yet completed. I will report full
reports when it finishes. However, I can report some preliminary numbers. It
has completed running on 3423 of the 9146 files on my system, and the results
are already pretty dramatic. I include a summary of them below:
PDF (.pdf files):
1550 displayed successfully with both x11alpha and x11 drivers
117 failed to display with x11alpha, but succeeded with x11
7 failed with both x11alpha and x11 (6 seem like corrupted files)
Postscript (.ps files):
756 displayed successfully with both x11alpha and x11 drivers
67 failed to display with either driver (65 are system files that don't look
like documents intended to display; 2 are in HP PJL, not Postscript)
Encapsulated Postscript (.eps files):
908 displayed successfully with both x11alpha and x11 drivers
18 failed (but weren't valid EPS in retrospect, so should be ignored)
I also tried this:
gs -q -dBATCH -dNOPAUSE -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=4
But it gives exactly the same results as -sDEVICE=x11alpha on all 3423 files
tried so far.
Conclusion: The x11alpha driver is unreliable. Due to problems with x11alpha,
ghostscript can't display about 7% of PDF files found in the wild.
Qualitatively, this makes ghostscript feel unreliable at displaying PDF files.
There is no reliable way to use ghostscript to display PDF files in
anti-aliased form on X11 displays. This is a serious problem for anyone who
uses ghostscript to view/display PDF files on an X11 display.
I hope this bug report raises awareness of just how bad the problems with
x11alpha are, and how they affect Ghostscript.
Possible strategies for addressing this problem:
1. Fix the problems in the x11alpha driver, whatever they are.
2. Mitigate them by introducing some driver that tries x11alpha, but falls back
to -sDEVICE=x11 if x11alpha fails rather than crashing with an error message.
Ideally, this fallback would be transparent (apart from loss of anti-aliasing),
and would continue displaying from the same page in the document. This would
be best as a short-term kludge, until the x11alpha driver can be repaired.
3. Change the default driver for PDF files from x11alpha to x11. However this
doesn't address the issue very well, since it leaves people without
Let me know if there's any additional information I can provide to help
troubleshoot the problems in the x11alpha driver.
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gs-bugs