DynaPDF Manual - Page 133

Previous Page 132   Index   Next Page 134

Function Reference
Page 133 of 818
The function adds headers / footers to the document. Headers and footers support each three
independent strings for the alignments left, center, and right. The text of every header or footer
supports also placeholders to add bates numbers, date formats, and page numbers.
This function mimics the bates numbering and header / footer tools which are available in
certain PDF viewers like Adobe Acrobat and others. The function creates also Acrobat
compatible XML properties so that headers / footers created with this function can be edited and
deleted with Adobe Acrobat.
However, not every feature that is supported by this function has a counterpart in Acrobat or
other PDF viewers. To achieve maximum compatibility a few restrictions must be taken into
account wich are described on the following pages.
The creation of headers / footers starts with the initialization of the structure TPDFHeaderFooter. Set
the member StructSize to sizeof(TPDFHeaderFooter) and call InitHeaderFooter() afterwards.
InitHeaderFooter() initializes the structure as follows:
InitColor: The color space is set to esDeviceRGB and the color is set to black.
Flags: Flags is set to hffDefault.
InitFont: The font is set to the standard font "Helvetica", the font size is set to 8.0, the code
page is set to cp1252, and the font type is set to "Type1". Note that the font type is set for
information only, it is not used for font selection.
HFArray: The member CS set to esInitSpace. This means ignore the color and color space.
All remaining members are intitialized to zero.
After the structure was initialized it is required to set at least one header or footer string. The
parameter HFArray can contain up to 6 records to define headers / footers.
The member IsHeader specifies whether the text should be considered as header or footer, and the
member Position specifies where the text should be output. The three alignments left, center, right,
combined with IsHeader results into 6 possible combinations.
The parameter Count specifies the number of records which were set. It is allowed to have empty
records in the array.

Previous topic: AddHeaderFooter

Next topic: Font selection

Start Chat