Created attachment 33238 [details] screenshot The image attached shows the difference between the xpdf and poppler outputs.
Test file at: http://people.fedoraproject.org/~hadess/poppler-bug-26532.pdf
Can't download the file, it stalls at around 6 mb or so.
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.
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 ;
(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
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.