[poppler] Spec question: Resetting form fields

Carlos Garcia Campos carlosgc at gnome.org
Mon Mar 19 05:18:10 PDT 2012


Excerpts from Albert Astals Cid's message of dom mar 18 23:52:14 +0100 2012:
> I'm trying to get ready for 0.19.2 the patches to reset the form values and 
> I've stumbled over something that feels like a mis-specification or maybe i am 
> just reading the spec wrong.
> 
> The spec says
> 
> Upon invocation of a reset-form action, a conforming processor shall reset 
> selected interactive form fields to their default values; that is, it shall 
> set the value of the V entry in the field dictionary to that of the DV entry 
> (see Table 220). If no default value is defined for a field, its V entry shall 
> be removed.
> 
> So you go over the fields and if those fields have DV you set the V to that 
> value and if not you remove the V value.
> 
> Seems simple enough.
> 
> But the V value is marked as inheritable this means that in this situation
> 
> Form A
> V "Foo"
> DV None
> 
> Form B inherits Form A
> V "Bar"
> 
> When resetting Form "B" i'd remove the V value from it and it would show "Foo" 
> since it will then be read from Form A.
> 
> That seems "wrong" in my mind. But obviously it's "wronger" going to Form A 
> and removing the V there :D
> 
> So I'm quite stucked here. Any idea of what's the right thing to do?

What does acroread do in such case?

> Or maybe that is the right thing to do?
> 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120319/c1582e41/attachment.pgp>


More information about the poppler mailing list