Lately I have been living in the world of dynamic PDF generation with ColdFusion. It has been a fun project to say the least. I have learned a lot about how to generate PDFs and how not to. So here is a short list of the fun things I have learned during the project.

1: CFPDF does not generate thumbnails with great accuracy. More often than not there is huge discrepancy between the source and the thumbnail. The issues are usually in the area of color correctness. There are also issues with artifacting, and speed.

2: CFDOCUMENT does not like to make a PDF from a source file. This happens when you use the sourcefile attribute. The issue is that CFDOCUMENT does not correctly determine mime type. If you set the mime type it will work. You will also have to do a bunch of tweaking to the params to get the correct out put.

3: CFPDF will break pdf security that was inserted via LiveCycle. Use CFFILE to write the PDF and dont use CFPDF to do it.

4: CFPDF's getinfo action stinks. The info returned is much less than is actually available. Thanks to PDFUtils I was able to get the info I needed from PDF files. CFPDF's function in this area should seriously be increased.

5: activePDF is a better tool to create PDF files than CFPDF. For a bunch of reasons I actually prefer to use the activePDF toolkit to create PDF documents. The downside is that it is not free.

That is all I have so far. I only hope that the next version of ColdFusion has better PDF support.

Till Next time...