List of Topics

SfC Home > Web Design > SQL > ColdFusion >


Simple Method to Populate a PDF File with ColdFusion

by Ron Kurtus (5 January 2003)

You can add simple Adobe Acrobat code to a Macromedia ColdFusion page that will populate a PDF file with values sent from submitting a form.

Populating a PDF File from ColdFusion explains various applications and provides the basic steps to acheive this task.

This lesson will answer those questions.


Enter information below, click Submit, and see the resulting PDF file. Backspace to return to this page.

First Name

Last Name


It is assumed that you have created a PDF file in Acrobat and used the Form Tool to create the text fields, which are date, fname and lname in our example.


The CFML code for your input is:

<P><B>First Name</B>
<INPUT TYPE="TEXT" NAME="fname"></P>
<P><B>Last Name</B>
<INPUT TYPE="TEXT" NAME="lname"></P>


The output code is:

<CFOUTPUT><CFSET date="#DateFormat(now())#"></CFOUTPUT>
1 0 obj <<
/FDF <<
<</Root 1 0 R>>


You could also use <CFIF IsDefined("form.submit")> to include the input and output in one page.

Also, some people may get a warning that the file_name.fdf file may not be safe, depending on their security settings. You need to provide an assurance in case this happens.


You can convert and send a ColdFusion form as a PDF file using activePDF Toolkit. You simply make a PDF form, create the ColdFusion form, install the activePDF server, and create a ColdFusion page to populate the PDF.

Spread your knowledge

Resources and references

Ron Kurtus' Credentials


ColdFusion Resources


Top-rated books on ColdFusion

Resources and references

Adobe Acrobat - Area in Adobe site, explaining their Acrobat product

activePDF - Company that sells the activePDF Toolkit needed to convert CF to PDF format

Questions and comments

Do you have any questions, comments, or opinions on this subject? If so, send an email with your feedback. I will try to get back to you as soon as possible.

Share this page

Click on a button to bookmark or share this page through Twitter, Facebook, email, or other services:


Students and researchers

The Web address of this page is:

Please include it as a link on your website or as a reference in your report, document, or thesis.

Copyright © Restrictions

Where are you now?

School for Champions

ColdFusion topics

Converting a ColdFusion Form to a PDF File

ColdFusion topics


Development methods

Specific applications

Also see

Let's make the world a better place

Be the best that you can be.

Use your knowledge and skills to help others succeed.

Don't be wasteful; protect our environment.

You CAN influence the world.

Live Your Life as a Champion:

Take care of your health

Seek knowledge and gain skills

Do excellent work

Be valuable to others

Have utmost character

Be a Champion!

The School for Champions helps you become the type of person who can be called a Champion.