Expand my Community achievements bar.

Help With HTTP BUTTON

Avatar

Level 2

Is there a way to have an HTTP BUTTON that when the user clicks, Saves the PDF (“Save” or “Save As”) the PDF, then open the “Contact us” page on a website and the path is inserted in the upload path.  The “Contact us” page is run by formmail.v50

1 Reply

Avatar

Level 4

Yes, maybe.  You've got a complex series of actions there, and whether or not they can be done depends on the details.

First, there is a PostSubmit event, so yes, there is a place to put the code that will implement these operations.

Next, if the form is Enabled for Save in Reader then it can be saved locally, but this operation can only be done silently from a privileged context, which a form script is not.  But you can display a SaveAs dialog to the user and let them save it.

And finally, a script can open a web page with the app.launchURL() function.  But it can't directly access a field on that page.  There are several ways around this. For example, if that page was a server script that accepted query parameters then you could pass the path by tacking it onto the end of the URL.  Another option would be build the URL that the web page creates when the user presses the upload button and pass this into app.launchURL.  There are also other ways. But they get pretty complex and depend largely on the specific workflow, for example you could use the HostContainer object in Acrobat JavaScript.  .  

Thom Parker
The source for PDF Scripting Info
pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html

Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)