Pdf Duo .Net component
Open the HTML Page from a URL Address 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(
	Uri HtmlUrlAddress
)
Public Sub OpenHTML ( _
	HtmlUrlAddress As Uri _
)
public:
void OpenHTML(
	Uri^ HtmlUrlAddress
)

Parameters

HtmlUrlAddress
Uri
The URL Address of the page.

Examples

CopyC#
Uri url_html = new Uri(@"http://www.website.com/page1.html");
string file_pdf = @"K:\new.pdf";

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    conv.OpenHTML(url_html);
    conv.SavePDF(file_pdf);
    System.Diagnostics.Process.Start(file_pdf);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
CopyVB.NET
Dim url_html As New Uri("http://www.website.com/page1.html")
Dim file_pdf As String = "K:\new.pdf"

Try
    Dim conv As New DuoDimension.HtmlToPdf()
    conv.OpenHTML(url_html)
    conv.SavePDF(file_pdf)
    System.Diagnostics.Process.Start(file_pdf)
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

See Also