UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Fillable Pdf Forms, Any Version    
 
   
theDBguy
post Apr 10 2012, 11:52 AM
Post#1


Access Wiki and Forums Moderator
Posts: 71,013
Joined: 19-June 07
From: SunnySandyEggo


There have been many questions in the forums about how to auto-fill a PDF form with data from an Access database, and the most common response is to use the Acrobat DLL to manipulate the PDF file.

Recently, UtterAccess user "lex" introduced me to XML Forms Data Format (XFDF) that Acrobat created to allow XML data to be merged with fillable PDF forms. Using this file does not require any DLL but the implementation relies on the capabilities of your PDF authoring software or reader.

The attached demo is just a simple example of how to create an XFDF file with a well-formed XML data from an Access Form. The functionality can be extended to retrieve the data from a query or table. This demo could also be extended to allow the user to select the PDF file and "map" its fields to the table or query fields (but I think that would require using the Acrobat DLL, perhaps we'll save that for future versions of this demo).

This demo was created and tested using Access 2007. A MDB version is also included in the zip file but it was not tested in an Access 2003 environment.

Appreciate any comments or suggestions...

Note: Please remember that the functionality of the fillable PDF form will depend on your PDF authoring software. For example, if you only have Adobe Reader installed on your machine, it will not allow you to save the filled-up form as a PDF file (you can only print it).

Update: Somebody asked me how they can find out the names of the fields in the PDF form, so I thought I would post the answer here just in case others might find it useful.
Basically, if you have a copy of the full version of Acrobat, you can use the Select Object Tool to see the name of each field. Depending on the version of Acrobat you're using, the menu path could be something like: Tools > Edit or, Tools > Advance Editing > Select Object Tool. Or, if you're using Adobe LiveCycle Designer, the menu path would be something like: Windows > Hierarchy.
However, if you don't have a copy of the full version of Acrobat and your PDF reader does not have the capability to display the field names on the form, you can upload a copy of your form to this website: AspPDF Form Field Finder, and you will get a list of all the field names in your PDF file.

Enjoy! Hope you find this additional info useful...

More Update: User marineco brought a potential issue to my attention. It seems that XML parsing of the XFDF file could fail if your data fields contain either the ampersand "&" or the less than "<" symbols. The attached modified version (1.1) uses one approach to handle this issue. If you find other characters or symbols that cause XML errors, please let me know. Thank you.
Attached File(s)
Attached File  theDBguyPDFDemoV1.zip ( 98.57K )Number of downloads: 641
Attached File  theDBguyPDFDemoV1.1.zip ( 102.44K )Number of downloads: 1066
 
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    19th November 2017 - 01:55 AM