Pdf Duo .Net component
Open the HTML string 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(
	StringBuilder HtmlString
)
Public Sub OpenHTML ( _
	HtmlString As StringBuilder _
)
public:
void OpenHTML(
	StringBuilder^ HtmlString
)

Parameters

HtmlString
StringBuilder
String formed as HTML file with tags.

Examples

CopyC#
StringBuilder html_st = new StringBuilder(@"<b>Testing string</b><br /><em>with italic text.</em>");
string file_pdf = @"K:\new.pdf";

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    conv.OpenHTML(html_st);
    conv.SavePDF(file_pdf);
    System.Diagnostics.Process.Start(file_pdf);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
CopyVB.NET
Dim html_st As New System.Text.StringBuilder("<b>Testing string</b><br /><em>with italic text.</em>")
Dim file_pdf As String = "K:\new.pdf"

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

See Also