Skip to content

Examples of custom headers and footers

The following are examples of various headers and footer texts and tokens.

If you want to include spaces in order to convert the header more readable, you must specifically define the required spaces like so:

Header: "{Page} " of " {Numpages}"

The result of this header is “1 of 45”.

Where the Footer is an HTTP header. The footer text will be “Page 1 of 45” on the first page of a 45 page document.

The footer text will be “Page 1 of 45” on the first page of a 45 page document.

Note that the header or footer can be plain text as the “This is a local header” text illustrates.

Header and footer style examples

Footer: "Page {page} of {numpages}"
FooterStyle: { VerticalAlignment: 'Top', HorizontalAlignment: 'Left' }
{
"Watermark": "Global Watermark",
"WatermarkStyle": { "Color": "Black", "Transparency": "33", "Font": "Arial"},
"Header": "Global header",
"Footer": "Global footer",
"Documents": [
{
"Uri": "file:///d:/AnnualReport.msg",
"Title": "Custom title",
"Watermark": "Local Watermark",
"WatermarkStyle": {"Color": "Cyan", "Transparency": "55", "Font": "Algerian"},
"Header": "This is local header",
"HeaderStyle": { "HorizontalAlignment": "Center", "HorizontalMargin": "10", "Font": "Algerian", "FontSize": "10", "ForegroundColor": "Blue", "BackgroundColor": "Transparent",
"Opacity": "0.75",
"HorizontalScaling": "1"
},
"Footer": "This is local footer.",
"FooterStyle": {
"Bold": false,
"Font": "Arial"
}
}
]
}

In this example, there is a global header and footer each being overwritten by a local, document header and footer defined later n the document section.

The document header is centered, with a 10 pixel offset margin and uses the Algerian font with a font size of 10 and a Blue font color.

The document footer style is more subdued, containing only the Arial font.

In this example, the Date is 05/06-2018, the Page is 3 and the Numpages is 23, the header text would look like this:

Confidential! Print “date” is 05.06.2018. Page: 3 of 23

Note the date formatting will depend on your local date settings.