Skip to main content
Participant
February 1, 2019
Question

JS SDK visible digital signature

  • February 1, 2019
  • 1 reply
  • 516 views

Is it possible to use SDK JavaScript API  to sign (visible digital sign) a file in the browser on the client side?

in sample for js

function AddSignature(doc)

{

    // if ACROSDK.sigDigitalIDPath is not spcified, ask for user input

    if(ACROSDK.sigDigitalIDPath == "UNKNOWN"){

        var cResponse = app.response({

                cQuestion: "Input your digital ID path:",

                cTitle: "Digital Signature",

                cDefault: "/C/DrTest.pfx",

        });

      

        if ( cResponse == null) {

            app.alert("No input.");

            return;

        }

        else

            SetUserDigitalIDPath(cResponse);

    }

      

    // if ACROSDK.sigUserPwd is not spcified, ask for user input

    if(ACROSDK.sigUserPwd == "UNKNOWN"){

        var cResponse = app.response({

                cQuestion: "Input your password:",

                cTitle: "Digital Signature",

                cDefault:  "testpassword",

        });

      

        if ( cResponse == null) {

            app.alert("No input.");

            return

        }

        else

            SetUserPassword(cResponse);

    }


    // create a new signature field

    var signatureField = AddSignatureField(doc);


    // sign it

    if(signatureFieldSign(signatureField, ACROSDK.sigHandlerName);

}

This topic has been closed for replies.

1 reply

Legend
February 1, 2019

You’ve posted some code. How does it connect to the question? For example, does this seem to do what you want, but you don’t know how to run it? Or it does something different, what?

Participant
February 1, 2019

Yes, I do not know how to run. How in the browser after selecting a file to sign the selected file?

What library need to connect?