Generating RTF documents?

Hi,

I need to implement some RTF export for a customer. According to some
“templates”, i generate RTF documents, filling data coming from models.
It’s pretty much like a mailmerge, but in *nix/ruby world.
Also, customer would like (in the future) to upload himself the
templates, so he can modify them by his own.

Can anyone advice me on an elegant solution?

Thank you,
Jean-Etienne

Don’t know of any rtf libraries. But the format is simple if you are
doing simple things. Here is an example of a document from

{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0
Hello!\par
This is some {\b bold} text.\par
}

If all you need is some basic formatting such as bold and font sizes
you should be able to make a basic parser in no time.

On 8/4/06, Jean-Etienne D. [email protected] wrote:

Thank you,
Jean-Etienne


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Jean-Etienne D. wrote:

Hi,

I need to implement some RTF export for a customer. According to some
“templates”, i generate RTF documents, filling data coming from models.
It’s pretty much like a mailmerge, but in *nix/ruby world.
Also, customer would like (in the future) to upload himself the
templates, so he can modify them by his own.

Can anyone advice me on an elegant solution?

Thank you,
Jean-Etienne

Check this lib http://ruby-rtf.rubyforge.org/docs/index.html