Creating a PDF with ASP
By Ty Button
print this article
email this article to a colleague
Introduction
Adobe's PDF format has become the lingua franca of cross-platform reporting for many agencies and companies. While I was no great fan of the product, I have to admit it probably does a better job of producing a compact document with loads of formatting than Word ever will.
Getting Started
Working for a staffing firm, I have written all of our front-end software to run over the Internet so we can share common databases with our smaller branch offices. The biggest problem we faced, however, was reporting. How do we get live documents (applications, etc.) to generate themselves when an applicant sits down at the kiosk and fills out their on-line employment application? While we're doing a great job of capturing the data, we still need an applicant to sign the application, W-4, etc.
I tried a number of things, but the limits seem to be:
If I could produce it fast, it was an HTML form derivative and looked terrible when printed.
If I could produce it looking right, it was clunky and slow. This is because I settled on RTF as my best initial option and ended up using the File System Object to write RTF files based on a template and parse my info into them. The disk reads and writes took their toll.
Remember, we抮e not talking about tabular data or an Excel spreadsheet. We want the application with our logo to be processed.
Finally, I settled on Adobe. I hate the viewer and wish I didn't have to mess with it. However, the formatting looks good and the files are thin. Most users have it on their system, and all my users do.
So I searched and searched for ways to pass data from HTML forms to PDF files. I tried using Adobe forms, but didn't really like working with the validation, etc., and then would still have to figure out how to incorporate the database calls. This wasn't at all what I wanted. I wanted to pass data directly from my HTML form to a database while generating the field data into the PDF file for display or printing.
Finally, there was a clue on UseNet. A link posted by Jeremy Hunter contained much of what I will address here. http://partners.adobe.com/asn/developer/acrosdk/forms.html
REQUIRED SOFTWARE
ADOBE (the full version) is req