Skip to main content
Participant
Feb 1, 2019 11:18 AM UTC
Question

JS SDK visible digital signature

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(signatureField)  Sign(signatureField, ACROSDK.sigHandlerName);

}

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Legend
Feb 1, 2019 2:45 PM UTC

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?

Translate
Participant
Feb 1, 2019 9:35 PM UTC

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?

Translate