On 12/10/2017 12:55 PM, Pablo Rodriguez wrote:
Hans,

I have the following sample:

     \setupinteraction[state=start]

     \starttext
     \startTEXpage[offset=1em]
          \definefield[x][signature]
          \field[x]
     \stopTEXpage
     \stoptext

And for the signature two widgets are generated (I include object 7 to
make sense of the kids in objet 8):

     7 0 obj
     [ 9 0 R ]
     endobj

     8 0 obj
     <<
       /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
       /DV <FEFF>
       /F 4
       /FT /Sig
       /Ff 0
       /Kids 7 0 R
       /MaxLen 1024
       /Q 0
       /Subtype /Widget
       /T <FEFF0078>
       /V <FEFF>
     >>
     endobj

     9 0 obj
     <<
       /Type /Annot
       /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
       /F 4
       /Parent 8 0 R
       /Q 0
       /Subtype /Widget
       /Rect [ 14.033 14.033 70.404 25.081 ]
     >>
     endobj >
When Acrobat XI (Win, just in case) signs the document, both widgets are
merged into one:

     25 0 obj
     <<
       /AP <<
         /N 14 0 R
       >>
       /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
       /DV <FEFF>
       /F 132
       /FT /Sig
       /Ff 0
       /MaxLen 1024
       /P 13 0 R
       /Q 0
       /Rect [ 14.033 14.033 464.204 95.701 ]
       /Subtype /Widget
       /T <FEFF005300690067006E006500640044006F00630075006D0065006E0074>
       /Type /Annot
       /V 21 0 R
     >>
     endobj

Would it be possible to generate only one annotation widget for the
signature?
Only if one beforehand would indicate that there are no more possible kids (we don't want to keep that info as yet another bit of multipass data) which would be yet another hard to explain (undocumented feature). The current approach is afaik valid (and it's already hard enough to get these widgets robust over pdf / acrobat versions). It would also make the code messier (nwo we clearly separate parent and instance, then we have an extra hybrid form which duplicates the code). So, what is the benefit? Saving a few bytes hardly matters here.

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context

Reply via email to