Pdf Duo .Net component
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: DuoDimension
Assembly: pdfduo-net (in pdfduo-net.dll) Version: 2.4.0.0 (2.4)

Syntax

         
 C#  Visual Basic  Visual C++ 
public string BasePath { get; set; }
Public Property BasePath As String
	Get
	Set
public:
property String^ BasePath {
	String^ get ();
	void set (String^ value);
}

Examples

CopyC#
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);
}
CopyVB.NET
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