Re: PDF multi-line input
On 6/1/2010 3:42 PM, Chad Gray wrote: > Apprently chr(13)& chr(10) represents a "Windows newline". Carriage return-linefeed is what was used in teletype systems. It isn't a Windows thing specifically, but was the norm for many moons before other OS systems were developed. If you try to send just a CR to a teletype (just saying), it will print every printed line over the top of the last. I have direct experience in doing that. :) -- LinkedIn: http://www.linkedin.com/pub/8/a4/60 Twitter: http://twitter.com/RogerTheGeek MissHunt: http://www.misshunt.com/ (Home of the Clean/Dirty Magnet) NCDevCon: http://ncdevcon.com/ 2010 Raleigh ColdFusion Conference ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334226 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: PDF multi-line input
AH HA! Found it. replace(FORM.Customer_Name, Chr(13) & Chr(10), chr(13), "ALL") Apprently chr(13) & chr(10) represents a "Windows newline". Looks like this works. I will keep testing. Chad -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Tuesday, June 01, 2010 3:32 PM To: cf-talk Subject: RE: PDF multi-line input Either way, it seems to be when I pull the data from the database and use CFPDFFORM and insert it back into the PDF. If I submit the PDF there are extra carriage returns in the data. Using the replace of chr(10) and chr(13) did not help either. It is like the PDF displays single carriage returns, but it submits to the update as double carriage returns. Im stumped! Chad -Original Message- From: Ian Skinner [mailto:h...@ilsweb.com] Sent: Tuesday, June 01, 2010 3:05 PM To: cf-talk Subject: Re: PDF multi-line input On 6/1/2010 11:48 AM, Robert Harrison wrote: > #replace(FORM.Contact_Name, #chr(10)#, #chr(13)#)# > > You need the ## around the characters. Otherwise you're looking to replace > the literal string 'chr(10)'. > No you don't. #replace(FORM.Contact_Name, chr(10), chr(13))# Is perfectly fine and clean code. If you where to enclose the chr() functions in quotes, making them stings, then you would need hash characters, but there is little reason to do that, unless you have other characters in your string. #replace(FORM.Contact_Name, "#chr(10)#", "#chr(13)#")# ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334191 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: PDF multi-line input
Either way, it seems to be when I pull the data from the database and use CFPDFFORM and insert it back into the PDF. If I submit the PDF there are extra carriage returns in the data. Using the replace of chr(10) and chr(13) did not help either. It is like the PDF displays single carriage returns, but it submits to the update as double carriage returns. Im stumped! Chad -Original Message- From: Ian Skinner [mailto:h...@ilsweb.com] Sent: Tuesday, June 01, 2010 3:05 PM To: cf-talk Subject: Re: PDF multi-line input On 6/1/2010 11:48 AM, Robert Harrison wrote: > #replace(FORM.Contact_Name, #chr(10)#, #chr(13)#)# > > You need the ## around the characters. Otherwise you're looking to replace > the literal string 'chr(10)'. > No you don't. #replace(FORM.Contact_Name, chr(10), chr(13))# Is perfectly fine and clean code. If you where to enclose the chr() functions in quotes, making them stings, then you would need hash characters, but there is little reason to do that, unless you have other characters in your string. #replace(FORM.Contact_Name, "#chr(10)#", "#chr(13)#")# ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334188 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: PDF multi-line input
On 6/1/2010 11:48 AM, Robert Harrison wrote: > #replace(FORM.Contact_Name, #chr(10)#, #chr(13)#)# > > You need the ## around the characters. Otherwise you're looking to replace > the literal string 'chr(10)'. > No you don't. #replace(FORM.Contact_Name, chr(10), chr(13))# Is perfectly fine and clean code. If you where to enclose the chr() functions in quotes, making them stings, then you would need hash characters, but there is little reason to do that, unless you have other characters in your string. #replace(FORM.Contact_Name, "#chr(10)#", "#chr(13)#")# ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334184 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: PDF multi-line input
#replace(FORM.Contact_Name, #chr(10)#, #chr(13)#)# You need the ## around the characters. Otherwise you're looking to replace the literal string 'chr(10)'. Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged __ Information from ESET Smart Security, version of virus signature database 5164 (20100601) __ The message was checked by ESET Smart Security. http://www.eset.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334183 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
PDF multi-line input
I have a PDF with a text field that is Multi-Line. You can type into it and use carriage return to write paragraphs of text. So I type in it and use a carriage return. Submit the form to a CFQuery and insert the data into a varchar field. I use CFPDF and CFPDFformparam to take the field from the database and put it back into the PDF form. Everything looks fine. Submit the form again to a CFQuery and update the database. When I go to view the PDF again with the data I have two carriage returns instead of just one. If I keep updating the database I keep getting even more carriage returns. They almost seem to double with each update. How can I prevent this? Do I need to search for LF and replace with CR? Or something similar? I tried this on the update query and it does not help. #replace(FORM.Contact_Name, chr(10), chr(13))# Thanks, Chad ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334182 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm