• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Digital Signature Javascripting

New Here ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

Is the any way to run a javascript action from a signed form signature box that will rename the form from a this.getField("Your Field".value and set a new folder location? Bonus: plus send an email notification through Outlook that a form needs to be signed...

TOPICS
Edit and convert PDFs

Views

404

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

- To save a file under a specific name requires running the code from a trusted function. See:

https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

https://acrobatusers.com/tutorials/trust-and-privilege-in-acrobat-scripts

 

- You can trigger a submit command of the file using JavaScript like this:
this.submitForm({cURL: "mailto:me@server.com", cSubmitAs: "PDF"});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

The problem I'm having is not the script, but having it execute after the windows API initiates a Save As; after you sign the form. I need the script to trigger after that event.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

Place the script under the Signed event of the Signature field.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2020 Aug 19, 2020

Copy link to clipboard

Copied

I'm digging that idea, but that will only work after the document is signed; the API triggers before that. I'm currently playing around with a folder level script to work off a button call, since I got the script to work in the debugger, but it can't be called with a button...if that doesn't work i have a few more ideas. Thanks for the hit though !!!!!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2020 Aug 19, 2020

Copy link to clipboard

Copied

LATEST

I thought about it and came up with a solution. You can use a script as the document's Did Save event and have it check the value of the signature field. If it's not blank then you know the file has been signed (and saved), and then you can execute your code. The script itself is something like this (adjust the name of the signature field as needed, of course):

 

if (this.getField("Signature1").valueAsString!="") {app.alert("the file was signed and saved.",3);}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines