Avatar of sulzener
sulzener
Flag for United States of America asked on

Is it possible to manipulating a RTF file??

I'm desiring to convert a PC app over to CF8.  The current application will create a nicely formatted  outlined RTF file based upon drop-down selections.  It starts with a base RTF template and then additional text is added (based on drop-downs) to build the final document.  I am wondering if it is possible to manipulate an RTF document using CF8 and maintain the formatting?  If so, can some point me in the right direction?  IF not, do you have any suggestions how to accomplish.  I'd like to save alot of work by using the existing RTF if possible.  Thanks.
Web Servers

Avatar of undefined
Last Comment
_agx_

8/22/2022 - Mon
duncancumming

you may want to look at the Apache POI project
http://poi.apache.org/
 
sulzener

ASKER
Thanks.  Seems pretty complicated to me.  Hopefully someone will have an easier suggestions.  I would probably have to pay someone to help me do this.  I am not sure if this is appropriate or not.  But if this is my only option, do you know of anyone who I could pay to help me implement this using CF?
_agx_

When you say "PC app", what exactly is used for the current process?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
sulzener

ASKER
I'm guessing the executable is in VB6.  I have access to the tables and RTF templates because they are in an MS access (MDB) which I have access to.  The program was written before my time and it's now desired to have system done in CF.  It seems pretty basic because I can follow the logic by running the app and looking at the tables.  Hope this makes sense.  I've never really manipulated RTFs before.  I can tell PC app is passing/replacing data in the RTF based on selections.
duncancumming

I'm not familiar with the format for RTF documents.  Can you show us some of the VB code that manipulates the RTF?
sulzener

ASKER
I'm trying to figure out what the former programmer did and then basically duplicate in ColdFusion.  He and the source are no longer available.  Here is a simple example of what the system does.  Maybe this will help someone point me towards the best approach.  The ultimate goal is to build a document that can be emailed based upon selected criteria.  This document needs to be editable.  Cannot be a PDF.  


<!--- MainSample.RTF --->
@@TITLEPAGE@@
SECTION I
 
1.01	DESCRIPTION
Prepared for on @APPNAME@, located at @APPADDRESS@, in @APPCITY@, @APPSTATE@.
 
<!--- TitlePage.TXT --->
\pard\plain \qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f0\fs28 Created for: \par }{\b\f0\fs28 @APPNAME@ \par }{\f0\fs28 @APPADDRESS@ \par @APPCITY@, @APPSTATE@ @APPZIPCODE@ \par }

Open in new window

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sulzener

ASKER
After rethinking what I just wrote:  It might be better to store the RTF and TEXT data in tables.  Then create the document via HTML.  The only thing left to do is to be able to email the application and have it editable.  Preferably in a DOC or RTF format.  This is where I am totally stumped.  Any ideas?
ASKER CERTIFIED SOLUTION
_agx_

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sulzener

ASKER
That sounds like a great plan.  I will try a sample and see if it works.  I'll let you know.  Thanks.
sulzener

ASKER
agx, Many, many thanks.  That worked perfectly.  I cant believe how easy that was.  You have absolutely no idea how happy I am.  Thanks a million.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
sulzener

ASKER
I am so appreciative of your help.  Thanks again.
_agx_

I am glad it worked out.  It is always, nice when a task turns out to be far simpler than you think ;-)