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

send PDF to web browser and fill out text fields with server data

NaijaGuy
Registered: Jun 7 2007
Posts: 2

When users download a PDF, I want to fill in the text fields with information they previously entered in webpage form fields. So far, the only way I've seen to do this is to access URL parameters and insert them into the PDF document using JavaScript:
http://blogs.adobe.com/formbuilder/2006/10/using_url_requests_in_pdf_forms.php

The same discussion is here:
http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comments

However, what if your PDF has many fields and the amount of information you need to pass to the PDF exceeds the maximum length of the URL? How can you then populate the PDF fields on the client side?

I'm not sure where to begin...have any of your run into this problem? I'm wondering about using AJAX to poll the server for more data and somehow passing that to the PDF--not sure if that running AJAX would have to be in one browser window and the PDF in another and whether that would actually work...........

Any ideas??? :/

sconforms
Expert
Registered: Jul 10 2007
Posts: 92
NaijaGuy,

Although I did post about how to get some data into a PDF via the URL Request, it's not the recommended way to import data into a form since it's not secure at all and there are a lot of limitations (as you have found out).

There are 3 ways by which you can [url=http://forms.stefcameron.com/2006/08/12/importing-data-in-acrobat/]import data (of any length) into PDF forms[/url]: The first is via an XML data file, the second is via an [url=http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/]ODBC data connection (connection to a database)[/url] and the third is by using a [url=http://forms.stefcameron.com/2007/05/21/connecting-to-a-web-service/]data connection to a web service[/url].

There are certain limitations, however, such as [url=http://forms.stefcameron.com/2006/08/12/importing-data-in-acrobat/]Reader not being able to import data by any means by default[/url]. For this, you would need to reader-extend the PDF (using LC Reader Extensions) or import the data on the server prior to serving the PDF to the client (Reader) using LC Forms.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.