These properties define headers and footers to be placed on all pages of the PDF document. Headers and footers contain three parts: left, center and right.
Each part specifies the text, color and font that should be inserted into the document.
Text placed in the left part is left aligned and placed at the left of the page; the position for header’s left part is defined by OffsetTop and OffsetLeft properties. Text of center part is center aligned on the page. Text of the right part is right aligned.
Any of the text fields may contain macros, which will be replaced with their values during printing of the PDF.
Name |
Values |
Description |
---|---|---|
Enabled |
Boolean |
Default = False |
FirstPageNumber |
Integer |
Specifies the first page number for the headers and footers. The value of this property is used in the %[Page] macro. Default = 1 |
OffsetLeft |
Integer |
Values of these properties define the positions on the page where the headers and footers should be placed. All values are in tenths of a millimetre.Default = 127 |
OffsetTop |
||
OffsetRight |
||
OffsetBottom |
Header and footer are defined with two subsections, Header and Footer, which are identical and contain three identical subsections Left, Center, and Right. Each part has properties:
Name |
Values |
Description |
---|---|---|
Font |
String |
The Font used for text which will be added into the document. Default = Arial. |
FontSize |
10 - 32768 |
Specifies font size for the text. Font size is specified in tenth of point (1 point is 1/72 inch). Default = 100 |
FontBold |
Boolean |
Specifies if the font should be bold. Default = False |
FontItalic |
Boolean |
Specifies if italic variant of the font should be used. Default = False |
Color |
colorREF |
Defines the color of the text. Default = 0 (black color) |
Value |
String |
Defines the text which should be placed into the part. Text can contains macros. Default = empty string. |
Comments
Since the added headers and footers occupy the same page space as the original document, there is the danger that they will intersect with the original document text. The only sure way to avoid this is to scale the original page down to make room for the added headers/footers, using the Paper.PageScale feature. See example below and the more detailed Example.
Examples
Here we scale the original page down, then use negative offsets to position the headers above the scaled-down page but still on the resulting sheet.
//;Scale page down to allow room for the headers/footers outside print area
//PDFX,Paper.Fit,False
//PDFX,Paper.PageScale,900
//;
//PDFX,HeadersFooters.Enabled,True
//;shift header position up above text (requires PageScale to make room)
//PDFX,HeadersFooters.OffsetTop,-70
//PDFX,HeadersFooters.OffsetLeft,-40
//;move footer down below the text
//PDFX,HeadersFooters.OffsetBottom,-100
//;now define the header fields
//PDFX,HeadersFooters.Header.Left.Value,Docname: %[DocName]
//PDFX,HeadersFooters.Header.Right.Value,Page %[Page] of %[Pages]
Compatibility
PDFXv5+ only—i.e., not PDFXv3.