Update January 16, 2010: iText 5.0.0 contains a significant change that affects ColdFusion users. See ColdFusion + iText 5.0.0 (Good things come in *new* packages)
After writing a few entries about iText and ColdFusion, I realized many of the examples will require a newer version of iText jar than the one that ships with MX7 or ColdFusion 8. So I am writing the instructions here for easy reference.
Thanks to the genius of Mark Mandel you can load external jars (like a newer version of iText) within ColdFusion using his JavaLoader.cfc.
1. Download the iText-2.0.7.jar (or newer) available at sourceforge.net
2. Download and install the JavaLoader.cfc available at javaloader.riaforge.org/
UPDATE: Though it is mentioned above and in many of the code comments, I may not have stated this point as strongly as I could have. So I would like to reiterate. MX users that are running the JavaLoader.cfc must read the article Using a Java URLClassLoader in CFMX Can Cause a Memory Leak.
In summary it is recommended that you store a single instance of the javaLoader in the server scope, rather than creating a new object each time. This prevents a memory leak caused by a bug in ColdFusion MX. I do not know if this bug exists in ColdFusion 8.
As a point of reference, here is where I installed the files on my local computer. You will be seeing these paths in most of my examples. But you can install the files to a different location if you wish.
<!--- the "iText" directory contains all of my iText examples --->
<!--- the "com" folder contains all of my components (cfc's) --->