Foxit PDF SDK
foxit.pdf.HeaderFooter Class Reference

Inherits SystemIDisposable.

Public Member Functions

 HeaderFooter (Font font, float text_size, int text_color, Range page_range, RectF page_margin, bool has_text_shrinked, bool has_fixedsize_for_print, int start_page_number, HeaderFooterContent content)
 Constructor, with parameters. More...
 
 HeaderFooter ()
 Constructor.
 
 HeaderFooter (HeaderFooter other)
 Constructor, with another header-footer object. More...
 
void Set (Font font, float text_size, int text_color, Range page_range, RectF page_margin, bool has_text_shrinked, bool has_fixedsize_for_print, int start_page_number, HeaderFooterContent content)
 Set value. More...
 

Properties

HeaderFooterContentcontent [get, set]
 Header-footer content.
 
Fontfont [get, set]
 Font used for header-footer content.
 
bool has_fixedsize_for_print [get, set]
 A boolean value that decides whether to use fixed size for print or not.
 
bool has_text_shrinked [get, set]
 A boolean value that decides whether to shrink text or not.
 
RectFpage_margin [get, set]
 Page margin which specifies the location for header-footer content. More...
 
Rangepage_range [get, set]
 A range object which specifies pages where current header-footer is used. All the values represented in this range mean page numbers directly instead of page indexes. So they should start from 1 and no more than page count of the PDF document, in which current header-footer object is used.
 
int start_page_number [get, set]
 The number used for the first page specified in HeaderFooter::page_range. This can be any number, even different from the actual page number of the specified page.
 
int text_color [get, set]
 Text color used for header-footer content.
 
float text_size [get, set]
 Text size of header-footer content.
 

Detailed Description

This class represents properties and data for a header-footer.

Constructor & Destructor Documentation

◆ HeaderFooter() [1/2]

foxit.pdf.HeaderFooter.HeaderFooter ( Font  font,
float  text_size,
int  text_color,
Range  page_range,
RectF  page_margin,
bool  has_text_shrinked,
bool  has_fixedsize_for_print,
int  start_page_number,
HeaderFooterContent  content 
)
inline

Constructor, with parameters.

Parameters
[in]fontA valid font object used for header-footer content.
[in]text_sizeText size of header-footer content.
[in]text_colorText color used for header-footer content.
[in]page_rangeA range object which specifies pages where current header-footer is used. All the values represented in this range mean page numbers directly instead of page indexes. So they should start from 1 and no more than page count of the PDF document, in which current header-footer object is used.
[in]page_marginPage margin which specifies the location for header-footer content. Please refer to comment of HeaderFooter::page_margin for more details.
[in]has_text_shrinkedA boolean value that decides whether to shrink text or not.
[in]has_fixedsize_for_printA boolean value that decides whether to use fixed size for print or not.
[in]start_page_numberThe number used for the first page specified in parameter page_range. This can be any number, even different from the actual page number of the specified page.
[in]contentHeader-footer content.

◆ HeaderFooter() [2/2]

foxit.pdf.HeaderFooter.HeaderFooter ( HeaderFooter  other)
inline

Constructor, with another header-footer object.

Parameters
[in]otherAnother header-footer object.

Member Function Documentation

◆ Set()

void foxit.pdf.HeaderFooter.Set ( Font  font,
float  text_size,
int  text_color,
Range  page_range,
RectF  page_margin,
bool  has_text_shrinked,
bool  has_fixedsize_for_print,
int  start_page_number,
HeaderFooterContent  content 
)
inline

Set value.

Parameters
[in]fontA valid font object used for header-footer content.
[in]text_sizeText size of header-footer content.
[in]text_colorText color used for header-footer content.
[in]page_rangeA range object which specifies pages where current header-footer is used. All the values represented in this range mean page numbers directly instead of page indexes. So they should start from 1 and no more than page count of the PDF document, in which current header-footer object is used.
[in]page_marginPage margin which specifies the location for header-footer content. Please refer to comment of HeaderFooter::page_margin for more details.
[in]has_text_shrinkedA boolean value that decides whether to shrink text or not.
[in]has_fixedsize_for_printA boolean value that decides whether to use fixed size for print or not.
[in]start_page_numberThe number used for the first page specified in parameter page_range. This can be any number, even different from the actual page number of the specified page.
[in]contentHeader-footer content.
Returns
None.

Property Documentation

◆ page_margin

RectF foxit.pdf.HeaderFooter.page_margin
getset

Page margin which specifies the location for header-footer content.

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.