|
Sean, The <cfdocument> is created in a different process entirely. After the information for a report is created and the images are uploaded, this website has someone manually check for completeness and accuracy before the pdf is created. That is how I figured out what happened. Images that were uploaded before the CF9 Upgrade appeared normal in the pdf; only images that were uploaded after the upgrade did not show up. Here is the code that I used to manipulate the images with <cfimage> : <!--- --- --- --->The first thing this code does is removes any spaces in the filename. (if necessary) It the calls another method to determine the final location of the resized image. Now we get to the meat: 1) We determine the current image size. 2) We determine if the longer side is larger than the max pixel width we want. 3) If we are on the long side and we need to resize, we call cfimage to create the new file and delete the old. 4) If the image did not need to be resized, we just move it out of the temp directory and into the new directory. In either case we use a UUID in order to have a unique file name. We then store the data into a table including the original filename and who uploaded it. After uploading images with this function, the images appeared normal on the website, but appeared as grey boxes in the pdf. (Not the red "x" of a missing image in the pdf, but a solid grey box.) On 09/08/2010 10:26 AM, W. Sean Harrison wrote: -------------------------------------------------------------Frank, Are you pulling image info and resizing in the same process as you're generating the CFDocument? You may want to try single threading the image manipulation and PDF generation, or doing them separately....I'm hoping you see this resolved - I've got a huge app that procesess images of avigation/easement projects before rendering PDF's for the FAA, and I'm not about to upgrade until I see this particular issue resolved! --Sean ---------- Forwarded message ---------- From: Frank Moorman <[email protected]> Date: Tue, Sep 7, 2010 at 5:14 PM Subject: [ACFUG Discuss] CFIMAGE/CFDOCUMENT problem in CF9 To: [email protected] All, As I sent out late last week, I did an upgrade from CF7 to CF9 over the weekend. Unfortunately even with all the testing we did we came across a problem this afternoon. Essentially, we allow inspectors to upload images that will eventually be used to create a pdf inspection report. The images are from digital cameras and we will resize them down to 1024x768. (roughly, we do keep the aspect ratio.) Here is the problem, with CF7 we called the cf_magicktag to get image size information, then we calculate the new size, and lastly call cf_magicktag a second time to do the resize. Unfortunately, cf_magicktag does not work well with CF9. I thought that was ok because I would use the new CFIMAGE tag. Then this afternoon the brown stuff hit the fan as I found out that any image modified by CFIMAGE would not show up in A CFDOCUMENT. Most of our pdfs that we created today with CFDOCUMENT had gray boxes instead of images. Everything else on the pdf was fine, but no images. I figured out that all the images uploaded before the upgrade displayed correctly in reports, but no image uploaded after the upgrade could be displayed in a pdf. I did a search on the adobe forums and google and I only came up with the following: http://www.websavey.com/2010/02/coldfusion-images-not-loading-in-cfdocument-when-using-cfimage- It sounds like the above person came across the same issue, but there was no resolution. I was able to fix the issue by using <CFIMAGE action="" ...> to make up for <cf_magicktag>'s problem and then use <cf_magicktag> to do the actual resize which fortunately works and the images now show up again in pdfs. However, at best, this is an ugly hack. I was wondering if anyone else using CF9 (or possible CF8) has encountered this and how it was resolved. Also, does anyone know what I can do with my uploaded images? I am going to try to see if I change the format (maybe from JPG to TIFF) if that would fix my issue for everything uploaded today. (for space, after the resizing, the originals are immediately deleted.) But, any suggestions on this would also be appreciated. Thanks, Frank ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- |
- [ACFUG Discuss] CFIMAGE/CFDOCUMENT problem in CF9 Frank Moorman
- RE: [ACFUG Discuss] CFIMAGE/CFDOCUMENT problem in CF9 Charlie Arehart
- Re: Fwd: [ACFUG Discuss] CFIMAGE/CFDOCUMENT problem i... Frank Moorman
