Expand my Community achievements bar.

xfa.signature.enumerate returns 0 objects

Avatar

Level 2

I have the most simple pdf form with 2 signature fields created in designer and when I try to get signature objects inside preSign javascript callback function via

var oSigs = xfa.signature.enumerate();

i get 0 objects

Example PDF file is here:

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BzJVQEUeXTAvZjE3NTYzNmEtYmE2NS00Y...

My code in preSign is taken from FormDesigner documentation, I just added messageBox notification about number of signature objects found (always 0):

var oSigs = xfa.signature.enumerate();

var iNum = oSigs.length;

xfa.host.messageBox("Number of signatures: "+iNum);

for(var i=0; i < iNum; i++) {

     var oChild = oSigs.item(i);

     xfa.signature.clear(child);

}

What could be the problem?

3 Replies

Avatar

Level 2

I need to clear other signatures on the form before signing this final signature. I can hide them but they are still visible in Signature panel. They shouldn't be.

Avatar

Former Community Member

OK. I cannot answer the enumeration question, immediately. I can answer how to clear an explicit signature field(s); call resetData().

For example,

xfa.host.resetData("form1.page1.subform1.digsig1");

xfa.host.resetData("form1.page1.subform1.digsig2");

Steve