HeaderText Property  
 

Sets or returns the text displayed in the header of each printed page.

Syntax

object.HeaderText [= value ]

Remarks

The HeaderText property specifies the text displayed in the header of each printed page. Setting this property automatically sets the PrintHeaders property to True.

If this property has not been set, the WebView control uses the default header text provided by the WebView2 runtime. Setting the property to an empty string explicitly suppresses the header text. This distinction allows an application to use the default header or replace it with custom text, including an empty string.

The header text should contain only plain text. HTML markup, character entity references, and other formatting instructions are not interpreted. Any such content is treated as literal text rather than being rendered or formatted.

The value of this property affects both printed documents and documents saved in PDF format.

Data Type

String

See Also