File Under: Web Basics

What’s a Good Way to Programmatically Create RTFs?

RtfDear, wise readers: I’m looking for a Linux command-line tool that can convert ASCII plain text files to Rich Text Format. Sure, it’s a Microsoft-owned standard, but it’s pretty interoperable, and a good lightweight alternative to .doc. Unlike, say, .odt, old-school tech illiterates won’t freak out if you send them one.

I’ve tried text2rtf, which seems to render much of its output in unwanted italics; and the command-line version of Docfrac, which stumbles over accented characters and inserts extra blank lines.

Is this a task that’s harder than it seems? I’m not about to spend $59 on a single-user license for AscToRtf. OS X’s textutil is very nice, but not portable to non-Cocoa systems. There must be a script out there for me.

See Also: