Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

<cfpdfform /> for Lucee

<cfpdfform /> tag for Lucee Server. Read and Populate PDF Form Fields


  • Basic read and populate PDF Form Fields are implemented
  • stream to browser implemented
  • retrieve the form field value into xmlData or exported to FDF file format
  • populate the form field value from xmlData or FDF file


This tag created using PDF Box


  • Download the .lex file from the repository directory /lucee-cfpdfform/target/
  • Then either:
    • Copy the .lex file into the deploy directory for either the server, WEB-INF/lucee-server/deploy/, or the web context, WEB-INF/lucee-context/deploy/
    • ...or...
    • Open the the Lucee Administrator for the server or web context. Navigate to Extension > Applications > Upload new extension (experimental) and upload the selected .lex file. Ignore the note Extension zip file as a .lex file is just a renamed .zip file.
  • It is not necessary to restart Lucee after you have added this extension.

Sample usage


	<cfset pdfForm = ExpandPath('./my-pdf-form.pdf')>

	<cfpdfform action="read" source="#pdfForm#" result="stFormFields">
	<cfdump var="#stFormFields#" label="stFormFields">

	<h4>Read the form field value in XML format</h4>
	<cfpdfform action="read" source="#pdfForm#" xmlData="myXMLData" result="stFormFields">
	<cfdump var="#myXMLData#" label="XMLData">

	<h4>Read the form field value and exported in FDF fileformat</h4>
	<cfpdfform action="read" source="#pdfForm#" fdfData="populated-pdf-form.fdf">
	<cfdump var="#myXMLData#" label="XMLData">

	<cfpdfform action="populate" source="#pdfForm#" destination="#ExpandPath('./populated-pdf-form.pdf')#" >
		<cfpdfformparam name="Name"    value="CF Mitrah">
		<cfpdfformparam name="Account" value="MitrahSoft">

	<h4>Populate and remove form fields</h4>
	<cfpdfform action="populate" source="#pdfForm#" destination="#ExpandPath('./populated-pdf-form.pdf')#" flatten="true">
		<cfpdfformparam name="Name"    value="CF Mitrah">
		<cfpdfformparam name="Account" value="MitrahSoft">

	<h4>Populate & write to browser</h4>
	<cfpdfform action="populate" source="#pdfForm#">
		<cfpdfformparam name="Name"    value="CF Mitrah">
		<cfpdfformparam name="Account" value="MitrahSoft">

	<h4>Populate the form field value from XMLData string or XML file </h4>
	<cfpdfform action="populate" source="#pdfForm#" XMLData="#ExpandPath('./Example.xml')#" destination="#ExpandPath('./populated-pdf-form.pdf')#" overwrite="true">

	<h4>Populate the form field value from FDF file </h4>
	<cfpdfform action="populate" source="#pdfForm#" fdfData="populated-pdf-form.fdf" destination="#ExpandPath('./populated-pdf-form.pdf')#" overwrite="true">

		<cfdump var="#cfcatch#">


Idea & base code adapted from lucee-cfpdfform is authored by CF Mitrah and everyone is welcome to contribute.

Downsides webonix cfpdfform implementation

Webonix done a very good job, but he used iText jars, which is licensed as AGPL software. Buying a license is mandatory as soon as you develop commercial activities distributing the iText software inside your product or deploying it on a network without disclosing the source code of your own applications under the AGPL license. These activities include:

  • offering paid services to customers as an ASP
  • serving PDFs on the fly in the cloud or in a web application
  • shipping iText with a closed source product

Pricing of iText on Dec-2015, Reference

Server - $2,640 USD

  • One license per server, virtual machine or node installation, independent of number of end-users
  • 50% discount for non-production servers (e.g. testing, development, Q&A, UAT, BA or DR)

End-user - $1,590 USD

  • One license per desktop, laptop or other end-user device installation


If you experience any problems with this tag please:

Social Media

You'll find us on Twitter, Facebook and Google+.


cfpdfform tag for Lucee Server. Read and Populate PDF Form Fields - By



No releases published


No packages published
You can’t perform that action at this time.