Digital Signature using Adobe Javascript

Avatar

Avatar
Level 1
lsinghal
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
lsinghal
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
lsinghal
Level 1

30-04-2020

Hi @Maceo29 or whosoever can reply,

 

I am using Adobe JS to digital sign a PDF which contains XFA forms fields. In PDF there exists one signature field on which we want to sign using pfx file. We have followed 2 approaches to sign this pdf document but none works:

 

  1. We are using below JS code to sign pdf and on executing this code on Adobe JS Console we are getting some error given below. Please help us in getting this issue fixed.

 

Code:

 

var sign = app.trustedFunction(

              function(oDoc){

                             app.beginPriv();

 

                             var ppklite = security.getHandler("Adobe.PPKLite");

 

                             ppklite.login("Lokesh12", "/C/Users/lsinghal/Desktop/MIR/LokeshSinghal.pfx");

                             var f = this.getField('incident[0].Page12[0].SignatureField1[0]');

                             var myInfo = {

                                           password: "Lokesh12",

                                           location: "Country, IN",

                                           reason: "I am approving doc document",

                                           contactInfo: "[link removed]",

                                           appearance: "basic",

                                           mdp: "allowNone"

                             };

                             f.signatureSign({oSig: ppklite, oInfo: myInfo,bUI: false,cLegalAttest: "To reduce file size, fonts are not embedded." });

                             ppklite.logout();

                             app.endPriv();

              }            

);

             

              sign(this);

 

 

Error :

 

NotAllowedError: Security settings prevent access to this property or method.

Field.signatureSign:17:Console undefined:Exec

 

 

  1. We are trying to edit an already signed pdf document with same above code but we are getting below error:

GeneralError: Operation failed.

Field.signatureSign:17:Console undefined:Exec

Field is already signed

 

 

Please help us to sign PDF using any approach by using Adobe Javascript.

 

Thanks,

Lokesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 10
Employee
devconsole
Employee

Likes

8 likes

Total Posts

55 posts

Correct reply

11 solutions
Top badges earned
Affirm 10
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Affirm 10
Employee
devconsole
Employee

Likes

8 likes

Total Posts

55 posts

Correct reply

11 solutions
Top badges earned
Affirm 10
Ignite 1
Give Back
Boost 5
Boost 3
View profile
devconsole
Employee

18-05-2020

Please post your question in https://community.adobe.com/t5/document-cloud-pdf-services/bd-p/document-cloud-pdf-services?page=1&s...

The team there will be able to help with product-specific questions