RTF generator

  • Thread starter Thread starter Tomaz Koritnik
  • Start date Start date
T

Tomaz Koritnik

Hi

Anyone knows if there is any free or comercial RTF generator/writer for C#?
I want to generate RTF files with text, tables and probably other things
too.

regards
Tomaz
 
:) Google is indeed my friend and it has been for many years. But I've been
googling for past two hours now and can't find anything that can
write/generate RTF files. Ok, I found one but it's way too expensive as it
has tons of other tools included that I don't need. I need a tool where I
can call methods to insert text with some formating, insert table,... and it
will generate RTF by saving it to file/stream.

regards
Tomaz
 
RTF is not too difficult to generate manually: here's the MS reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp

I wrote an RTF parser / generator at work a while back - writing a
parser is a lot more work than a generator because there's quite a
large minimum set of commands, destination groups and syntax variations
that you need to support. Generating RTF is pretty simple - as long as
you steer clear of nested tables which are evil in RTF

The best way to get a sample of simple RTF is the output from a rich
text control.

Joe
 
Joe said:
RTF is not too difficult to generate manually: here's the MS reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp

I wrote an RTF parser / generator at work a while back - writing a
parser is a lot more work than a generator because there's quite a
large minimum set of commands, destination groups and syntax variations
that you need to support. Generating RTF is pretty simple - as long as
you steer clear of nested tables which are evil in RTF

The best way to get a sample of simple RTF is the output from a rich
text control.

Have you considered generating XML and writing a transform to RTF?
If you keep the transform as a file it would allow the output to be changed
without rebuilding your app which might be nice.
 
Have you considered generating XML and writing a transform to RTF?
If you keep the transform as a file it would allow the output to be changed
without rebuilding your app which might be nice.

What do you mean by a transform? An XSLT? I'd be suprised if it were
possible: RTF is somewhat messy and inconsistent.
 
Joe said:
What do you mean by a transform? An XSLT? I'd be suprised if it were
possible: RTF is somewhat messy and inconsistent.

I think it depends what you want to acheive. Looking at a Word file saved as
RTF is indeed horrific but I don't think that it has to be that way - I seem
to remember that when I last looked at the RTF spec it wasn't too bad.
 
I would write one but I have no time :). My company wan't the generator
ASAP, no matter if it's commercial or not.

regards
Tomaz
 
Back
Top