[Poppler-bugs] [Bug 89136] Annotations of /Subtype /Popup are not added to /Annots array of a page

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 16 00:38:44 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89136

--- Comment #12 from philipp.reinkemeier at offis.de ---
(In reply to philipp.reinkemeier from comment #10)
> (In reply to Carlos Garcia Campos from comment #9)
> > @@ +449,5 @@
> > > +  if (annot_markup) {
> > > +    AnnotPopup *annot_popup = annot_markup->getPopup();
> > > +    if (annot_popup) {
> > > +      this->addAnnot(annot_popup);
> > > +    }
> > 
> > I don't think we need this. If a new markup annotation is created with a
> > popup, setPopup will be called at some point, so we don't need to add the
> > popup when the markup annot itself is added.
> 
> Yes, setPopup will be called at some point. But you do not know whether it
> will be called before or after Page::addAnnot(). So removing this would
> require to first call Page::addAnnot(ma) for a markup annotation "ma" and
> then call ma->setPopup(). Doing it the other way round would then result in
> the same problem as before: The popup annotation does not appear in the
> /Annots array. Btw.: IIRC the last call sequence (setting popup, then adding
> to page) that would break if the snippet above is removed, is the one that
> is implemented in evince.

Btw.: I just tested what happens when i removed that code and create a Text
annotation in evince. Indeed evince first calls AnnotMarkup::setPopup() and
then Page::addAnnot(), meaning the resulting pdf is broken like without the
patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150216/0fca66d1/attachment.html>


More information about the Poppler-bugs mailing list