Description
Assembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
CopyC#
CopyVB.NET
Base Path of the source file. It helps the converter locate the images which use relative path in HTML files.
Default values is file path or url address if file or url was specified. Base Path should be specified when HTML string/stream is converted.
Namespace:
DuoDimensionAssembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
Syntax
| C# | Visual Basic |
public string BasePath { get; set; }
Public Property BasePath As String
Examples
StringBuilder html_st = new StringBuilder(@"Testing the image path: <img src=image.jpg />"); string file_pdf = @"K:\new.pdf"; try { DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf(); conv.BasePath = MapPath(@"~\"); conv.OpenHTML(html_st); conv.SavePDF(file_pdf); } catch (Exception ex) { MessageBox.Show(ex.Message); }
Dim html_st As New System.Text.StringBuilder("Testing the image path: <img src=image.jpg />") Dim file_pdf As String = "K:\new.pdf" Try Dim conv As New DuoDimension.HtmlToPdf() conv.BasePath = MapPath("~\") conv.OpenHTML(html_st) conv.SavePDF(file_pdf) Catch ex As Exception MessageBox.Show(ex.Message) End Try
See Also
HtmlToPdf Class
DuoDimension Namespace