1
votes

Although it would be nice to not use PDF, we are using a legacy system that only generates PDF forms.

I am working with some PDF forms that embed JavaScript to submit data back to a server. The form works when viewed and filled out in the browser.

Unfortunately, our users like to download the forms to their computer, fill them out completely, and only then get an error from Acrobat Reader that it cannot submit the form unless it is loaded in a browser.

How can I make the JavaScript form submission work outside of the web browser, prevent the users from downloading the form, or have the form warn them it won't work before they fill it out?

1
It is likely that Javascript execution is turned off by default for Reader. The browser plugin is a different beast with different defaults.dirkgently
It looks like I could use a non-JavaScript "post this data somewhere" action that would do exactly the same thing and potentially work better... but this particular PDF generator we use provides its own custom JavaScript. Oh well.joeforker
This is a really old one, but the cause of that error message is that the users use a very old version of Reader. If I remember correctly, Reader 5 and newer can submit form data without having to run under a Browser. (note that I may be off, and the direct submit possibility has been introduced with Reader 6)Max Wyss

1 Answers

0
votes

My knowledge of PDF is probably at least one version of Acrobat behind the curve, but I think the short answer to your question is "You can't".

From a bigger picture point of view: the use of PDF as a data entry user interface is a path of much pain and suffering.

If your objective is to provide a picture-perfect UI available over the web, look at solutions like Blueprint CSS.

If your objective is to provide a 'rich' user experience, look at JQuery.

If your objective is to save yourself the work of replicating an existing document as a web form, then you have not yet learned how much real work it takes to use PDF as a data-entry mechanism.