I wanted to populate a pfd file from coldfusion and I found
this online:
http://www.school-for-champions.com/coldfusion/cftopdf.htm
When I submit the form.. I then show a link [view pdf].. only
when I click
on that lick I get a message saying
Adobe acrobat: the file is damaged and could not be repaired.
Has anyone used this method successfully? If so, would like
to hear some
suggestions.
The PDF template I created just have 2 fields. firstname
lastname (which
matches cfm form).
Thanks in advance
1. Create PDF document to populate
Create the document you want to populate. This document could
be done in
Microsoft Word, as an HTML page or using some drawing
application. Then
create a PDF file of that document.
You must have Adobe Acrobat or the equivalent to create a PDF
file.
Typically, the easiest way to create a PDF is to click File
> Print and
select Acrobat Distiller as your printer.
2. Enter fields with Acrobat
Once the document is in the PDF format, open it in Acrobat.
Use the menu bar
tools to define your fields.
a.. Use the Form Tool to define the various text fields,
give each a name,
and designate the font type and size. The field name should
correspond to
the name of the data you will input.
b.. Use the Text Tool to modify areas of text. You may have
to change the
font or font size. It is not the easiest tool to use.
This will be your PDF template.
3. Create a ColdFusion page to populate the PDF
Create a ColdFusion form to gather data from input over the
Internet or from
a database query. This page or an action page will provide
the means to
populate the PDF file.
The code you use will depend on the method or software you
decide to use.
Options will be explained in the next section.