Highlighted

Digital Signature Javascripting

New Here ,
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

38

Likes

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

Digital Signature Javascripting

New Here ,
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

39

Likes

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
Most Valuable Participant ,
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"});

Likes

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
Reply
Loading...
New Here ,
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.

Likes

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
Reply
Loading...
Most Valuable Participant ,
Aug 18, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
New Here ,
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 !!!!!!!

Likes

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
Reply
Loading...
try67 LATEST
Most Valuable Participant ,
Aug 19, 2020

Copy link to clipboard

Copied

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);}

Likes

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
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF