From: "Brian Schröder" Date: 2005-06-10T18:48:46+09:00 Subject: Re: howto write rtf directly? On 10/06/05, Nuralanur@aol.com wrote: > Hello, > > I would like to be able to write a Rich Text Format document, including > the format information, of course, using Ruby. > More precisely, what I need is to do the converse of what an RTF editor > does. > If you type into say Jarte, > > black bold red and normal text > > and you save that as an RTF document and you open it under SciTE, > > that gives something like > > {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 Times > New Roman;}} > {\colortbl ;\red255\green0\blue0;} > \viewkind4\uc1\pard\f0\fs24 black \b bold \cf1 red\cf0\b0 and normal > text\par > }. > > Now I would like to use Ruby to write the garbled text below into a file and > open > it with an RTF editor and see bold and colored text. > So far, I wrote the text below to a file with .rtf ending, but that just > shows > a text with all the garbage in it when opened with the RTF editor. > What is needed to make an RTF editor interpret the information correctly? > > Thank you very much! > > Axel > > Don't know if it helps you, but google gave me the spezification at http://www.biblioscape.com/rtf15_spec.htm when I googled for rich text format. regards, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/