Skip to main content
Participant
March 12, 2020
Answered

Use Javascript to force Certification signature

  • March 12, 2020
  • 1 reply
  • 723 views

I am trying to force the first signature on a form to be a Certify signature using:

 

// Obtain the signature field object:
var f = this.getField("Signature1");
f.signatureSetSeedValue(
{
mdp: "default"
} )

 

I run this code On Focus for the field.

 

In the Debugger, I get this error:

NotAllowedError: Security settings prevent access to this property or method.
Field.signatureSetSeedValue:5:AcroForm:Signature1:Annot1:OnFocus:Action1

 

Any ideas on what I need to change to allow this script to run, or another way to achieve the same goal? 

    This topic has been closed for replies.
    Correct answer Thom Parker

    Here is the reference entry for this function:

    https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_AcroJS%2FField_methods.htm%23TOC_signatureSetSeedValuebc-24&rhtocid=_6_1_8_31_2_23

     

    Note that it requires privilege in order to run. 

    Read about trust and privilege in Acrobat/Reader here:

    https://www.pdfscripting.com/public/Trust-and-Privilege-in-Acrobat-Scripts.cfm?sd=40

    1 reply

    Thom Parker
    Community Expert
    Thom ParkerCommunity ExpertCorrect answer
    Community Expert
    March 12, 2020
    Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often