HtmlConverter Constructors
Overloads
HtmlConverter(String) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(String, HtmlConversionOptions) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(String, Uri) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(String, Uri, HtmlConversionOptions) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(Uri) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(Uri, HtmlConversionOptions) | Initializes a new instance of the HtmlConverter class. |
HtmlConverter(String)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(string htmlString)
Public Sub New (htmlString As String)
Parameters
- htmlString
- String
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with string as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim html = " <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</htm>
"
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(html)
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string html = @" <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</html>
";
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(html);
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}
HtmlConverter(String, HtmlConversionOptions)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(string htmlString, HtmlConversionOptions conversionOptions)
Public Sub New (htmlString As String, conversionOptions As HtmlConversionOptions)
Parameters
- htmlString
- String
Content of the HTML source.
- conversionOptions
- HtmlConversionOptions
Initializes the ConversionOptions property of the class.
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with string and conversionOptions as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim html = " <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</htm>
"
' create new instance of HtmlConversionOptions.
Dim conversionOptions As HtmlConversionOptions = New HtmlConversionOptions(True)
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(html,conversionOptions)
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string html = @" <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</html>
";
//Create new instance of HtmlConversionOptions
HtmlConversionOptions conversionOptions=new HtmlConversionOptions(true);
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(html,conversionOptions);
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}
HtmlConverter(String, Uri)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(string htmlString, Uri basePath)
Public Sub New (htmlString As String, basePath As Uri)
Parameters
- htmlString
- String
- basePath
- Uri
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with string and BasePath as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim html = " <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</htm>
"
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(html, New Uri("C:\img_girl.jpg"))
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string html = @" <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</html>
";
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(html,new Uri("C:/img_girl.jpg"));
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}
HtmlConverter(String, Uri, HtmlConversionOptions)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(string htmlString, Uri basePath, HtmlConversionOptions conversionOptions)
Public Sub New (htmlString As String, basePath As Uri, conversionOptions As HtmlConversionOptions)
Parameters
- htmlString
- String
Content of the HTML source.
- basePath
- Uri
Base path to fetch HTML resorces like images, scripts etc. Relative links also resolved using this path.
- conversionOptions
- HtmlConversionOptions
Initializes the ConversionOptions property of the class.
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with string, BasePath and conversion options as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim html = " <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</htm>
"
' create new instance of HtmlConversionOptions.
Dim conversionOptions As HtmlConversionOptions = New HtmlConversionOptions(True)
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(html, New Uri("C:\img_girl.jpg"),conversionOptions)
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string html = @" <html>
<body>
<h2>HTML Image</h2>
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="300">
</body>
</html>
";
//Create new instance of HtmlConversionOptions
HtmlConversionOptions conversionOptions=new HtmlConversionOptions(true);
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(html,new Uri("C:\img_girl.jpg"),conversionOptions);
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}
HtmlConverter(Uri)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(Uri uri)
Public Sub New (uri As Uri)
Parameters
- uri
- Uri
path to the html file
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with Uri as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(New Uri("https://www.google.com/"));)
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(new Uri("https://www.google.com/"));
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}
HtmlConverter(Uri, HtmlConversionOptions)
Initializes a new instance of the HtmlConverter class.
public HtmlConverter(Uri uri, HtmlConversionOptions conversionOptions)
Public Sub New (uri As Uri, conversionOptions As HtmlConversionOptions)
Parameters
- uri
- Uri
Uniform Resource Identifier for the HTML page.
- conversionOptions
- HtmlConversionOptions
Initializes the ConversionOptions property of the class.
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use HtmlConverter constructor with Uri and conversion options as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' create new instance of HtmlConversionOptions.
Dim conversionOptions As HtmlConversionOptions = New HtmlConversionOptions(True)
' Create new instance of Converter by providing suitable parameters.
Dim htmlConverter As HtmlConverter = New HtmlConverter(New Uri("https://www.google.com/"),conversionOptions)
' Call Convert method to start conversion
htmlConverter.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
//Create new instance of htmlConversionOptions.
HtmlConversionOptions conversionOptions=new HtmlConversionOptions(true);
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConverter = new HtmlConverter(new Uri("https://www.google.com/"),conversionOptions);
//Call Convert method to start conversion
htmlConverter.Convert(@"C:\MyOutput.pdf");
}
}