[poppler] Popup annotations

Albert Astals Cid aacid at kde.org
Mon May 11 10:52:02 PDT 2009


A Diumenge, 10 de maig de 2009, Carlos Garcia Campos va escriure:
> El mié, 06-05-2009 a las 16:49 +0200, Carlos Garcia Campos escribió:
> > Hi all,
> >
> > Popup annots are annotations associated to a markup annotation
> > representing a popup window in the user interface. Right now, popup
> > annots are created in AnnotMarkup::initialize() taking the annot dict
> > from the Popup field of the annot markup dictionary. This is right,
> > however popup annotations are also in the main annots list which means
> > we are creating them again in Annots::createAnnot(), and since we are
> > not handling them, they are created as unknown annots.
> >
> > I'm not sure what do, I think we have at least two solutions:
> >
> >  a) Handle them in Annots::createAnnot() returning NULL to ignore them.
> > They will be accesible through the AnnotMarkup API
> > AnnotMarkup::getPopup().
> >
> > b) Handle them in Annots::createAnnot() creating a PopupAnnot and leave
> > frontends decide what to do with them. In this case we should probably
> > add refcount to popup annots, or figure out how to build the popup annot
> > before the markup annot and use the already created popup annot in the
> > markup one.
> >
> > I'm totally for a) which looks easier and clearer.
> > What do you think?
>
> Ok, after reading the pdf spec again I've realized that popups annots
> can appear by themselves, without a markup annot associated:
>
> "The pop-up annotation type typically does not appear by itself; it is
> associated
> with a markup annotation that uses it to display text.
> Note: The Contents entry for a pop-up annotation is relevant only if it
> has no par-
> ent; in that case, it represents the text of the annotation."
>
> So, attached patch adds popups annots to the annots list, only when they
> don't have a parent.

Seems okaish to my limited annots knowledge.

Albert

>
> > _______________________________________________
> > poppler mailing list
> > poppler at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/poppler




More information about the poppler mailing list