I'm trying to send Email where content is a rtf document in database (column BLOB).
So, I get my document in byte type from my DB, but then I don't know how to convert the rtf content into a readable text for an Email.
byte[] text = itm.Doc;
body= "<html><body>";
using (var file = new MemoryStream(text))
using (var reader = new StreamReader(file))
{
reader.BaseStream.Seek(0, SeekOrigin.Begin);
while (!reader.EndOfStream)
{
body+= reader.ReadLine();
}
}
But this of course, give me a rtf text, as the actual content of 'byte[] text'.
Can I convert my byte, containing rtf, to a byte containg pdf?
Thank you.
", lines) + "";` – Vladimir Apr 23 '13 at 14:51