3.
C# code sample:
using System; using SautinSoft;
namespace SautinSoftTest
{
class HtmlToRtfTest
{
static void Main(string[] args)
{
string htmlString = "<b>Hello world</b>";
string rtfString = "";
//create object HtmlToRtf converter
SautinSoft.HtmlToRtf.Converter h = new SautinSoft.HtmlToRtf.Converter();
if (h!=null)
{
//set converter options
h.Serial = "XXXXXXXXX";
h.OutputTextFormat = SautinSoft.HtmlToRtf.eOutputTextFormat.Rtf;
//convert strings
rtfString = h.ConvertString(htmlString);
System.Console.WriteLine(rtfString);
//convert files
h.ConvertFile("D:\\Lufthansa.html", "D:\\Lufthansa.rtf");
}
}
}
}
|