Click or drag to resize
Pdf Library for .NET

HtmlToPdfOptionsWebPageWidth Property

Gets or sets the width of the converted web page as it would appear in the internal browser used to render the html.

Namespace: SelectPdf
Assembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll) Version: 26.4
Syntax
public int WebPageWidth { get; set; }

Property Value

Int32
Remarks
The web page width is specified in pixels and the default value is 1024px. The web page is laid out the way a browser window this wide lays it out.

Content wider than this width: the WebKit engine makes the internal browser wider to fit it (unless WebPageFixedSize is true, when the content that does not fit is cut off); the WebKit Restricted engine scales the whole content down to fit the pdf page; the Blink and Chromium engines scale it down up to one and a half times this width and cut off what is wider - set a larger width for such content.

If WebPageWidth is set to 0, the WebKit and WebKit Restricted engines determine the width from the html content, and the Blink and Chromium engines use 1024px.

This property can also be set directly in the constructor of HtmlToPdf class.

See Also