CFDOCUMENT PDF
We're using CFDOCUMENT to generate PDFs on the fly. They look really good, but one strange problem. The PDF is chopping text lines in half on some pages (example posted at: www.austin-williams.com/pdf_sample.pdf - see the page the break between page 2 and 3). Is there anything I can do to fix this problem (we already tried margins to no avail)? Thanks, Robert Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353390 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Future Proofing/Backward compatibility
On Wed, Dec 5, 2012 at 6:50 PM, Chris Velevitch chris.velevi...@gmail.comwrote: How would you design that function to handle the fact that some clients are NOT passing the new field and there's no need to change the clients as it's optional? I typically handle this in a CFC function using defaults for non-required arguments. IE: cffunction name=myFunction cfargument name=varone required=true / cfargument name=clientspecificvar default= / In your specific case, I'd probably abstract out the stored proc call into it's own function with it's own named arguments. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353391 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFPDF Error
A client's web hosting company recently moved the website to a new server (running CF10). One function of the website is to take information submitted by users and use that data to populate PDF forms and then save them to disk. That process is now resulting in the following error message: An error occurred while reading source for the cfpdf tag. Error: Variables written as a file by specifying destination in a tag cannot be used again. The code that is listed as the culprit is the last line of the following: !--- Fill PDF form --- cfpdfform action=populate source=#variables.SourcePDF# name=pdfFile cfpdfformparam name=fieldName value=fieldValue !--- more of the above --- /cfpdfform !--- Flatten PDF --- cfpdf action=write source=pdfFile destination=#variables.DestinationFile# flatten=yes overwrite=yes This block of code is followed by several others that are just like it except that the variables.SourcePDF and variables.DestinationFile variables have different values in each. Thinking that, maybe, the problem was that the pdfFile variable was being used again (although being reset with new content at the start of each such block) in subsequent blocks, I added some code to explicitly reset the value of pdfFile after each write/flatten. I can't replace the variable with a new one (e.g., pdfFile2) since some of those blocks are in loops that iterate different amounts of times based on circumstances. I've never seen this error before, certainly not while the website was on the previous server. Any ideas? Thanks in advance. -- Mosh Teitelbaum mosh.teitelb...@evoch.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353392 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFDOCUMENT PDF
Is there anything I can do to fix this problem Not that I am aware of. We make heavy use of PDFs and the only viable options I have encountered are to: 1) use cfpdfform to fill out PDFs 2) or to roll your own PDF's with iText or use one of the CF libraries that use IText like cfitext or pdfIT 3) or to use the OpenOffice Word/Excel to PDF Conversion CFC. I did a lot of RD and experimentation with all of these and found the best route (for us at least) to be manipulating MS Word docs and converting them to PDFs. My experience was that manipulating/creating PDFs with code a la iText can be very tedious and time consuming for intricate and/or heavily formatted documents. http://pdfit.riaforge.org/ http://cfitext.riaforge.org/ http://oolib.riaforge.org/ HTH G! On Fri, Dec 7, 2012 at 2:17 PM, Robert Harrison rob...@austin-williams.comwrote: We're using CFDOCUMENT to generate PDFs on the fly. They look really good, but one strange problem. The PDF is chopping text lines in half on some pages (example posted at: www.austin-williams.com/pdf_sample.pdf - see the page the break between page 2 and 3). Is there anything I can do to fix this problem (we already tried margins to no avail)? Thanks, Robert Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353393 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm