Rendering Settings for HTML to PDF
This code example demonstrates the power and flexibility that IronPDF provides developers in converting HTML content into PDF documents.
ChromePdfRenderOptions
ensures that developers have total control over how web pages are converted into PDFs.
With the ChromePdfRenderOptions
class, developers can customize page margins, specify page orientations, add annotations, include bookmarks, change document metadata, adjust zoom scaling, modify CSS rule sets, and much more. Once defined, objects of this class can be supplied as a second (optional) parameter to any of the static PDF document rendering methods (renderHtmlAsPdf
, renderHtmlFileAsPdf
, and renderUrlAsPdf
) to alter how IronPDF interprets website content, as well as how it renders the PDF content during these methods' execution.
Full details on the available customizations are available in the API Reference.