0
votes

I have a form that has to be saved twice, once as incomplete form and the second as the completed form. Is it possible to overwrite/delete the first incomplete file after completing the form so that I wouldn't have 2 forms after the whole process?

I've thought of using javascript but I'm not sure how to go about it.

1
You have tagged this question under JavaScript. However, you have not mentioned anything in regards to JavaScript in your question. Please refer to How to Ask and edit your question accordingly. - Andrew Fan

1 Answers

0
votes

You can use...

this.saveAs(this.path());

...to save the file and overwrite the existing version. However, the method can only be executed during a batch or console event or some other privileged context. You'll need to reference the Acrobat JavaScript documentation to decide which method of establishing a privileged context will work best for your workflow.

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#t=Acro12_MasterBook%2FJS_API_AcroJSPreface%2FPrivileged_versus_non-privileged_context1.htm%23XREF_76421_Privileged_versus