[poppler] Popup annotations

Carlos Garcia Campos carlosgc at gnome.org
Sun May 10 10:32:19 PDT 2009


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. 

> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
-- 
Carlos Garcia Campos
   elkalmail at yahoo.es
   carlosgc at gnome.org
   http://carlosgc.linups.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-include-popups-annots-with-a-parent-in-annots.patch
Type: text/x-patch
Size: 1230 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090510/12ad47c4/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
 digitalmente
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090510/12ad47c4/attachment-0001.pgp 


More information about the poppler mailing list