Click or drag to resize

HtmlToPdf Class

IronPdf.HtmlToPdf allows any web page or Html 'snippet' to be turned into a PDF document.
Inheritance Hierarchy
SystemObject
  IronPdfHtmlToPdf

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 4.4.2.27556 (4.4.4.0)
Syntax
public class HtmlToPdf

The HtmlToPdf type exposes the following members.

Constructors
  NameDescription
Public methodHtmlToPdf
The IronPdf.HtmlToPdf allows developers to create PDF files from any web page or Html Snippet
Public methodHtmlToPdf(PdfPrintOptions)
Initializes a new instance of the HtmlToPdf class
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodCode exampleRenderHtmlAsPdf(String, String, String)
Creates a PDF file from an Html string, and returns it as an IronPdf.PdfDocument
Public methodCode exampleRenderHtmlAsPdf(String, Uri, String)
Creates a PDF file from an Html string, and returns it as an IronPdf.PdfDocument
Public methodRenderHTMLFileAsPdf
Renders an HTML file as PDF binary data.
Public methodRenderUrlAsPdf(String)
Renders the URL as PDF binary data.
Public methodCode exampleRenderUrlAsPdf(Uri)
Renders the URL as PDF binary data.
Public methodStatic memberStaticRenderHtmlAsPdf(String, String, PdfPrintOptions, String)
Static version of the RenderHtmlAsPdf(String, String, String) function. Renders any Html strings into a PDF document.
Public methodStatic memberStaticRenderHtmlAsPdf(String, Uri, PdfPrintOptions, String)
Static version of the RenderHtmlAsPdf(String, Uri, String) function. Renders any Html strings into a PDF document.
Public methodStaticRenderHTMLFileAsPdf
Renders an HTML file as PDF binary data.
Public methodStatic memberStaticRenderUrlAsPdf(String, PdfPrintOptions, HttpLoginCredentials)
Static version of the RenderUrlAsPdf(String) function. Renders all Html and assets at a given Url into a PDF file.
Public methodStatic memberStaticRenderUrlAsPdf(Uri, PdfPrintOptions, HttpLoginCredentials)
Static version of the RenderUrlAsPdf(Uri) function. Renders all Html and assets at a given Url into a PDF file.
Public methodToString (Inherited from Object.)
Top
Fields
  NameDescription
Public fieldLoginCredentials
An instance of the HttpLoginCredentials class. Allows developers to specify login credentials using Windows, Linux or Html Forms based authentication. This allows PDFs to be printed, even if they reside on private Intranets, Extranets or within 'login' areas of websites.
Public fieldPrintOptions
An instance of the PdfPrintOptions class. Sets PDF output options such as Paper-Size, DPI, Headers and Footers.
Top
See Also