Responsive HTML to PDF

C# + VB.Net: Responsive HTML to PDF Responsive HTML to PDF
using IronPdf;

IronPdf.HtmlToPdf Renderer = new IronPdf.HtmlToPdf();

 //Choose screen or print CSS media
Renderer.PrintOptions.CssMediaType = PdfPrintOptions.PdfCssMediaType.Screen;

//Set the width of the responsive virtual browser window in pixels
Renderer.ViewPortWidth = 1280; 

// Render an HTML document or snippet as a string
Renderer.RenderHTMLFileAsPdf("Assets/Responsive.html");
Imports IronPdf
Dim Renderer As IronPdf.HtmlToPdf = New IronPdf.HtmlToPdf
'Choose screen or print CSS media
Renderer.PrintOptions.CssMediaType = PdfPrintOptions.PdfCssMediaType.Screen
'Set the width of the responsive virtual browser window in pixels
Renderer.ViewPortWidth = 1280
' Render an HTML document or snippet as a string
Renderer.RenderHTMLFileAsPdf("Assets/Responsive.html")

IronPDF can render responsive HTML into PDF documents. By using the ViewPortHeight and ViewPortWidth properties of the PdfPrintOptions class you can specify the size of the virtual Chrome window which will render your responsive HTML. This allows developers to programmatically choose a specific responsive layout of a web page designed using responsive CSS3, and supports modern responsive HTML5 frameworks such as Bootstrap.