Click or drag to resize
Pdf Library for .NET

PdfHtmlElementWebPageWidth 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.Pdf (in Select.Pdf.dll) Version: 20.2
Syntax
public int WebPageWidth { get; set; }

Property Value

Type: Int32
Remarks
The web page width is specified in pixels and the default value is 1024px. The page width is only an indication of the minimum page width recommended for conversion. If the content does not fit this width, the converter will automatically resize the internal browser to fit the whole html content. To avoid this, the WebPageFixedSize property needs to be set to true. When WebPageFixedSize is true, the web page will be rendered with the specified WebPageWidth and WebPageHeight even though the content might be truncated.

If WebPageWidth is set to 0, the converter will automatically determine the page width, finding the width that will fit the html content.

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

See Also