PDF saveAs button

Hi, I try to automate a saveAs button in acrobat so that when people finish to fill the form they can submit, and then it save the document in a specific location with the file name according to answers in the form.

I did quite a lot of applescipt in the past but never Javascript which Acrobat need.

I also read that there is a trust function that need to be part of this to give the permissions…

Any help would be very appreciated.

You may find the AcroJS implementation of a PDF SaveAs button in this response from the Acrobat SDK forum. It is 8 (2017) years old so caveat emptor. See the link to the 1 Correct Answer for the code.