|
Usage (in C#)
The following code fragment allows you to convert a RTF file (read from a stream
source in this example) to PDF.
using TallComponents.PDF.Layout;
using TallComponents.PDF.Layout.Paragraphs;
:
{
Document doc;
using ( Stream stream = new FileStream( "test.rtf", FileMode.Open ) )
doc = new Document();
Section sec = doc.Sections.Add();
sec.Paragraphs.Add (new RtfParagraph (stream));
}
using( Stream stream = new FileStream( "test.pdf", FileMode.Create ) )
{
doc.Write( stream );
}
}
:
|