Pdf Duo .Net component
Represents a character encoding. It is used for transformation a set of Unicode characters into a sequence of bytes.

Namespace: DuoDimension
Assembly: pdfduo-net (in pdfduo-net.dll) Version: 2.4.0.0 (2.4)

Syntax

         
 C#  Visual Basic  Visual C++ 
public Encoding SourceEncoding { get; set; }
Public Property SourceEncoding As Encoding
	Get
	Set
public:
property Encoding^ SourceEncoding {
	Encoding^ get ();
	void set (Encoding^ value);
}

Examples

CopyC#
string file_html = @"K:\hdoc.html";
string file_pdf = @"K:\new.pdf";

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    conv.SourceEncoding = Encoding.GetEncoding("iso-8859-1");
    conv.OpenHTML(file_html);
    conv.SavePDF(file_pdf);
    System.Diagnostics.Process.Start(file_pdf);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
CopyVB.NET
Dim file_html As String = "K:\hdoc.html"
Dim file_pdf As String = "K:\new.pdf"

Try
    Dim conv As New DuoDimension.HtmlToPdf()
    conv.SourceEncoding = Encoding.GetEncoding("iso-8859-1")
    conv.OpenHTML(file_html)
    conv.SavePDF(file_pdf)
    System.Diagnostics.Process.Start(file_pdf)
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

See Also