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

Creating filename from field data and saving

rtroudt
Registered: May 22 2006
Posts: 4

I have a field on my form in which I use javascript to generate a reference number based on the date and time when the document opens. I would like to use this number as the filename with a "SaveAs" button. Ideally, the end user would open the form, the number is generated, the end user fills out the rest of the form and clicks the "SaveAs" button. The save dialog box would open with the reference number already in the filename field, rather than the original filename. The end user could then direct the file to be saved to his preferred location. I have tried working with doc.SaveAs and trusted functions, but have not been able to accomplish this. Is it possible?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is a continual problem with all the Acrobat JavaScript functions that use the Open and Save dialogs. It would be very helpful to preset the file name and path for these dialogs, but it's just not posible from Acrobat JavaScript.

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