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

SaveAs()

Morey
Registered: Nov 20 2008
Posts: 2

Hi,

I am using app.execMenuItem("SaveAs"); for Save button on my PDF form.
But I want to give a pre-defined name with a timestamp when the Save button clicked. (i.e. using original file name (e.x. test.pdf) and system date&time. (e.x. test_12.09.2008_12.46.30.pdf)

Thank you in advance for your assistance.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
From script within a document you cannot. It simply cannot be done because of security restrictions.

If you're script was run from a privileged context you could use the "saveAS()" function that's a memeber of the Acrobat JavaScript Document Object to set the file name. But otherwise it's not possible.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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