These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to apply a Signature Image Using Javascript?

Fornachari
Registered: Mar 11 2008
Posts: 8
Answered

Hello!

I am doing a C# application that apply a digital signature in a PDF document. I am using the file sdkAddSignature.js, that is a javascript sample that comes with the Acrobat SDK 8.0.
My C# application invoke this javascript and signs de document. It's working very well, but I need to insert a signature image. I would like to change my javascript code to do this. Is it possible do this using javascript?
I have the signature image in many formats: bmp, jpg, gif... but I don't know how could I programatically insert the signature image in the signature.

Help me, pelase!

Thank you in advance!

My Product Information:
Acrobat Pro 8.1.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
From the JS API documentation for the Signatureinfo properties, it does not appear one can modify the image of the signature field. Since there are references to specific vendor signature products, there could be away for a given signature product to allow the modification prior to being applied in the PDF>

George Kaiser

Fornachari
Registered: Mar 11 2008
Posts: 8
Thank you gkaiseril for your fast reply.
I didn't find anything in the JS API documentation about this too. But I think that maybe is possible, it's very strange not be possible to configure a image in a signature using javascript.

I can't use third party tools. Anybody have other idea, please?!?

Thank you to all!
lucianopilla
Registered: Oct 18 2007
Posts: 76
f.signatureSign( myEngine,
{password: "yourpassword",// provide password
location: "yourlocation",
reason: "yourreason",
appearance: "nameofappearance"});
}
this is the code to apply signature.
your question refers to appearance, for inserting signature image you must insert the name of identity that you have inserted in menu>preferences>signature.
it's important to declare and set up all parameters in acro pro, the code goes back over these features.

Adding intelligence to documents

Fornachari
Registered: Mar 11 2008
Posts: 8
lucianopilla, thank you so much for your help. It isn't exactly what I need, but help me soo much, I will use your solution!

I tested here and works fine!


Thank you very much!