I have been working to create a system where when one signs a document, the file is automatically saved to a specific location and the file name is determined by certain fields entered within the document. At first I believed that this could be done using javascript within the pdf, but am finding that I would instead need to make a plugin for Acrobat and Reader. Below is a link to where I had posted on the Javascript forum about this and their suggestions:
I have currently used their suggestions to create the following Action in Acrobat:
//Create the file name from text fields in the form
//Credit to Gilad D for the first part of this script.
var myFileName = this.getField("PATIENT_ID").valueAsString + "#" + this.getField("PATIENT_DOB_3").valueAsString + "#C#" + this.getField("PROCEDURE_NAME").valueAsString;
//Save the file
this.saveAs("/C/Users/ahill.CNC/Desktop/PDF test save/" + myFileName + ".pdf");
The above action works, but it currently isn't activated when the form is signed, nor would it work with Reader, which is something I would need. If anyone has any sort of guidance on how to do this, it would be greatly appreciated.