# Header and Footer

The RadPrintDocument has built-in header and footer print capabilities. Here is a list of the available properties which allow you to customize the header and footer:

* **HeaderHeight:** the height of the header in pixels.

* **HeaderFont:** the font of the header text.

* **LeftHeader:** the text in the left part of the header.

* **MiddleHeader:** the text in the middle of the header.

* **RightHeader:** the text in the right part of the header.

* **ReverseHeaderOnEvenPages:** swaps the places of the left and right header texts on even pages.

* **FooterHeight:** the height of the footer in pixels.

* **FooterFont:** the font of the footer text.

* **LeftFooter:** the text in the left part of the footer.

* **MiddleFooter:** the text in the middle of the footer.

* **RightFooter:** the text in the right part of the footer.

* **ReverseFooterOnEvenPages:** swaps the places of the left and right footer texts on even pages.

* **Logo:** allows you to add logo to the header or footer. Please note that the header/footer text should contain **"\[Logo]"** in its text in order the logo to appear.

Is an example demonstrating how to customize the header and footer:

 

 

```C#
RadPrintDocument document = new RadPrintDocument();
document.HeaderHeight = 30;
document.HeaderFont = new Font("Arial", 22);
document.Logo = System.Drawing.Image.FromFile(@"C:\MyLogo.png");
document.LeftHeader = "[Logo]";
document.MiddleHeader = "Middle header";
document.RightHeader = "Right header";
document.ReverseHeaderOnEvenPages = true;
document.FooterHeight = 30;
document.FooterFont = new Font("Arial", 22);
document.LeftFooter = "Left footer";
document.MiddleFooter = "Middle footer";
document.RightFooter = "Right footer";
document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.Show();

```

```VB.NET
Dim document As New RadPrintDocument()
document.HeaderHeight = 30
document.HeaderFont = New Drawing.Font("Arial", 22)
document.Logo = System.Drawing.Image.FromFile("C:\MyLogo.png")
document.LeftHeader = "[Logo]"
document.MiddleHeader = "Middle header"
document.RightHeader = "Right header"
document.ReverseHeaderOnEvenPages = True
document.FooterHeight = 30
document.FooterFont = New Drawing.Font("Arial", 22)
document.LeftFooter = "Left footer"
document.MiddleFooter = "Middle footer"
document.RightFooter = "Right footer"
document.ReverseFooterOnEvenPages = True
document.AssociatedObject = Me.RadGridView1
Dim dialog As New RadPrintPreviewDialog(document)
dialog.Show()

```

 

![Telerik UI for WinForms RadPrintDocument header and footer settings](https://www.telerik.com/products/winforms/documentation/assets/45e90597f9122f9af863c87b30766243/tpf-printing-support-radprintdocument-header-and-footer001.png)

The header and footer have some predefined special strings which can be set to any part of it and/or to make combinations of them.

* **\[Page #]** – Prints the number of the current page.

* **\[Total Pages]** – Prints the total number of pages.

* **\[Date Printed]** – Prints the date when the printing was started.

* **\[Time Printed]** – Prints the time when the printing was started.

* **\[User Name]** – Prints the user-name associated with the current thread (the current Windows login).

Here is a sample:

 

 

```C#
RadPrintDocument document = new RadPrintDocument();
document.MiddleHeader = "Page [Page #] of [Total Pages]. Printed on [Date Printed] [Time Printed].";

```

```VB.NET
Dim document As New RadPrintDocument()
document.MiddleHeader = "Page [Page #] of [Total Pages]. Printed on [Date Printed] [Time Printed]."

```

 

![Telerik UI for WinForms RadPrintDocument special strings in a custom header](https://www.telerik.com/products/winforms/documentation/assets/2ceea507517ec7e364a4e709c778fe90/tpf-printing-support-radprintdocument-header-and-footer002.png)

## See Also

* [Design Time](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/printing-support/radprintdocument/design-time)

* [RadPrintDocument](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/printing-support/radprintdocument/overview)

* [Watermark](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/printing-support/radprintdocument/watermark)
