PDF HeaderFooter object.
More...
PDF HeaderFooter object.
- Since
- 7.2.0
◆ constructor()
HeaderFooter::constructor |
( |
|
json | ) |
|
|
inline |
Constructor of HeaderFooter.
- Note
- It's recommanded to use method to config header and footer.
- Parameters
-
[json] | object - A json object specify configuration of header footer. For example: { contentFormats: {TopLeft: [{type:'string',value:'***'}]}, margin: { left: 72, right: 36, top: 72, bottom: 36}, textSize: 12, textColor: 4278190080, hasTextShrinked: false, hasFixedSized: false, startPageNumber: 1, } |
◆ enableFixedSizedForPrint()
HeaderFooter::enableFixedSizedForPrint |
( |
|
enable | ) |
|
|
inline |
Enable fixed size for print of header or footer or not.
- Parameters
-
enable | boolean - Specifies fixed size for print or not. |
◆ enableTextShrinked()
HeaderFooter::enableTextShrinked |
( |
|
enable | ) |
|
|
inline |
Enable text shrinked of header or footer or not.
- Parameters
-
enable | boolean - Specifies text shrinked or not. |
◆ getContent()
HeaderFooter::getContent |
( |
|
position | ) |
|
|
inline |
Get content formats.
- Parameters
-
◆ getUnderline()
HeaderFooter::getUnderline |
( |
| ) |
|
|
inline |
Get underline text decoration.
- Returns
- boolean - True for underline, false for normal style.
- Since
- 7.5.0
◆ isEmpty()
HeaderFooter::isEmpty |
( |
| ) |
|
|
inline |
◆ setContentFormat()
HeaderFooter::setContentFormat |
( |
|
position, |
|
|
|
format |
|
) |
| |
|
inline |
Set content formats.
- Parameters
-
For Example:
[
{
type:"string",
value:"abc"
},
{
type:"date",
value:0,
},
{
type:"pageNumber",
value:0,
}
]
◆ setFont()
HeaderFooter::setFont |
( |
|
fontId | ) |
|
|
inline |
Set font.
- Parameters
-
fontId | number - An integer which specifies font. Please refer to Standard_Font. |
◆ setMargin()
HeaderFooter::setMargin |
( |
|
rect | ) |
|
|
inline |
Set margin.
- Parameters
-
rect | PDFRect - A rectangle specifies header or footer's margin. |
- Note
- This value does not represents a rectangle. It just defines the left margin, bottom margin, right margin and top margin of a PDF page. These margins can be used to locate header-footer content in different places:
-
Left margin is used to specify the location for left header or footer content to be started.
-
right margin is used to specify the location for right header or footer content to be ended.
-
bottom margin is used to specify the top location for any footer content to be placed.
-
top margin is used to specify the bottom location for any header content to be placed.
if bottom margin and top margin is less than or equal to 0, the header or footer content will be invisible. so the default construction has a default value RectF(72.0, 36.0, 72.0, 36.0);
◆ setRange()
HeaderFooter::setRange |
( |
|
range | ) |
|
|
inline |
Set the page range to which the header or footer will be inserted.
- Parameters
-
◆ setStartDisplayingPage()
HeaderFooter::setStartDisplayingPage |
( |
|
index | ) |
|
|
inline |
Set first page index to be displayed in first page of range.
- Parameters
-
index | number - Page Index. |
◆ setTextColor()
HeaderFooter::setTextColor |
( |
|
color | ) |
|
|
inline |
Set text color of header or footer.
- Parameters
-
color | number - Text color(0xffRRGGBB). Alpha chennal is ignored, and always is 0xff. |
◆ setTextSize()
HeaderFooter::setTextSize |
( |
|
size | ) |
|
|
inline |
Set text size of header or footer.
- Parameters
-
◆ setUnderline()
HeaderFooter::setUnderline |
( |
|
underline | ) |
|
|
inline |
Set underline text decoration or not.
- Parameters
-
underline | boolean - True for underline, false for normal style. |
- Since
- 7.5.0