Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.HeaderFooterContentGenerator Class Reference
Inheritance diagram for foxit.pdf.HeaderFooterContentGenerator:

## 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

## ◆ DateFormatType

enum foxit.pdf.HeaderFooterContentGenerator.DateFormatType
| strong

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.

## ◆ PageNumberFormat

enum foxit.pdf.HeaderFooterContentGenerator.PageNumberFormat
| strong

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

## ◆ HeaderFooterContentGenerator()

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

Constructor, with another header-footer content generator object.

Parameters

  [in] | other | Another header-footer content generator object.

## Member Function Documentation

## ◆ AddDate()

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_type | Date format type. Please refer to values starting from foxit.pdf.HeaderFooterContentGenerator.DateFormatType.e_DateFormatMSlashD and this should be one of these values.

Returns
  None.

## ◆ AddPageNumber()

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_type | Page 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.

## ◆ AddString()

void foxit.pdf.HeaderFooterContentGenerator.AddString | ( | string | new_string | ) |
| inline

Add a string.

Parameters

  [in] | new_string | A string.

Returns
  None.

## ◆ Clear()

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.

## ◆ GenerateContent()

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.

## ◆ IsEmpty()

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.