[poppler] Reorganizing Annotation Appearance Stream Loading

Carlos Garcia Campos carlosgc at gnome.org
Wed Feb 20 00:55:41 PST 2008


El mar, 19-02-2008 a las 20:50 -0800, Michael Vrable escribió:
> I promised on IRC earlier today (or yesterday, UTC) that I'd send a 
> patch off with some work to make checkboxes use the appearance streams 
> provided in a PDF.
> 
> Widgets with variable text need to have their appearance streams 
> completely rewritten when modified.  However, for checkboxes and radio 
> boxes, the document may come with appearance streams for all the states 
> the widget may be in.  Nonetheless, the current code looks like it will 
> completely regenerate the appearance streams when the state of a 
> checkbox is changed.  The attached patch tries to fix this by factoring 
> out the code that loads the appropriate appearance stream from the PDF 
> file, and re-executes it when the state of checkbox widget changes.
> 
> Please don't apply this patch as-is.  If the general idea looks sound, I 
> will try to clean it up some.  This patch also touches the core of the 
> annotation code again, so feedback would be good.

looks good to me. 

> I saw mentioned on the mailing list the possibility of a merger of 
> FormWidget and AnnotWidget classes.  If so, that might be useful work to 
> have, since it would be good to have the FormWidget code more directly 
> update the appearState field in the annotation (instead of currently, 
> where FormWidget saves the information into the annotation dictionary, 
> and the annotation code reads it back out).

yes, I think Iñigo or Pino are already on it. 

> I'm not in a big hurry with this patch--the original motivation for me 
> to start working on this was the checkbox problem I posted a short fix 
> for earlier; that short patch makes things work well enough for me for 
> now.  I have another bug that I'd like to spend some time working on 
> first, but I'll come back to this later.

Great! Thanks Michael :-)

> --Michael Vrable
> _______________________________________________
> 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: 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/20080220/7827dff6/attachment.pgp 


More information about the poppler mailing list