Click or drag to resize

PdfPrintOptionsViewPortWidth Property

Defines a virtual screen width used to render HTML to PDF in IronPdf. Measured in pixels.

Viewport size is important in modern responsive HTML5 + CSS3 websites (e.g. Bootstrap framework websites) because the rendering and order of elements on the screen is dependent on viewport size.

The default viewport is 1280px wide by 1024px high to ensure the desktop version of a website is rendered unless otherwise specified. Smaller sizes (particularly width) will render responsive versions of many website

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: (
public int ViewPortWidth { get; set; }

Property Value

Type: Int32
See Also