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

How to Save a filled pdf Form using JS

mubashar81
Registered: Oct 8 2007
Posts: 3

Hi dear,
i am facing a serious problem, i want to save a pdf form to some location on hard drive when i press button on the FORM
i.e.

ACTION :
a button clicked on filled form

DESIRED REACTION:
the form saved to c:\\eForms\\ folder on my drive with name extracted from one of field on the form...

PLZ i have spent almost lot of time in order to solve this issue but i am unable to do this.
Kindly Help me with sample example using JAVASCRIPT .

I will be highly Thank you for releasing my tension..........

THANKS IN ADVANCE

REgards,

SBMUBASHAR

lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
See Thom Parker's [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=7079]answer[/url] to this.

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

mubashar81
Registered: Oct 8 2007
Posts: 3
Thanks lkassuba for suggesting Thom Parker's helping answer.
But still i unable to slove my problem
LET me redefine the problem again
"I HAVE A BUTTON SAVE WITH SCRIPT
app.execMenuItem("SaveAs");
THIS OPENS THE SaveAs DIALOG WITH FILE NAME. PROBLEM IS WHEN I PRESS SAVE BUTTON THEN THE NAME NAME OF FILE COMES FROM FIELD CONCATENATED WITH THE PATH FROM OTHER FIELD THEN WHEN I PRESS THE BUTTON THE FILE SAVE TO THE DEISRED PATH WITH REQUIRED FILE NAME.
"
I HAVE TO FIND THE SOLUTION BKZ IT REALLY CHALLANGING TASK FOR MY PROJECT.

PLZ SUGGEST ME HOW DO I SOLVE THIS PROBLEM

I WILL BE HIGHLY THANKFULL.





I HAVE SEEN THE BELOW Parker's ANSWER
http://www.acrobatusers.com/forums/ask_ … view/3004/

A: 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.


REGARDS,

SBMUBASHAR
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Security was tightened in Acrobat 8, which includes executing menu items. Perhaps this blog will shed some more light on your problem:
http://www.acrobatusers.com/blogs/thomp/?cat=2

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Let me make this really, really clear. You cannot modify the file path and file name ussed by the "SaveAs" dialog.

Further, unless the PDF is certified and the certifying signature is on the user's sysem, you cannot save a PDF to a specific location and file name from a script in a PDF. Acrobat grants a validated/certified PDF scripting privilege, which allows it to call the document save function. But this privilege still does not allow the script to change the path and name in the "SaveAs" dialog. It just cannot be done.

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