DynaPDF Manual - Page 132

Previous Page 131   Index   Next Page 133

Function Reference
Page 132 of 818
AddHeaderFooter
Syntax:
LBOOL pdfAddHeaderFooter(
const PPDF* IPDF,
// Instance pointer
struct TPDFHeaderFooter* Init, // Initial header / footer settings
struct TPDFHdrFtr* HFArray,
// Array of header / footer values
UI32 Count)
// Number of array values
struct TPDFHdrFtr
{
UI32
Color;
// Text color.
TExtColorSpace CS;
// Color space -> default = esInitSpace.
SI32
CSHandle;
// Optional color space handle if CS is set to a non-device space.
TCodepage
Codepage;
// The code page that should be used to load the font.
LBOOL
Embed;
// If true, the font will be embedded.
SI32
Reserved1;
// Placeholder to avoid alignment issues
const char*
FontA;
// Optional font name.
const UI16*
FontW;
// Optional font name.
float
FontSize;
// Font size -> considered only if a font name is set.
SI32
Reserved2;
// Placeholder to avoid alignment issues
const char*
FontType;
// Optional font type ("TrueType", "OpenType", or "Type1").
LBOOL
IsHeader;
// If true, the record is treated as header.
TTextAlign
Position;
// Valid values are taLeft, taCenter, and taRight.
float
ShiftX;
// Positive values move the text to the right, negative to the left.
float
ShiftY;
// Positive values move the text up or down depending on the used
// coordinate system (top down or bottom up).
const char*
TextA;
// Either the Ansi or Unicode string must be set.
const UI16*
TextW;
// Either the Ansi or Unicode string must be set.
UI32
TextLen;
// Text length in characters.
SI32
Reserved3;
// Placeholder to avoid alignment issues
};
typedef enum TPDFHdrFtrFlags
{
hffDefault
= 3,
// Output header / footer text on even and odd pages.
hffEvenPages
= 1,
// Output header / footer text on even pages.
hffOddPages
= 2,
// Output header / footer text on odd pages.
hffFixedPrint = 4,
// Can be set by LoadHeaderFooterSettings(). Not considered yet.
hffLoadUTF8
= 8,
// Load all strings in UTF-8 format.
hffShrink
= 16, // Can be set by LoadHeaderFooterSettings(). Not considered yet.
hffLoadBatesN = 32, // If set, LoadHeaderFooterSetting() loads bates numbers only.
hffLoadHF
= 64, // If set, LoadHeaderFooterSetting() loads header / footer settings only.
hffSearchRun
= 128 // See LoadHeaderFooterSetting() for further information.
}TPDFHdrFtrFlags;
struct TPDFHeaderFooter
{
UI32
StructSize;
// Must be set to sizeof(TPDFHeaderFooter).
SI32
FirstPage;
// In/Out -> The first output page.
TPDFHdrFtrFlags Flags;
// In/Out -> Additional processing flags.
UI32
InitColor;
// In/Out -> Initial text color.
TExtColorSpace
InitCS;
// In/Out -> Initial color space -> default = esDeviceGray.
SI32
InitCSHandle;
// In
-> Required if InitCS is set to a non-device space.
const char*
InitDate;
// Out
-> Initial date format.
TCodepage
InitCodepage;
// In/Out -> The code page that should be used to load the font.
LBOOL
InitEmbed;
// In
-> If true, the font will be embedded.
const char*
InitFontA;
// In/Out -> Optional font name.
const UI16*
InitFontW;
// In/Out -> Optional font name.
float
InitFontSize;
// In/Out -> Optional, considered only if a font name is set.
SI32
Reserved;
// Placeholder to avoid alignment issues
const char*
InitFontType;
// Out
-> "TrueType", "OpenType", or "Type1".
const char*
InitPageFormatA; // Out
-> Initial page format string.
const UI16*
InitPageFormatW; // Out
-> Initial page format string.
SI32
LastPage;
// In/Out -> The last output page.
struct TFltRect Margin;
// In/Out -> Margin to output the header/footer text.
 

Previous topic: AddFileComment, AddFontSearchPath

Next topic: Font selection


Start Chat