Pdf Duo .Net component
Convert the HTML to the PDF byte array, 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 byte[] SavePDF()
Public Function SavePDF As Byte()
public:
array<unsigned char>^ SavePDF()

Return Value

The resulting PDF as a array of bytes.

Examples

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

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    conv.OpenHTML(file_html);
    byte[] pdf_buf = conv.SavePDF();
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
CopyVB.NET
Dim file_html As String = "K:\hdoc.html"
Dim buf() As Byte

Try
    Dim conv As New DuoDimension.HtmlToPdf()
    conv.OpenHTML(file_html)
    buf = conv.SavePDF()
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

See Also