Description
Assembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
CopyC#
CopyVB.NET
Open the Stream object with HTML content before converting to the PDF, reforming HTML's tags into PDF format structure.
Namespace:
DuoDimensionAssembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
Syntax
| C# | Visual Basic |
public void OpenHTML( Stream HtmlStream )
Public Sub OpenHTML ( _ HtmlStream As Stream _ )
Parameters
- HtmlStream
- Stream
Html content in the form of Stream object.
Examples
string html_st = @"<p>The string example</p>"; MemoryStream ms = new MemoryStream(Encoding.Default.GetBytes(html_st)); string file_pdf = @"K:\new.pdf"; try { DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf(); conv.OpenHTML(ms); conv.SavePDF(file_pdf); System.Diagnostics.Process.Start(file_pdf); } catch (Exception ex) { MessageBox.Show(ex.Message); }
Dim html_st As String = "<p>The string example</p>" Dim ms As New IO.MemoryStream(System.Text.Encoding.Default.GetBytes(html_st)) Dim file_pdf As String = "K:\new.pdf" Try Dim conv As New DuoDimension.HtmlToPdf() conv.OpenHTML(ms) conv.SavePDF(file_pdf) System.Diagnostics.Process.Start(file_pdf) Catch ex As Exception MessageBox.Show(ex.Message) End Try
See Also
HtmlToPdf Class
DuoDimension Namespace