Interface IPdfRenderer
An Interface for "Html To Pdf" rendering classes.
Namespace: IronPdf.Rendering.Abstractions
Assembly: IronPdf.dll
Syntax
public interface IPdfRenderer
Methods
RenderHtmlAsPdf(String, String, String)
Creates a PDF file from an Html string, and returns it as a PdfDocument.
Declaration
PdfDocument RenderHtmlAsPdf(string Html, string BaseUrlOrPath, string Proxy = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Html | The Html to be rendered as a PDF. |
System.String | BaseUrlOrPath | Optional. Setting the BaseUBaseUrlOrPathRL property gives the relative file path or URL context for hyper-links, images, CSS and JavaScript files. |
System.String | Proxy | Optional. Specifies an Http proxy server. Use the pattern: http(s)://user-name:password@host:port |
Returns
Type | Description |
---|---|
PdfDocument |
RenderHtmlAsPdf(String, Uri, String)
Creates a PDF file from an Html string, and returns it as a PdfDocument.
Declaration
PdfDocument RenderHtmlAsPdf(string Html, Uri BaseUrl = null, string Proxy = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Html | The Html to be rendered as a PDF. |
System.Uri | BaseUrl | Optional. Setting the BaseURL property gives the relative file path or URL context for hyper-links, images, CSS and JavaScript files. |
System.String | Proxy | Optional. Specifies an Http proxy server. Use the pattern: http(s)://user-name:password@host:port |
Returns
Type | Description |
---|---|
PdfDocument |
RenderHtmlAsPdfAsync(String, Uri)
Asynchronously creates a PDF file from a URL or local file path and returns it as a PdfDocument.
Asynchronous variant of RenderHtmlAsPdf(String, Uri, String)
Declaration
Task<PdfDocument> RenderHtmlAsPdfAsync(string Html, Uri BaseUrl = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Html | The Html to be rendered as a PDF. |
System.Uri | BaseUrl | Setting the BaseUrl property gives the relative context for hyper-links, images, CSS and JavaScript files. May point to a local directory or a remote URL. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PdfDocument> |
RenderHtmlFileAsPdf(String)
Creates a PDF file from a local Html file, and returns it as a PdfDocument.
Declaration
PdfDocument RenderHtmlFileAsPdf(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | Path to an Html to be rendered as a PDF. |
Returns
Type | Description |
---|---|
PdfDocument |
RenderHtmlFileAsPdfAsync(String)
Asynchronously creates a PDF file from a local Html file, and returns it as a PdfDocument.
Asynchronous variant of RenderHtmlFileAsPdf(String)
Declaration
Task<PdfDocument> RenderHtmlFileAsPdfAsync(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | Path to an Html to be rendered as a PDF. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PdfDocument> |
RenderUrlAsPdf(String)
Creates a PDF file from a URL or local file path and returns it as a PdfDocument.
Declaration
PdfDocument RenderUrlAsPdf(string UrlOrPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | UrlOrPath | Path to an Html to be rendered as a PDF. |
Returns
Type | Description |
---|---|
PdfDocument |
RenderUrlAsPdf(Uri)
Creates a PDF file from a URL or local file path and returns it as a PdfDocument.
Declaration
PdfDocument RenderUrlAsPdf(Uri Url)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | Url | An absolute (fully formed) Uri. Points to the Html document to be rendered as a PDF. |
Returns
Type | Description |
---|---|
PdfDocument |
RenderUrlAsPdfAsync(String)
Asynchronously creates a PDF file from a URL or local file path and returns it as a PdfDocument.
Asynchronous variant of RenderUrlAsPdf(String)
Declaration
Task<PdfDocument> RenderUrlAsPdfAsync(string UrlOrPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | UrlOrPath | Path or URL to an Html document to be rendered as a PDF. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PdfDocument> |
RenderUrlAsPdfAsync(Uri)
Asynchronously creates a PDF file from a URL or local file path and returns it as a PdfDocument.
Asynchronous variant of RenderUrlAsPdf(Uri)
Declaration
Task<PdfDocument> RenderUrlAsPdfAsync(Uri Url)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | Url | An absolute (fully formed) Uri. Points to the Html document to be rendered as a PDF. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PdfDocument> |
RenderZipFileAsPdf(String, String)
Creates a PDF file from a Zip file, and returns it as a PdfDocument.
Declaration
PdfDocument RenderZipFileAsPdf(string FilePath, string MainFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | |
System.String | MainFile |
Returns
Type | Description |
---|---|
PdfDocument |