Foxit PDF SDK
 All Classes Namespaces Functions Enumerations Enumerator Properties Pages
foxit.pdf.HeaderFooterContentGenerator Class Reference
Inheritance diagram for foxit.pdf.HeaderFooterContentGenerator:
foxit.common.Base

Public Types

enum  DateFormatType {
  DateFormatType.e_DateFormatMSlashD = 0, DateFormatType.e_DateFormatMSlashDSlashYY = 1, DateFormatType.e_DateFormatMSlashDSlashYYYY = 2, DateFormatType.e_DateFormatMMSlashDDSlashYY = 3,
  DateFormatType.e_DateFormatMMSlashDDSlashYYYY = 4, DateFormatType.e_DateFormatDSlashMSlashYY = 5, DateFormatType.e_DateFormatDSlashMSlashYYYY = 6, DateFormatType.e_DateFormatDDSlashMMSlashYY = 7,
  DateFormatType.e_DateFormatDDSlashMMSlashYYYY = 8, DateFormatType.e_DateFormatMMSlashYY = 9, DateFormatType.e_DateFormatMMSlashYYYY = 10, DateFormatType.e_DateFormatMDotDDotYY = 11,
  DateFormatType.e_DateFormatMDotDDotYYYY = 12, DateFormatType.e_DateFormatMMDotDDDotYY = 13, DateFormatType.e_DateFormatMMDotDDDotYYYY = 14, DateFormatType.e_DateFormatMMDotYY = 15,
  DateFormatType.e_DateFormatDDotMDotYYYY = 16, DateFormatType.e_DateFormatDDDotMMDotYY = 17, DateFormatType.e_DateFormatDDDotMMDotYYYY = 18, DateFormatType.e_DateFormatYYHyphenMMHyphenDD = 19,
  DateFormatType.e_DateFormatYYYYHyphenMMHyphenDD = 20
}
 Enumeration for date format type. More...
 
enum  PageNumberFormat {
  PageNumberFormat.e_PageNumberFormatDefault = 0, PageNumberFormat.e_PageNumberFormatNumberOfCount = 1, PageNumberFormat.e_PageNumberFormatNumberSlashCount = 2, PageNumberFormat.e_PageNumberFormatPageNumber = 3,
  PageNumberFormat.e_PageNumberFormatPageNumberOfCount = 4
}
 Enumeration for page number format type. More...
 

Public Member Functions

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

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 Enumeration Documentation

Enumeration for date format type.

Values of this enumeration can be used alone.

Enumerator
e_DateFormatMSlashD 

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

e_DateFormatMSlashDSlashYY 

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

e_DateFormatMSlashDSlashYYYY 

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

e_DateFormatMMSlashDDSlashYY 

If this is used, "mm/dd/yy" would be used as the date format string.

e_DateFormatMMSlashDDSlashYYYY 

If this is used, "mm/dd/yyyy" would be used as the date format string.

e_DateFormatDSlashMSlashYY 

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

e_DateFormatDSlashMSlashYYYY 

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

e_DateFormatDDSlashMMSlashYY 

If this is used, "dd/mm/yy" would be used as the date format string.

e_DateFormatDDSlashMMSlashYYYY 

If this is used, "dd/mm/yyyy" would be used as the date format string.

e_DateFormatMMSlashYY 

If this is used, "mm/yy" would be used as the date format string.

e_DateFormatMMSlashYYYY 

If this is used, "mm/yyyy" would be used as the date format string.

e_DateFormatMDotDDotYY 

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

e_DateFormatMDotDDotYYYY 

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

e_DateFormatMMDotDDDotYY 

If this is used, "mm.dd.yy" would be used as the date format string.

e_DateFormatMMDotDDDotYYYY 

If this is used, "mm.dd.yyyy" would be used as the date format string.

e_DateFormatMMDotYY 

If this is used, "mm.yy" would be used as the date format string.

e_DateFormatDDotMDotYYYY 

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

e_DateFormatDDDotMMDotYY 

If this is used, "dd.mm.yy" would be used as the date format string.

e_DateFormatDDDotMMDotYYYY 

If this is used, "dd.mm.yyyy" would be used as the date format string.

e_DateFormatYYHyphenMMHyphenDD 

If this is used, "yy-mm-dd" would be used as the date format string.

e_DateFormatYYYYHyphenMMHyphenDD 

If this is used, "yyyy-mm-dd" would be used as the date format string.

Enumeration for page number format type.

Values of this enumeration can be used alone.

Enumerator
e_PageNumberFormatDefault 

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

e_PageNumberFormatNumberOfCount 

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

e_PageNumberFormatNumberSlashCount 

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

e_PageNumberFormatPageNumber 

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

e_PageNumberFormatPageNumberOfCount 

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

Constructor & Destructor Documentation

foxit.pdf.HeaderFooterContentGenerator.HeaderFooterContentGenerator ( HeaderFooterContentGenerator  other)
inline

Constructor, with another header-footer content generator object.

Parameters
[in]otherAnother header-footer content generator object.

Member Function Documentation

void foxit.pdf.HeaderFooterContentGenerator.AddDate ( HeaderFooterContentGenerator.DateFormatType  format_type)
inline

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 foxit.pdf.HeaderFooterContentGenerator.DateFormatType.e_DateFormatMSlashD and this should be one of these values.
Returns
None.
void foxit.pdf.HeaderFooterContentGenerator.AddPageNumber ( HeaderFooterContentGenerator.PageNumberFormat  format_type)
inline

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 foxit.pdf.HeaderFooterContentGenerator.PageNumberFormat.e_PageNumberFormatDefault and this should be one of these values.
Returns
None.
void foxit.pdf.HeaderFooterContentGenerator.AddString ( string  new_string)
inline

Add a string.

Parameters
[in]new_stringA string.
Returns
None.
void foxit.pdf.HeaderFooterContentGenerator.Clear ( )
inline

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.
string foxit.pdf.HeaderFooterContentGenerator.GenerateContent ( )
inline

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

Returns
The final string which can be used as header-footer content.
bool foxit.pdf.HeaderFooterContentGenerator.IsEmpty ( )
inline

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.