Bug 7856 - Transparent boxes are rendered opaque, making text unreadable
Summary: Transparent boxes are rendered opaque, making text unreadable
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jeff Muizelaar
QA Contact:
URL:
Whiteboard:
Keywords:
: 6763 11886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-12 04:11 UTC by Andreas Simon
Modified: 2009-08-10 11:08 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
The said pdf. (1.52 MB, application/pdf)
2006-08-12 15:26 UTC, Albert Astals Cid
Details
PDF which shows transparency not working in poppler (15.78 KB, application/octet-stream)
2007-07-02 05:03 UTC, Willi Mann
Details
the broken postscript file (15.64 KB, application/octet-stream)
2007-07-03 12:25 UTC, Willi Mann
Details
initial implementation of transparency groups (3.40 KB, patch)
2007-07-28 09:15 UTC, Jeff Muizelaar
Details | Splinter Review
Implement transparency groups in the cairo backend (8.47 KB, patch)
2007-07-29 14:02 UTC, Jeff Muizelaar
Details | Splinter Review

Description Andreas Simon 2006-08-12 04:11:50 UTC
The background of certain sections of a particular PDF appear white and since
the text is also white that results in the text being invisible. The text can be
made visible by highlighting the text in evince.

Steps to reproduce:
1. Download http://www.killernic.com/KillerNic/PDFs/KillerNic_TechSpecsHi.pdf
2. Open the downloaded file in evince .

Expected results:
The boxes behind the text should be transparent and the text readable. Stuntment
at a network card that will "speed up and accelerate online video games"

Actual results:
Large white squares over the PDF where some of the text is on both pages.
Increase in marketting cynicism.

Additional Information:
The PDF displayed correctly in acroread acroread-7.0.8-0.4 on OpenSUSE 10.1.

This was reproduced with libpoppler 0.5.3-0ubuntu6 and 0.5.1-0ubuntu7 with both
evince and kpdf.


This bug was initially reported in Ubuntu:
    https://launchpad.net/distros/ubuntu/+source/poppler/+bug/56115
Comment 1 Albert Astals Cid 2006-08-12 15:25:11 UTC
This one is not going to be easy.
Comment 2 Albert Astals Cid 2006-08-12 15:26:51 UTC
Created attachment 6539 [details]
The said pdf.

Attaching the pdf, who knows if the url will change in the future.
Comment 3 Kristian Høgsberg 2006-09-21 16:15:09 UTC
*** Bug 6763 has been marked as a duplicate of this bug. ***
Comment 4 Kristian Høgsberg 2006-09-22 14:36:04 UTC
Here's another doc that seems to have the same problem:

  http://www.londontown.com/url/Christmas2005.pdf
Comment 5 Willi Mann 2007-07-02 05:03:52 UTC
Created attachment 10555 [details]
PDF which shows transparency not working in poppler

Another very simple testcase. Created with GIMP (gfig, saved as gif) and OpenOffice PDF export. It correctly displays in Debian etch kpdf, but not evince.
Comment 6 Albert Astals Cid 2007-07-02 06:42:16 UTC
Any chance you could get to try this with poppler 0.5.9?
Comment 7 Carlos Garcia Campos 2007-07-02 06:56:34 UTC
with 0.5.9 it's only reproducible with cairo backend. It looks like a bug in xpdf 3.01 that was fixed in 3.02. 
Comment 8 Willi Mann 2007-07-03 12:17:35 UTC
(In reply to comment #6)
> Any chance you could get to try this with poppler 0.5.9?

I tried with pdftops, but the resulting postscript is apparently completly broken, as no postscript viewer could show more than white paper.
Comment 9 Willi Mann 2007-07-03 12:25:19 UTC
Created attachment 10573 [details]
the broken postscript file
Comment 10 Albert Astals Cid 2007-07-10 12:49:43 UTC
The problem with pstopdf should be fixed now in cvs head.

Please next time do not attach gz files, i got confused by you saying that binary blob to be a PS file :D
Comment 11 Carlos Garcia Campos 2007-07-15 10:34:21 UTC
CairoOuputDev doesn't implement transparency group and soft mask methods

//----- transparency groups and soft masks                                                                                                                 
  virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,                                                                               
                                      GfxColorSpace * /*blendingColorSpace*/,                                                                                
                                      GBool /*isolated*/, GBool /*knockout*/,                                                                                
                                      GBool /*forSoftMask*/) {}                                                                                              
  virtual void endTransparencyGroup(GfxState * /*state*/) {}                                                                                                 
  virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {}                                                                            
  virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,                                                                         
                           Function * /*transferFunc*/, GfxColor * /*backdropColor*/) {}                                                                     
  virtual void clearSoftMask(GfxState * /*state*/) {}

So, I guess we only have to implement these methods, it should be easy for a cairo guru :-P 

Patches are welcome!
Comment 12 Jeff Muizelaar 2007-07-28 09:15:54 UTC
Created attachment 10910 [details] [review]
initial implementation of transparency groups

I've no idea if this still works, or applies or anything. Cairo doesn't support luma masking, only alpha masking. This patch makes no effort to support the luma masked transparency groups.
Comment 13 Jeff Muizelaar 2007-07-29 14:02:10 UTC
Created attachment 10916 [details] [review]
Implement transparency groups in the cairo backend

Still really ugly, but it should mostly work. At least it does for the pdf's I've tried.
Comment 14 Jeff Muizelaar 2007-07-30 11:45:24 UTC
Fixed in cvs
Comment 15 Carlos Garcia Campos 2007-08-07 12:23:07 UTC
*** Bug 11886 has been marked as a duplicate of this bug. ***
Comment 16 Wouter Bolsterlee 2008-02-25 02:16:19 UTC
Reopening this bug, since an attachment at Gnome Bugzilla still shows transparency problems: http://bugzilla.gnome.org/show_bug.cgi?id=516829#c2. Direct link to the PDF file: http://bugzilla.gnome.org/attachment.cgi?id=105391&action=view

I've checked with poppler 0.6.4 and Evince trunk.
Comment 17 Carlos Garcia Campos 2008-04-30 02:59:56 UTC
(In reply to comment #16)
> Reopening this bug, since an attachment at Gnome Bugzilla still shows
> transparency problems: http://bugzilla.gnome.org/show_bug.cgi?id=516829#c2.
> Direct link to the PDF file:
> http://bugzilla.gnome.org/attachment.cgi?id=105391&action=view
> 
> I've checked with poppler 0.6.4 and Evince trunk.
> 

yes, it works with splash though. With cairo the following message is printed in stdout:

matrix not invertible

Comment 18 Carlos Garcia Campos 2008-09-28 01:39:33 UTC
In Evince bug http://bugzilla.gnome.org/show_bug.cgi?id=554131 there's another test case:

http://www.sbc.se/EPiBrowser/Dokument%20&%20Blanketter/SBC%20ek%20f%C3%B6r/SBC%20Direkt%20h%C3%A4mta/SBC_Direkt_0608.pdf

I can confirm it's only reproducible with the cairo backend with current git master. 
Comment 19 Sebastien Bacher 2009-04-17 07:24:45 UTC
there are similar issues on 
https://bugs.launchpad.net/bugs/342608
https://bugs.launchpad.net/bugs/342282

could bug #17139 be a duplicate?
Comment 20 Carlos Garcia Campos 2009-07-20 12:01:15 UTC
(In reply to comment #19)
> there are similar issues on 
> https://bugs.launchpad.net/bugs/342608
> https://bugs.launchpad.net/bugs/342282
> 
> could bug #17139 be a duplicate?
> 

the first one (as well as the document mentioned in Comment #16) has to do with blend modes (will be fixed soon) and the second one might be related to bug #17139, I'll look at it in more detail. Thanks for providing test cases. 
Comment 21 Carlos Garcia Campos 2009-08-06 05:48:25 UTC
All documents mentioned in this report work now with current poppler (and current cairo). 

Sebastien: document attached to launchpad bug 342282 still fails to render (only page 2, page 11 looks good now) and it doesn't seem to be the same problem than bug #17139. So, could you please file a new bug report for it, please?
Comment 22 Carlos Garcia Campos 2009-08-10 11:08:30 UTC
(In reply to comment #21)
> All documents mentioned in this report work now with current poppler (and
> current cairo). 
> 
> Sebastien: document attached to launchpad bug 342282 still fails to render
> (only page 2, page 11 looks good now) and it doesn't seem to be the same
> problem than bug #17139. So, could you please file a new bug report for it,
> please?
> 

Nevermind, I've just fixed it (45dae4e66b2b833f95656850b5f1b0ffd1d96f1d)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.