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

Javascripts - download save as location

waeve1
Registered: Apr 15 2008
Posts: 2

I am needed help on a scripts for an interactive PDF which will work for both PC & MAC - Acrobat & Reader

I need a button which will show a "save as location" dialogue box similar to how a website download works.
It is so that the user can download a file from a Interactive PDF CD to there hard-drive.

Any help will be greatly appreciated.
Thanks

My Product Information:
Acrobat 3D 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The JavaScript function for saving a file is "doc.saveAs()". This function displays the file SaveAs dialog, and saves the file. However, this cannot be called from a script inside a PDF, and in Reader the PDF file requires Save Rights before it can be used.

In the past you could call the SaveAs menu item from a PDF script, but that changed in Acrobat 8. If your users are navigating to the PDF using a web browser, then you are better off using web controls to do the saving.

Of course the users can always right click or type Ctrl-s to save the file locally. You just can't do it from a script.

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