public class CPDFHeaderFooter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes the header & footer.
|
java.lang.String |
getFontName(int index)
Gets the font name of the header & footer at the specified index.
|
float |
getFontSize(int index)
Gets the font size of the header & footer at the specified index.
|
android.graphics.RectF |
getMargin()
Gets the margins of the header & footer.
|
int |
getPageOffset()
Gets the start page number of the header & footer.
|
java.lang.String |
getPages()
Gets the page range of the header & footer by string, such as "0,3 or 5-7".
|
int |
getRules()
Get rule value
|
java.lang.String |
getText(int index)
Gets the text of the header & footer at the specified index.
|
int |
getTextColor(int index)
Gets the font color of the header & footer at the specified index.
|
boolean |
isValid()
Whether CPDFHeaderFooter is valid.
|
void |
release()
Release CPDFHeaderFooter object
|
boolean |
setFontName(int index,
java.lang.String fontName)
Sets the font name of the header & footer at the specified index.
|
boolean |
setFontSize(int index,
float fontSize)
Sets the font size of the header & footer at the specified index.
|
boolean |
setMargin(float left,
float top,
float right,
float bottom)
Sets the margins of the header & footer.
|
boolean |
setPageOffset(int offset)
Sets the start page number of the header & footer.
|
boolean |
setPages(java.lang.String pages)
Sets the page range of the header & footer by string, such as "0,3 or 5-7".
|
boolean |
setRules(int rule)
When setText
setText(int, String) , there are two kinds of rules. |
boolean |
setText(int index,
java.lang.String text)
Sets the text of the header & footer at the specified index.
|
boolean |
setTextColor(int index,
int color)
Sets the font color of the header & footer at the specified index.
|
void |
update()
Updates the header & footer.
|
public java.lang.String getText(int index)
index
- The specified indexpublic boolean setText(int index, java.lang.String text)
index
- The specified indextext
- The display textpublic java.lang.String getFontName(int index)
index
- The specified indexpublic boolean setFontName(int index, java.lang.String fontName)
index
- The specified indexfontName
- Font name.public float getFontSize(int index)
index
- The specified indexpublic boolean setFontSize(int index, float fontSize)
index
- The specified indexfontSize
- Font size.public int getTextColor(int index)
index
- The specified indexpublic boolean setTextColor(int index, int color)
index
- The specified indexcolor
- Color value (0x00000000~0xFFFFFFFF)public android.graphics.RectF getMargin()
public boolean setMargin(float left, float top, float right, float bottom)
left
- Left margintop
- Top marginright
- Right marginbottom
- Bottom marginpublic int getPageOffset()
public boolean setPageOffset(int offset)
offset
- page offsetpublic void update()
public void clear()
public java.lang.String getPages()
public boolean setPages(java.lang.String pages)
pages
- page rangepublic boolean setRules(int rule)
setText(int, String)
, there are two kinds of rules.
When rule is 1, the set text is in the form of <> or <>,
where 'i' is the starting value of the page number, and 'f' is the number of digits in the page number ,
if the actual page number is not enough, it will be automatically filled with 0 in front.
When rule is 2, the set text is <<1>>, and the starting value of the page number is the set pageOffsetrule
- rule ,default is 2public int getRules()
public boolean isValid()
public void release()