Set activation key

Namespace:  SautinSoft
Assembly:  SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 5.8.2.8

Syntax

      
 C#  Visual Basic 
public string Serial { get; set; }
Public Property Serial As String

Remarks

After purchasing you will get the full version of product and your serial number. This parameter doesn't have any effect in the trial version. This parameter is necessary in full version, please don't forget to specify it by your serial number.



Examples

CopyHow to activate the component after purchasing using C#
using System;
using System.IO;

namespace Sample
{
    class Test
    {

        static void Main(string[] args)
        {
            // Activation of "HTML to RTF .Net" after purchasing
            SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();

            // Place your serial number here.
            // You will get an own serial number after purchasing the license.
            // If have any questions, email us to sales@sautinsoft.com or ask at online chat http://www.sautinsoft.com.
            h.Serial = "1234567890";

            FileInfo htmlFile = new FileInfo(@"..\..\..\..\..\Testing HTMLs\utf-8.html");
            string rtfFile = Path.ChangeExtension(htmlFile.FullName, ".rtf");

            // Convert HTML file to RTF file
            int ret = h.ConvertFile(htmlFile.FullName, rtfFile);

            // 0 - converting successfully
            // 1 - can't open input file or URL, check the input path
            // 2 - can't create output file, check the output path
            // 3 - converting failed
            if (ret == 0)
            {
                // Show produced RTF file
                System.Diagnostics.Process.Start(rtfFile);
            }
        }
    }
}
CopyHow to activate the component after purchasing using VB.Net
Imports System
Imports System.IO
Imports System.Text

Module Module1
    Sub Main()
        ' Activation of "HTML to RTF .Net" after purchasing
        Dim h As New SautinSoft.HtmlToRtf()

        ' Place your serial number here.
        ' You will get an own serial number after purchasing the license.
        ' If have any questions, email us to sales@sautinsoft.com or ask at online chat http://www.sautinsoft.com.
        h.Serial = "1234567890"

        Dim htmlFile As New FileInfo("..\..\..\..\Testing HTMLs\utf-8.html")
        Dim rtfFile As String = Path.ChangeExtension(htmlFile.FullName, ".rtf")

        ' Convert HTML file to RTF file
        Dim ret As Integer = h.ConvertFile(htmlFile.FullName, rtfFile)

        ' 0 - converting successfully
        ' 1 - can't open input file or URL, check the input path
        ' 2 - can't create output file, check the output path
        ' 3 - converting failed
        If ret = 0 Then
            ' Show produced RTF file
            System.Diagnostics.Process.Start(rtfFile)
        End If
    End Sub
End Module

See Also