Skip to main content
Participating Frequently
December 13, 2018
Question

How to count number of signature fields on pdf document with javascript?

  • December 13, 2018
  • 1 reply
  • 1017 views

How can i count the number of signatures on a pdf document? and perform some action when the last signature is signed, say save the signed doc to another location in the back ground....

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 13, 2018

(Glad to see you followed my advice about posting here)

Are those Digital Signature fields? If so, you can use a script to check their values. If it's not null then they are signed.

So let's say you have 3 such fields. You can add a script to their Signed events that check the values of the other two. If they are both signed then you can proceed to save the form to the desired location. That latter will require installing a script on the local machine, though. See this tutorial for more help with that: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

rodgerMaeAuthor
Participating Frequently
December 13, 2018

Hi

as you may have gathered by now, i am looking for function which i can

write as a javascript add in to adobe that's able to count the number of

signed signature.

if all signatures are signed copy to another location.The problem is i wont

know how many signatures a particular document has?

by way of example: the interview score form for example is based on the

panel of interviewers and all need to sign once they have evaluated the

candidate,

a policy needs only one signature the one from the CEO, whilst a procedure

only needs one from the departmental head or whilst a dismissal form has

say six depending on the disciplinary panel that available, or say a

incident report has the details of the incident, witnesses if available and

the HOD, so this signatures on the forms vary.

As you can see, i don't know how many signatures a particular document will

have and thus need to solve this pro grammatically and copy file to

designated location once final signature is signed.

i have already written the windows service to sort the files in the folder

to which they will be copied. i am using a C# windows service which just

sorts the files based on thier corporate ID number to the departments it

belongs.

any help would be helpful or advice. i have gone through your example and

it seems i need to know the number of signatures for your solution to work

in my situation.

Thank for all the help you have provided so far, really appreciate it..

cheers

try67
Community Expert
Community Expert
December 13, 2018

Let's take a step back: How will the users sign the document, exactly?