Bug 203287

Summary: Cannot view PDF file
Product: [openSUSE] SUSE Linux 10.1 Reporter: Markus KARG <markus.karg>
Component: BasesystemAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: binner, dmueller, eich, hmuelle
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Sample PDF file

Description Markus KARG 2006-09-01 15:48:14 UTC
There is one PDF file that always shows white pages only, while on Windows it shows very well. The used programm seems to be named "KGhostView".
Comment 1 Markus KARG 2006-09-01 15:50:36 UTC
Created attachment 97740 [details]
Sample PDF file

This file is shown as blank pages only on my machine.
Comment 2 Matthias Koenig 2006-09-11 11:01:30 UTC
Attached PDF works with gs, gv, acroread, evince.
Must be a bug in kghostview.
Comment 3 Dirk Mueller 2006-09-11 14:27:30 UTC
did you choose kghostview on purpose? because pdf's should be viewed in kpdf, which works fine. 

the reason it doesn't work in kghostview is because we set -dMaxBitmap to 10MB, aka we prevent ghostscript from DoS'ing your machine by loading huge bitmaps. but even 512000000 doesn't fix it. so its a ghostscript bug. 

gs -sDEVICE=x11 -dMaxBitmap=512000000  203287.pdf
Comment 4 Markus KARG 2006-09-11 17:16:17 UTC
(In reply to comment #3)
> did you choose kghostview on purpose? because pdf's should be viewed in kpdf,
> which works fine. 
> 

I did not choose anything. I just pointed with the mouse on the file in Konqueror and klicked it. Then the window showed up with no content, but with the title "kghostview".
Comment 5 Dr. Werner Fink 2006-09-12 10:15:00 UTC
This is _not_ critical because the system is up and running and the
allmost other PDF's are viewable.  Beside this you could try out
the newest ghostscript-library and ghostscript-x11.  Also I'd like
to suppose to disable the anti-aliasing, some broken PDF file may
use a redraw in the last font page command which makes the page white.

To be noted I can view the sample with

      gs -sDEVICE=x11

but see the broken behaviour of the PDF file if I use

     gs -sDEVICE=x11alpha
Comment 6 Dr. Werner Fink 2006-10-09 16:50:58 UTC
Just tried ESP Ghostscript 8.15.3 and the problem with anti-aliasing remains :(
Comment 7 Dr. Werner Fink 2006-10-16 13:36:26 UTC
OK seems to be a problem with the bufferd output used with anti aliasing.
If one use -dMaxBitmap=0 to enforce ghostscript to draw step by step
then even -sDEVICE=x11alpha does its job.  With MaxBitmap on default
the hole picture is drawed at once but if the background image is as
large as the text and drawing area an XSync() of XFlush() function call
from the X11 library() makes the background image together with the test
to disappear after drawing, skipping XSync() does not help either because
on pages without text some graphics are missed. :(
Comment 8 Dr. Werner Fink 2006-10-16 13:39:03 UTC
Is it allowed to forward the attachment #97740 [details] to other developers not
working for SuSE or Novell?
Comment 9 Markus KARG 2006-10-16 17:18:36 UTC
Yes you may forward the attachment, as it is publicly available on the internet anyways.
Comment 11 Dr. Werner Fink 2006-11-02 15:37:35 UTC
OK, it seems that I've the solution.  The buffered main update routine
uses a counter to check if there is something to draw from the memory
device into the X11 screen.  Now there is one other routine which sets
after calling the update routine this counter back to one which is wrong.
Comment 12 Dr. Werner Fink 2006-11-07 15:26:44 UTC
Now it was a long way to get a real fix for the problem.  This because the
pdf provided seems to include several overprint operators which has caused
in the memory device mode a new BoundingBox compositor device which will
overwrite the already printed data by a new white page.  By disabling such
a BoundingBox compositor device if a memory device is used the problem is
gone and really all data is printed to the X11 screen.
Comment 13 Dr. Werner Fink 2006-11-07 15:30:59 UTC
Anja? Could I get a SWAMPID for bug #203287, bug #202092, and bug #209879 ?
Comment 15 Anja Stock 2006-11-09 17:11:43 UTC
SWAMPID is 6966
Comment 16 Dr. Werner Fink 2006-11-10 12:33:08 UTC
Submitted
Comment 17 Anja Stock 2006-12-06 11:01:24 UTC
released