1748213 Members
2974 Online
108759 Solutions
New Discussion юеВ

RTF to ASCII Conversion

 
Scott Frye_1
Super Advisor

RTF to ASCII Conversion

Has anyone seen or written a script that can take an RTF file and convert it to ASCII? We are needing this for an HL7 feed from one hospital system to another. We can utilize most any scripting language.

Thanks for any suggestions

Scott
6 REPLIES 6
harry d brown jr
Honored Contributor

Re: RTF to ASCII Conversion

An RTF file is a file format without control characters (except for maybe return and linefeed).

live free or die
harry d brown jr
Live Free or Die
harry d brown jr
Honored Contributor

Re: RTF to ASCII Conversion

how about converting rtf to html??

http://hpux.cs.utah.edu/hppd/hpux/Networking/WWW/rtftohtml-2.7.5/

live free or die
harry d brown jr
Live Free or Die
Mark Greene_1
Honored Contributor

Re: RTF to ASCII Conversion

Given that an RTF file can contain any number and sort of graphics, there's no simple ASCII conversion. Here's the RTF specs:

http://www.biblioscape.com/rtf15_spec.htm

If the source file is presumed to be just text, your best bet may be to zip it.


mark
the future will be a lot like now, only later
Scott Frye_1
Super Advisor

Re: RTF to ASCII Conversion

That's a start, it sure would be easier stripping html tags rather than rtf.

I'll take a look at it
Ralph Grothe
Honored Contributor

Re: RTF to ASCII Conversion

Hi Scott,

being a bit Perl biased I'd first look at search.cpan.org

What about this Module?

http://search.cpan.org/~sargie/RTF-Parser-1.09/lib/RTF/TEXT/Converter.pm
Madness, thy name is system administration
Scott Frye_1
Super Advisor

Re: RTF to ASCII Conversion

Ohhhh, I like that Ralph!