RE: [ACFUG Discuss] Creating effect of html tags in a Rich Text Format(RTF)

2014-06-20 Thread Charlie Arehart
What version of CF are you on, Chris? Why not use CFDOCUMENT? Since CF9, it
can generate your word doc (a real one, rather than you trying to send plain
text to the user via CFCONTENT), and I I'm pretty sure it would support
conversion of HTML tags to corresponding word features. (I have to admit I
have not myself ever used the feature, but I've known of it.) Let us know
how it goes, or if you (or anyone else here) has tried it and already knows
if it will help or not.

For more, see these (and if you may be using CF10, just change the 9.0 to
10.0 in the URLs):

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS56EA2935-FBD2-4089-8
402-FDDA2BAF55FB.html

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e08
11cbec22c24-7c21.html

Note that some aspects of the feature involve integrating the (free)
openoffice app on the server, discussed some in the above and also at:

http://help.adobe.com/en_US/ColdFusion/9.0/Installing/WS899EE911-747B-45cf-8
550-DC9123823364.html

 

/charlie

PS In case someone else may have answered this, I am having mail server
problems and so have not seen email since Thursday around 3pm. Hope that
will be resolved soon, but this may get sent before I do see any other
replies.

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Chris
Sent: Thursday, June 19, 2014 12:48 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Creating effect of html tags in a Rich Text
Format(RTF)

 

I have a Rich Text Format(RTF) document which is generated by 

 

--

 

cfquery name=allPages datasource=website_2014
SELECT ID 
FROM websitepages 
WHERE areaID='100'
/cfquery

cfcontent type = application/msword
cfoutput
cfloop query=individualPages startrow=1
endrow=#allPages.recordCount#

cfquery name=getData datasource=website_2014
SELECT pageContent 
FROM sitepages 
WHERE pageID='#allPages.ID#'
Order by linkName
/cfquery
 
 #getData.pageContent#

/cfloop
/cfoutput

--

 

The RTF document contains text like

strongThis is a test message/strongbr/
a href=http://www.somedomain.com; Test domain and lot of other HTML
tags/a

I need to convert this to

This is a test message(with bold formatting in Microsoft-Word) 

(Line break for br/ tag) 

Test domain (which when clicked will lead to http://www.somedomain.com)

I understand I can remove the HTML tags using regular expressions, but how
can I recreate their effect(bold, hyperlink) in the RTF document.

 

Any suggestions would be appreciated.

 

Thanks

 



[ACFUG Discuss] Creating effect of html tags in a Rich Text Format(RTF)

2014-06-19 Thread Chris
I have a Rich Text Format(RTF) document which is generated by 


--

cfquery name=allPages datasource=website_2014
    SELECT ID 
    FROM websitepages 
    WHERE areaID='100'
/cfquery

cfcontent type = application/msword
cfoutput    
cfloop query=individualPages startrow=1 endrow=#allPages.recordCount#
    
    cfquery name=getData datasource=website_2014
        SELECT pageContent 
        FROM sitepages 
        WHERE pageID='#allPages.ID#'
        Order by linkName
    /cfquery
     
     #getData.pageContent#

/cfloop
/cfoutput


--

The RTF document contains text like

strongThis is a test message/strongbr/
a href=http://www.somedomain.com; Test domain and lot of other HTML tags/a

I need to convert this to

This is a test message(with bold formatting in Microsoft-Word) 

(Line break for br/ tag) 

Test domain (which when clicked will lead to http://www.somedomain.com)

I understand I can remove the HTML tags using regular expressions, but how can 
I recreate their effect(bold, hyperlink) in the RTF document.

Any suggestions would be appreciated.


Thanks