Thursday, September 10, 2009

PDF Printing Follow-Up

So, I haven't had a chance to test this with CF9 yet to see if the problem still exists, or even if anyone but me thinks it is a problem, but I have at least worked through a process to not try and flatten a PDF that doesn't have any form fields.


Pretty straight forward after all, but I am still going to look into the PDF functions with CF9 to see if they handle any of this stuff better. the errors thrown by are obtuse, and not really helpful. I would think that it would be able to continue processing if there were no fields to flatten, or it would be able to handle a PDF with no form fields a little differently (the error message is actually missing a space).

Anyways if anyone has been experiencing issues with PDFs with form fields and printing with CF8, I hope that this post and my last one will be helpful for you.

Wednesday, September 9, 2009

Weird PDF Printing issue - CF8

So, I have been trying to print off some PDF reports that are made with ActivePDF and Visual C++ 6, however, EVERY time that I print the PDF, parts of it are light blue/light grey, instead of black (as they appear when opening the PDF, in say Reader). Anyways, I have been banging my head on the wall for some time, and hitting up, well everyone I know and lots of folks that I don't to see if ANYONE had the answer... and I got very little.

A couple of weeks ago, Steve Withington offered his help with my issue. I sent him a sample PDF and the code etc. and the only thing that he noticed was form fields, and that the PDF had some that were 'read-only'. I thought, 'OK, I will set them to not be read only, and blamo, it'll print properly!'... uh, nope.

The long and the short of this story? ColdFusion does not play nice when printing with form fields in a PDF file. So, what do you have to do? well, use the command and that will remove the form fields from the PDF. Now, I don't know if this is a bug or not, cause nobody but me has ever experienced it :(... Maybe I should fire up my CF9 beta and see what happens?

The only thing that I have yet to figure out is how to determine if the PDF has form fields or not...