How to convert plain ASCII text file to RTF?

From: tinyurl.com/uh3t (rem642b_at_Yahoo.Com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 11:38:18 -0800

I have a file in plain text format, and I need to e-mail it to somebody
who accepts only MS-Word and RTF. Obviously there's no way to create a
MS-Word file here on Unix, so I need a way to convert the file to RTF.
Is there any Unix utility that would do that automatically?
Alternately, does anybody know what minimal RTF header etc. I can
manually add with a text editor to fake a minimal RTF file?

I did a Google search but the closest I could find was a java program
to write a "hello world" RTF file, but it wouldn't compile because it
required classes such as com.lowagie.text.Document which are not in the
standard java 1.2.2 distribution here on this FreeBSD 4.10-STABLE ISP.

I found the RTF 1.5 specification, but it's very large, with many
header fields, but no idea what the minimal header would be nor how to
specify plain text fixed-pitch font with everything pre-formatted with
hard newlines so that I could just stick a header in front of the
plain-text file to make it work as RTF.



Relevant Pages

  • Re: How to load rtf in richtextbox with header and footer
    ... RTF codes that specify a header and footer to work inside a RichTextBox? ... That _does_ operate basically on a page level, and if you embed it into your own control that could produce the visual results you're looking for. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: RTF parsing
    ... you definely need to parse the RTF file ... For example the header should always end before the document begins ... footer it will not be automatically handled. ...
    (borland.public.delphi.thirdpartytools.general)
  • RTF parsing
    ... the header and footer. ... Infact one of my client uses our converstion software which converts ... RTF to PDF. ... footer it will not be automatically handled. ...
    (borland.public.delphi.thirdpartytools.general)
  • parsing RTF header and footer
    ... the header and footer. ... Infact one of my client uses our converstion software which converts ... RTF to PDF. ... footer it will not be automatically handled. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: import lengthy word doc into powerpoint
    ... I didn't know about the rtf thing - I always set up my slides first then use ... and be placed in the title placeholder, Header 2 will be the first level ... indent in the text placeholder, Header 3 will be the 2nd level indent, and ...
    (microsoft.public.powerpoint)