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

html web form to PDF

grandxprix
Registered: Nov 14 2007
Posts: 63

I was wondering if I web capture a html web form with a submit button to a pdf, should the pdf function propertly? When I have done it, I have filled out the information and hit submit but I get an error. Is there any tricks I need to do to or change any settings when I edit it? please help!

My Product Information:
Acrobat Pro Extended 9.1.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
So what exactly are you trying to do?? what's the point of the web capture?? Acrobat Web capture attempts to convert a web page into a PDF. It does not convert HTML form fields into PDF form fields.

Please be more explicit in your explaination.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grandxprix
Registered: Nov 14 2007
Posts: 63
I want to be able to use a web form that is on my website, turn it into a pdf so it can be emailed. That way when the user opens the email up they can fill out the form hit submit and the results are sent to my email, as if they were submitting it from my website. Now when I have turned the web form into a pdf, all the fields are there, but I get an error when I hit submit. I am not sure what I am doing wrong or if this is the wrong approach. I thought it would be easier then creating it by hand.


I have enclosed an example of the form

http://venturehomes.net/virtualoffice_files/Venture Real Estate.pdf

Here is a list of required fields for my form for my server

Required Field Names & Values
firstname (text field)
lastname (text field)
emailaddress (text field)
mailsubject (hidden field)

any help would be appreciated
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I guess I'm wrong about HTML form fields not converting into PDF form fields, sorry. Looks like that part works, so if the layout and look of the PDF conversion are good for you, then you have a good starting place for your PDF form.

It's unlikely that all the HTML form functionality is going to translate into PDF Functionaltiy. There's no way to convert Browser JS into Acrobat JS and there aren't one for one actions between the technologies for many of the built-in features. Which is the case with your form. You'll need to fix up the required features in Acrobat.

However, you're coversion looks great. The "Cancel" button is meaningless in the PDF context, but the submit button is perfect. It submits as an HTML GET to your ASP script.

There are two issues. First, you'll need to set your required fields to "Required". The other issue is not in the PDF at all. Its in your ASP script. There are no errors when Acrobat does the submit. The error is that the ASP script tries to return HTML to Acrobat. This is a no-no. Acrobat expects to get a PDF compatible data format back.

You can find out more by searching for post on this and other PDF forums that have to do with data submission and Server Side scripting. Also Go to the Adobat Acrobat developer web site and look up the FDF Toolkit. www.adobe.com/devnet/acrobat


Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
After looking at your form a bit more I get the impression that you want the conversion between HTML and PDF to happen on the fly? This is not a good workflow. In the first place it will only work for users that have Acrobat Pro on the desktop. In the second place the form will be missing functionality, as you've already seen. If this is for you, and not the user, to be able to convert forms on the fly, then it's also not a good idea. You need a better, more automated way to approach this.

I think I see where you want to go with this and I can tell you that there are lots of ways to control HTML/PDF/Internet interactions. Mostly involving custom server scripts 3rd party tools. But I'm sure what you want to do is possible, just not as simple, and inexpensive, as you'd like.

I think that what it comes down to is that you need to take a step back, figure out what the interactions are that you want to take place, and then talk to a consultant about how to implement the best strategy.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

d2burke
Registered: Aug 4 2009
Posts: 1
I have a related question: Is there a simple way to submit data entered into an html form to form fields in a pdf document? I prefer the web form interface and would also like the data entered to be sent to a database as well. It would be nice to have the function send to the DB and fill out the PDF form to be printed on submit. Any thoughts concerning this? Thank you for your help,

Daniel
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Why yes. This is actually something people have been doing for a very long time. In fact it's so popular that there are a couple of companies that make server side software for merging data into PDF forms, which can then be emailed off to users or even returned directly to the browser. Take a look at APMerge from www.appligent.com and the tool set at www.activepdf.com.

But you don't have to merge the data server side. Depending on your workflow, Acrobat can be used to merge the data on the client side. Here's the trick. When the user submits data from the webform your sever script returns HTML containing an object tag setup to open a PDF file. Only, instead of the SRC attribute for the object tag pointing to a PDF, it points to an FDF file that contians the submitted data and a referenced to the PDF form (both must be in the same domain as your server script). Acrobat loads the FDF file, then immediately opens the PDF form and populates it with the data. This approach works in both Acrobat Pro and Reader and in just about every conceivable version someone could have on thier desktop.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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