Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.HeaderFooterContentGenerator Class Reference
Inheritance diagram for com.foxit.sdk.pdf.HeaderFooterContentGenerator:

## Public Member Functions
| HeaderFooterContentGenerator ()
| Constructor.
| HeaderFooterContentGenerator (HeaderFooterContentGenerator other)
| Constructor, with another header-footer content generator object. More...
void | addDate (int format_type) throws com.foxit.sdk.PDFException
| Add a format string for a specified date format type. More...
void | addPageNumber (int format_type) throws com.foxit.sdk.PDFException
| Add a format string for a specified page number format type. More...
void | addString (String new_string) throws com.foxit.sdk.PDFException
| Add a string. More...
void | clear () throws com.foxit.sdk.PDFException
| Clear strings (including format strings) which have been added to current content generator. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
String | generateContent () throws com.foxit.sdk.PDFException
| Generate a final string which can be used as header-footer content. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void | delete ()
| Clean up related C++ resources immediately. More...

## Static Public Attributes
static final int | e_DateFormatDDDotMMDotYY = 17
| If this is used, "dd.mm.yy" would be used as the date format string.
static final int | e_DateFormatDDDotMMDotYYYY = 18
| If this is used, "dd.mm.yyyy" would be used as the date format string.
static final int | e_DateFormatDDotMDotYYYY = 16
| If this is used, "d.m.yyyy" would be used as the date format string.
static final int | e_DateFormatDDSlashMMSlashYY = 7
| If this is used, "dd/mm/yy" would be used as the date format string.
static final int | e_DateFormatDDSlashMMSlashYYYY = 8
| If this is used, "dd/mm/yyyy" would be used as the date format string.
static final int | e_DateFormatDSlashMSlashYY = 5
| If this is used, "d/m/yy" would be used as the date format string.
static final int | e_DateFormatDSlashMSlashYYYY = 6
| If this is used, "d/m/yyyy" would be used as the date format string.
static final int | e_DateFormatMDotDDotYY = 11
| If this is used, "m.d.yy" would be used as the date format string.
static final int | e_DateFormatMDotDDotYYYY = 12
| If this is used, "m.d.yyyy" would be used as the date format string.
static final int | e_DateFormatMMDotDDDotYY = 13
| If this is used, "mm.dd.yy" would be used as the date format string.
static final int | e_DateFormatMMDotDDDotYYYY = 14
| If this is used, "mm.dd.yyyy" would be used as the date format string.
static final int | e_DateFormatMMDotYY = 15
| If this is used, "mm.yy" would be used as the date format string.
static final int | e_DateFormatMMSlashDDSlashYY = 3
| If this is used, "mm/dd/yy" would be used as the date format string.
static final int | e_DateFormatMMSlashDDSlashYYYY = 4
| If this is used, "mm/dd/yyyy" would be used as the date format string.
static final int | e_DateFormatMMSlashYY = 9
| If this is used, "mm/yy" would be used as the date format string.
static final int | e_DateFormatMMSlashYYYY = 10
| If this is used, "mm/yyyy" would be used as the date format string.
static final int | e_DateFormatMSlashD = 0
| If this is used, "m/d" would be used as the date format string.
static final int | e_DateFormatMSlashDSlashYY = 1
| If this is used, "m/d/yy" would be used as the date format string.
static final int | e_DateFormatMSlashDSlashYYYY = 2
| If this is used, "m/d/yyyy" would be used as the date format string.
static final int | e_DateFormatYYHyphenMMHyphenDD = 19
| If this is used, "yy-mm-dd" would be used as the date format string.
static final int | e_DateFormatYYYYHyphenMMHyphenDD = 20
| If this is used, "yyyy-mm-dd" would be used as the date format string.
static final int | e_PageNumberFormatDefault = 0
| If this is used, "1" would be used as the page number format string.
static final int | e_PageNumberFormatNumberOfCount = 1
| If this is used, "1 of n" would be used as the page number format string.
static final int | e_PageNumberFormatNumberSlashCount = 2
| If this is used, "1/n" would be used as the page number format string.
static final int | e_PageNumberFormatPageNumber = 3
| If this is used, "Page 1" would be used as the page number format string.
static final int | e_PageNumberFormatPageNumberOfCount = 4
| 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.

## Constructor & Destructor Documentation

## ◆ HeaderFooterContentGenerator()

com.foxit.sdk.pdf.HeaderFooterContentGenerator.HeaderFooterContentGenerator | ( | HeaderFooterContentGenerator | other | ) |

Constructor, with another header-footer content generator object.

Parameters

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

## Member Function Documentation

## ◆ addDate()

void com.foxit.sdk.pdf.HeaderFooterContentGenerator.addDate | ( | int | format_type | ) | throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.HeaderFooterContentGenerator.e_DateFormatMSlashD and this should be one of these values.

Returns
  None.

## ◆ addPageNumber()

void com.foxit.sdk.pdf.HeaderFooterContentGenerator.addPageNumber | ( | int | format_type | ) | throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.HeaderFooterContentGenerator.e_PageNumberFormatDefault and this should be one of these values.

Returns
  None.

## ◆ addString()

void com.foxit.sdk.pdf.HeaderFooterContentGenerator.addString | ( | String | new_string | ) | throws com.foxit.sdk.PDFException

Add a string.

Parameters

  [in] | new_string | A string.

Returns
  None.

## ◆ clear()

void com.foxit.sdk.pdf.HeaderFooterContentGenerator.clear | ( |  | ) | throws com.foxit.sdk.PDFException

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.

## ◆ delete()

synchronized void com.foxit.sdk.pdf.HeaderFooterContentGenerator.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ generateContent()

String com.foxit.sdk.pdf.HeaderFooterContentGenerator.generateContent | ( |  | ) | throws com.foxit.sdk.PDFException

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

boolean com.foxit.sdk.pdf.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.