Pdf Duo .Net component
Open the HTML file or HTML string with tags before converting to the PDF, reforming HTML's tags into PDF format structure.

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

Syntax

         
 C#  Visual Basic  Visual C++ 
public void OpenHTML(
	string Html
)
Public Sub OpenHTML ( _
	Html As String _
)
public:
void OpenHTML(
	String^ Html
)

Parameters

Html
String
Here is avilable to cases: parameter as the HTML file name and parameter as the HTML string with tags

Examples

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

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    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.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