Foxit PDF SDK

Instance Methods | List of all members
FSHeaderFooterContentGenerator Class Reference
Inheritance diagram for FSHeaderFooterContentGenerator:

## Instance Methods
(void) | - addDate:
| Add a format string for a specified date format type. More...
(void) | - addPageNumber:
| Add a format string for a specified page number format type. More...
(void) | - addString:
| Add a string. More...
(void) | - clear
| Clear strings (including format strings) which have been added to current content generator. More...
(NSString *) | - generateContent
| Generate a final string which can be used as header-footer content. More...
(id) | - init
| Constructor.
(id) | - initWithOther:
| Constructor, with another header-footer content generator object. 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.

## Method Documentation

## ◆ addDate:()

- (void) addDate: |  | (FSHeaderFooterContentGeneratorDateFormatType) | 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_type | Date format type. Please refer to values starting from FSHeaderFooterContentGeneratorDateFormatMSlashD and this should be one of these values.

Returns
  None.

## ◆ addPageNumber:()

- (void) addPageNumber: |  | (FSHeaderFooterContentGeneratorPageNumberFormat) | 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_type | Page number format type. Please refer to values starting from FSHeaderFooterContentGeneratorPageNumberFormatDefault and this should be one of these values.

Returns
  None.

## ◆ addString:()

- (void) addString: |  | (NSString *) | new_string |

Add a string.

Parameters

  [in] | new_string | A string.

Returns
  None.

## ◆ clear()

- (void) 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()

- (NSString *) 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.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSHeaderFooterContentGenerator*) | other |

Constructor, with another header-footer content generator object.

Parameters

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

## ◆ isEmpty()

- (BOOL) isEmpty |  |  |

Check whether current object is empty or not.

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

Returns
  YES means current object is empty, while NO means not.