Foxit PDF SDK
FSDK.HeaderFooterContentGenerator Class Reference

Public Member Functions

 AddDate (format_type)
 Add a format string for a specified date format type. More...
 
 AddPageNumber (format_type)
 Add a format string for a specified page number format type. More...
 
 AddString (new_string)
 Add a string. More...
 
 Clear ()
 Clear strings (including format strings) which have been added to current content generator. More...
 
 constructor ()
 Constructor.
 
 GenerateContent ()
 Generate a final string which can be used as header-footer content. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 

Static Public Attributes

static e_DateFormatDDDotMMDotYY
 If this is used, "dd.mm.yy" would be used as the date format string.
 
static e_DateFormatDDDotMMDotYYYY
 If this is used, "dd.mm.yyyy" would be used as the date format string.
 
static e_DateFormatDDotMDotYYYY
 If this is used, "d.m.yyyy" would be used as the date format string.
 
static e_DateFormatDDSlashMMSlashYY
 If this is used, "dd/mm/yy" would be used as the date format string.
 
static e_DateFormatDDSlashMMSlashYYYY
 If this is used, "dd/mm/yyyy" would be used as the date format string.
 
static e_DateFormatDSlashMSlashYY
 If this is used, "d/m/yy" would be used as the date format string.
 
static e_DateFormatDSlashMSlashYYYY
 If this is used, "d/m/yyyy" would be used as the date format string.
 
static e_DateFormatMDotDDotYY
 If this is used, "m.d.yy" would be used as the date format string.
 
static e_DateFormatMDotDDotYYYY
 If this is used, "m.d.yyyy" would be used as the date format string.
 
static e_DateFormatMMDotDDDotYY
 If this is used, "mm.dd.yy" would be used as the date format string.
 
static e_DateFormatMMDotDDDotYYYY
 If this is used, "mm.dd.yyyy" would be used as the date format string.
 
static e_DateFormatMMDotYY
 If this is used, "mm.yy" would be used as the date format string.
 
static e_DateFormatMMSlashDDSlashYY
 If this is used, "mm/dd/yy" would be used as the date format string.
 
static e_DateFormatMMSlashDDSlashYYYY
 If this is used, "mm/dd/yyyy" would be used as the date format string.
 
static e_DateFormatMMSlashYY
 If this is used, "mm/yy" would be used as the date format string.
 
static e_DateFormatMMSlashYYYY
 If this is used, "mm/yyyy" would be used as the date format string.
 
static e_DateFormatMSlashD
 Enumeration for date format type. More...
 
static e_DateFormatMSlashDSlashYY
 If this is used, "m/d/yy" would be used as the date format string.
 
static e_DateFormatMSlashDSlashYYYY
 If this is used, "m/d/yyyy" would be used as the date format string.
 
static e_DateFormatYYHyphenMMHyphenDD
 If this is used, "yy-mm-dd" would be used as the date format string.
 
static e_DateFormatYYYYHyphenMMHyphenDD
 If this is used, "yyyy-mm-dd" would be used as the date format string.
 
static e_PageNumberFormatDefault
 Enumeration for page number format type. More...
 
static e_PageNumberFormatNumberOfCount
 If this is used, "1 of n" would be used as the page number format string.
 
static e_PageNumberFormatNumberSlashCount
 If this is used, "1/n" would be used as the page number format string.
 
static e_PageNumberFormatPageNumber
 If this is used, "Page 1" would be used as the page number format string.
 
static e_PageNumberFormatPageNumberOfCount
 If this is used, "Page 1 of n" would be used as the page number format string.
 

Detailed Description

This class is the generator for header-footer content. It can help user to combine dates in specified format, page numbers in specified format and any customized text content to one string which can be used as header-footer content.

Member Function Documentation

◆ AddDate()

FSDK.HeaderFooterContentGenerator.AddDate ( format_type  )

Add a format string for a specified date format type.

Header-footer content can contain format string for date. The date format string will be replaced by actual date time in specified format when the header-footer is used in PDF document.

Parameters
[in]format_typeDate format type. Please refer to values starting from FSDK.HeaderFooterContentGenerator.e_DateFormatMSlashD and this should be one of these values.
Returns
None.

◆ AddPageNumber()

FSDK.HeaderFooterContentGenerator.AddPageNumber ( format_type  )

Add a format string for a specified page number format type.

Header-footer content can contain format string for page number. The page number format string will be replaced by page number in specified format when the header-footer is used in PDF document.

Parameters
[in]format_typePage number format type. Please refer to values starting from FSDK.HeaderFooterContentGenerator.e_PageNumberFormatDefault and this should be one of these values.
Returns
None.

◆ AddString()

FSDK.HeaderFooterContentGenerator.AddString ( new_string  )

Add a string.

Parameters
[in]new_stringA string.
Returns
None.

◆ Clear()

FSDK.HeaderFooterContentGenerator.Clear ( )

Clear strings (including format strings) which have been added to current content generator.

After this function is called, current content generator will be the same as a newly constructed object.

Returns
None.

◆ GenerateContent()

FSDK.HeaderFooterContentGenerator.GenerateContent ( )

Generate a final string which can be used as header-footer content.

Returns
The final string which can be used as header-footer content.

◆ IsEmpty()

FSDK.HeaderFooterContentGenerator.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

Member Data Documentation

◆ e_DateFormatMSlashD

FSDK.HeaderFooterContentGenerator.e_DateFormatMSlashD
static

Enumeration for date format type.

Values of this enumeration can be used alone.

If this is used, "m/d" would be used as the date format string.

◆ e_PageNumberFormatDefault

FSDK.HeaderFooterContentGenerator.e_PageNumberFormatDefault
static

Enumeration for page number format type.

Values of this enumeration can be used alone.

If this is used, "1" would be used as the page number format string.