[futurebasic] sort of off-list question about rtf files

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2004 : Group Archive : Group : All Groups

From: Bruce Moore <bruce@...>
Date: Fri, 18 Jun 2004 10:42:53 -0400
On Jun 18, 2004, at 7:17 AM, futurebasic-digest-help@... 
wrote:

> I need to parse an RTF file, say from TextEdit, & play around with the
> text. I would like to preserve the formatting if possible but that is
> not a major requirement. Is there some way to figure out what the
> format of an RTF file is? Is there some magic delimiter on which I
> could focus to get the text? Any help would be appreciated.
>

I have created a template in rtf and then use FB3 to replace 
"placeholders" with specific information the user input in my 
fb3/program generator program. Beware that when you add a graphic in 
textedit it saves in rtfd which seems to be a folder disguised as a 
file and containing a text file and a graphic file. I have not 
attempted to work with that one and suggest my users use Appleworks 
when adding graphics to the template.

To replace the textholders in an rtf, I just load it all into one of 
those big string variable such as mytext$$ then I search and replace 
with regular string commands. I am having a little problem with 
eliminating lines that are un-needed since different versions of rtf 
use different line return or end of paragraph code.

Sincerely,
-- 
Bruce Moore