Click or drag to resize

HtmlToPdfStaticRenderHtmlAsPdf Method (String, Uri, PdfPrintOptions, String)

Static version of the RenderHtmlAsPdf(String, Uri, String) function. Renders any Html strings into a PDF document.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 4.4.2.27556 (4.4.4.0)
Syntax
public static PdfDocument StaticRenderHtmlAsPdf(
	string Html,
	Uri BaseUrl = null,
	PdfPrintOptions PrintOptions = null,
	string Proxy = null
)

Parameters

Html
Type: SystemString
Html to be turned into a PDF.
BaseUrl (Optional)
Type: SystemUri
Setting the BaseURL property gives the Html a relative for content links such as hyper-links, images, CSS and JavaScript files.
PrintOptions (Optional)
Type: IronPdfPdfPrintOptions
Instance of PdfPrintOptions. Optional print options and settings.
Proxy (Optional)
Type: SystemString
Specifies an Http proxy server. Use the pattern: http(s)://user-name:password@host:port/

Return Value

Type: PdfDocument
A PdfDocument
See Also