Converter.Convert
Overloads
Convert(String, String, [Optional] Uri, [Optional] ConversionOptions) | Initializes a new instance of the HtmlConverter class. |
Convert(String, [Optional] Uri, [Optional] ConversionOptions) | Initializes a new instance of the HtmlConverter class. |
Convert(Uri, [Optional] ConversionOptions) | Initializes a new instance of the HtmlConverter class. |
Convert(Uri, String, [Optional] ConversionOptions) | Initializes a new instance of the HtmlConverter class. |
Convert(String, String, [Optional] Uri, [Optional] ConversionOptions)
Initializes a new instance of the HtmlConverter class.
public static void Convert(string inputHtml, string outputPath, [Uri basePath = null], [ConversionOptions conversionOptions = null])
Shared Sub Convert(inputHtml As String, outputPath As String, Optional basePath As Uri = null, Optional conversionOptions As ConversionOptions = null)
Parameters
- inputHtml
- String
Content of the HTML source.
- outputPath
- String
Path where the output file needs to be saved
- basePath
- Uri
Base path to fetch HTML resorces like images, scripts etc. Relative links also resolved using this path.
- conversionOptions
- ConversionOptions
Initializes the ConversionOptions property of the class.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v2.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Remarks
Html resources with an absolute or relative file path will be resolved only when a basePath is specified. These resources will be considered insecure and blocked if no basePath is specified.
Convert(String, [Optional] Uri, [Optional] ConversionOptions)
Initializes a new instance of the HtmlConverter class.
public static Byte[] Convert(string inputHtml, [Uri basePath = null], [ConversionOptions conversionOptions = null])
Shared Function Convert(inputHtml As String, Optional basePath As Uri = null, Optional conversionOptions As ConversionOptions = null) As Byte()
Parameters
- inputHtml
- 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
- ConversionOptions
Initializes the ConversionOptions property of the class.
Returns
output pdf in byte array format
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v2.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Remarks
Html resources with an absolute or relative file path will be resolved only when a basePath is specified. These resources will be considered insecure and blocked if no basePath is specified.
Convert(Uri, [Optional] ConversionOptions)
Initializes a new instance of the HtmlConverter class.
public static Byte[] Convert(Uri uri, [ConversionOptions conversionOptions = null])
Shared Function Convert(uri As Uri, Optional conversionOptions As ConversionOptions = null) As Byte()
Parameters
- uri
- Uri
Uniform Resource Identifier for the HTML page.
- conversionOptions
- ConversionOptions
Initializes the ConversionOptions property of the class. It is an optional parameter.
Returns
output pdf in byte array format
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v2.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Convert(Uri, String, [Optional] ConversionOptions)
Initializes a new instance of the HtmlConverter class.
public static void Convert(Uri uri, string outputPath, [ConversionOptions conversionOptions = null])
Shared Sub Convert(uri As Uri, outputPath As String, Optional conversionOptions As ConversionOptions = null)
Parameters
- uri
- Uri
Uniform Resource Identifier for the HTML page.
- outputPath
- String
Path where the output file needs to be saved
- conversionOptions
- ConversionOptions
Initializes the ConversionOptions property of the class. It is an optional parameter.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v2.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.