Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Save As Script for a Button


Former Community Member
I am looking for the script to place on a button enabling it to save a .pdf form as a "Save As". Furthermore, I would like to have the form saved with a file name based upon the value of a specific field used on the form. Hopefully I am in the right forum to solve this.
2 Replies


Former Community Member

You will need Reader Extensions for this or users with Acrobat.

You can save the form data locally with:

xfa.host.exportData ("",0);

The first parameter is the file name. You will be able to use a field to specifiy the name. See the documentation on exportData.

loadData will load it into an empty form.

Good Luck

Philip Copeland



Former Community Member
Hi Scott,

Please refer to this post for this action:


You'll have to use a "trusted function" and place this in a javascript file in a certain folder on the users computer.