Bug 26532 - Not showing text in Evince
Summary: Not showing text in Evince
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 11:13 UTC by Bastien Nocera
Modified: 2010-02-16 15:33 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot (355.69 KB, image/png)
2010-02-11 11:13 UTC, Bastien Nocera
Details

Description Bastien Nocera 2010-02-11 11:13:34 UTC
Created attachment 33238 [details]
screenshot

The image attached shows the difference between the xpdf and poppler outputs.
Comment 1 Bastien Nocera 2010-02-11 11:18:14 UTC
Test file at:
http://people.fedoraproject.org/~hadess/poppler-bug-26532.pdf
Comment 2 Albert Astals Cid 2010-02-11 12:24:26 UTC
Can't download the file, it stalls at around 6 mb or so.
Comment 3 Carlos Garcia Campos 2010-02-11 23:50:39 UTC
I can reproduce it with both splash and cairo backends. Not sure whether it's related but there seems to be a problem with the some layer:

Error: Could not find a OCG with Ref (8468:0)

Thanks for reporting. 
Comment 4 Albert Astals Cid 2010-02-16 11:17:11 UTC
Brad, the following code fixes this problem and another pdf for me, do you remember if you had an exact reason for writing it the other way?

diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index f59b16a..5665f54 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -199,7 +199,7 @@ bool OCGs::optContentIsVisible( Object *dictRef )
       }
     } else if (ocg.isRef()) {
       OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );
-      if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
+      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
        result = false;
       } else {
        result = true ;
Comment 5 Brad Hards 2010-02-16 15:17:30 UTC
(In reply to comment #0)
> Created an attachment (id=33238) [details]
> screenshot
> 
> The image attached shows the difference between the xpdf and poppler outputs.
> 

(In reply to comment #4)
> Brad, the following code fixes this problem and another pdf for me, do you
> remember if you had an exact reason for writing it the other way?
> 
> diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
> index f59b16a..5665f54 100644
> --- a/poppler/OptionalContent.cc
> +++ b/poppler/OptionalContent.cc
> @@ -199,7 +199,7 @@ bool OCGs::optContentIsVisible( Object *dictRef )
>        }
>      } else if (ocg.isRef()) {
>        OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );
> -      if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
> +      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
>         result = false;
>        } else {
>         result = true ;
> 

No idea what I was thinking. The change looks good to me.

Brad
Comment 6 Albert Astals Cid 2010-02-16 15:33:33 UTC
Pushed, thanks :-)


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.