> Some of you may be exporting data to Word (RTF, actually) as 
> per http://tech.irt.org/articles/js154/index.htm.  I use this 
> method to create a "printable page" with a header and footer 
> on each page.
> 
> I wanted to pass along something I learned today about that.  
> I had a CFML variable which contained a "<br>".  When I 
> passed this variable to the RTF file, it displayed "<br>" 
> instead of actually doing a carriage return.  Simple, I hear 
> you saying, just replace the <br> with CRLF, chr(13) & 
> chr(10).  Nope, didn't work.
> 
> So I made a small RTF file, read it in via CFFILE, and 
> printed each character and its ASCII code.  I saw that a new 
> line is equivalent to the 6 characters CRLF\par, or chr(13) 
> chr(10) chr(92) chr(112) chr(97) chr(114).
> 
> So there you go.  Replace "<br>" with "chr(13) & chr(10) & 
> chr(92) & chr(112) & chr(97) & chr(114)".

In addition to this, there are other control words besides "\par" which are
worth knowing. For example, you could replace HTML tables with their RTF
equivalents. You can get the complete list, as well as other good-to-know
RTF stuff, from:

http://www.primate.wisc.edu/software/RTF/

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to