Foxit PDF SDK
com.foxit.sdk.pdf.HeaderFooterContentGenerator类 参考
类 com.foxit.sdk.pdf.HeaderFooterContentGenerator 继承关系图:
com.foxit.sdk.common.Base

Public 成员函数

 HeaderFooterContentGenerator ()
 Constructor.

 
 HeaderFooterContentGenerator (HeaderFooterContentGenerator other)
 Constructor, with another header-footer content generator object.
更多...
 
void addDate (int format_type) throws com.foxit.sdk.PDFException
 Add a format string for a specified date format type.
更多...
 
void addPageNumber (int format_type) throws com.foxit.sdk.PDFException
 Add a format string for a specified page number format type.
更多...
 
void addString (String new_string) throws com.foxit.sdk.PDFException
 Add a string.
更多...
 
void clear () throws com.foxit.sdk.PDFException
 Clear strings (including format strings) which have been added to current content generator.
更多...
 
synchronized void delete ()
 直接清除C++相关资源。 更多...
 
String generateContent () throws com.foxit.sdk.PDFException
 Generate a final string which can be used as header-footer content.
更多...
 
boolean isEmpty ()
 Check whether current object is empty or not.
更多...
 

静态 Public 属性

static final int e_DateFormatDDDotMMDotYY = 17
 如果使用此项,"dd.mm.yy" 将被用作日期格式字符串。

 
static final int e_DateFormatDDDotMMDotYYYY = 18
 如果使用此项,"dd.mm.yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatDDotMDotYYYY = 16
 如果使用此项,"d.m.yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatDDSlashMMSlashYY = 7
 如果使用此项,"dd/mm/yy" 将被用作日期格式字符串。

 
static final int e_DateFormatDDSlashMMSlashYYYY = 8
 如果使用此项,"dd/mm/yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatDSlashMSlashYY = 5
 如果使用此项,"d/m/yy" 将被用作日期格式字符串。

 
static final int e_DateFormatDSlashMSlashYYYY = 6
 如果使用此项,"d/m/yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatMDotDDotYY = 11
 如果使用此项,"m.d.yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMDotDDotYYYY = 12
 如果使用此项,"m.d.yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMDotDDDotYY = 13
 如果使用此项,"mm.dd.yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMDotDDDotYYYY = 14
 如果使用此项,"mm.dd.yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMDotYY = 15
 如果使用此项,"mm.yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMSlashDDSlashYY = 3
 如果使用此项,"mm/dd/yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMSlashDDSlashYYYY = 4
 如果使用此项,"mm/dd/yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMSlashYY = 9
 如果使用此项,"mm/yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMMSlashYYYY = 10
 如果使用此项,"mm/yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatMSlashD = 0
 如果使用此项,"m/d" 将被用作日期格式字符串。

 
static final int e_DateFormatMSlashDSlashYY = 1
 如果使用此项,"m/d/yy" 将被用作日期格式字符串。

 
static final int e_DateFormatMSlashDSlashYYYY = 2
 如果使用此项,"m/d/yyyy" 将被用作日期格式字符串。

 
static final int e_DateFormatYYHyphenMMHyphenDD = 19
 如果使用此项,"yy-mm-dd" 将被用作日期格式字符串。

 
static final int e_DateFormatYYYYHyphenMMHyphenDD = 20
 如果使用此项,"yyyy-mm-dd" 将被用作日期格式字符串。

 
static final int e_PageNumberFormatDefault = 0
 如果使用此项,"1" 将被用作页码格式字符串。

 
static final int e_PageNumberFormatNumberOfCount = 1
 如果使用此项,"1 of n" 将被用作页码格式字符串。

 
static final int e_PageNumberFormatNumberSlashCount = 2
 如果使用此项,"1/n" 将被用作页码格式字符串。

 
static final int e_PageNumberFormatPageNumber = 3
 如果使用此项,"Page 1" 将被用作页码格式字符串。

 
static final int e_PageNumberFormatPageNumberOfCount = 4
 如果使用此项,"Page 1 of n" 将被用作页码格式字符串。

 

详细描述

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.

构造及析构函数说明

◆ HeaderFooterContentGenerator()

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

Constructor, with another header-footer content generator object.

参数
[in]otherAnother header-footer content generator object.

成员函数说明

◆ 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.

参数
[in]format_typeDate format type. Please refer to values starting from com.foxit.sdk.pdf.HeaderFooterContentGenerator.e_DateFormatMSlashD and this should be one of these values.
返回
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.

参数
[in]format_typePage number format type. Please refer to values starting from com.foxit.sdk.pdf.HeaderFooterContentGenerator.e_PageNumberFormatDefault and this should be one of these values.
返回
None.

◆ addString()

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

Add a string.

参数
[in]new_stringA string.
返回
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.

返回
None.

◆ delete()

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

直接清除C++相关资源。

返回
无。
注解
一旦这个接口被调用,这个对象将不能再被使用。

重载 com.foxit.sdk.common.Base .

◆ 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.

返回
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.

返回
true means current object is empty, while false means not.