These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

saving a pdf file

shahal
Registered: May 3 2007
Posts: 43

How can I get acrobat and reader to save a file using the name in a text field, automatically?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You've got two problems here.

1. The Acrobat JavaScript function for saving a file is a Privileged function. It cannot be used from a script in a PDF. For this you need a Folder Level Script, i.e. a JavaScript file that lives on the user's system. Look at this article

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/folder_level_scripts/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/folder_level_scripts/[/url]

You will also need to create a "trusted" function for execting the saveAs. Look up
"app.trustedFunction()" in the Acrobat JavaScript Reference.

2. To save a file from Reader the document needs to have Save Rights. This can be applied from an option on the "Advanced" Menu item in Acrobat Pro 8.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script