Foxit PDF SDK
fsdk.HeaderFooter Class Reference

Public Member Functions

def GetContent ()
 Get header-footer content. More...
 
def GetFont ()
 Get a valid font object which is expected to be used for header-footer content. More...
 
def GetHas_fixedsize_for_print ()
 Get a boolean value that decides whether to use fixed size for print or not. More...
 
def GetHas_text_shrinked ()
 Get a boolean value that decides whether to shrink text or not. More...
 
def GetIs_replace_font ()
 Get (Reserved) A boolean value that decides whether to replace font or not. More...
 
def GetIs_to_embed_font ()
 Get a boolean value that decides whether to embed font or not. More...
 
def GetIs_underline ()
 Get a boolean value that decides whether to underline text or not. More...
 
def GetPage_margin ()
 Get page margin which specifies the location for header-footer content. More...
 
def GetPage_range ()
 Get a page number range object which specifies pages where current header-footer is used. More...
 
def GetStart_page_number ()
 Get a virtual page number used for the first page specified in parameter page_range. More...
 
def GetText_color ()
 Get text color used for header-footer content. More...
 
def GetText_size ()
 Get text size of header-footer content. More...
 
def Set (font, text_size, text_color, page_range, page_margin, has_text_shrinked, has_fixedsize_for_print, start_page_number, content, is_to_embed_font, is_underline)
 Set value.
More...
 
def SetContent (value)
 Set header-footer content. More...
 
def SetFont (value)
 Set a valid font object which is expected to be used for header-footer content. More...
 
def SetHas_fixedsize_for_print (value)
 Set a boolean value that decides whether to use fixed size for print or not. More...
 
def SetHas_text_shrinked (value)
 Set a boolean value that decides whether to shrink text or not. More...
 
def SetIs_replace_font (value)
 Set (Reserved) A boolean value that decides whether to replace font or not. More...
 
def SetIs_to_embed_font (value)
 Set a boolean value that decides whether to embed font or not. More...
 
def SetIs_underline (value)
 Set a boolean value that decides whether to underline text or not. More...
 
def SetPage_margin (value)
 Set page margin which specifies the location for header-footer content. More...
 
def SetPage_range (value)
 Set a page number range object which specifies pages where current header-footer is used. More...
 
def SetStart_page_number (value)
 Set a virtual page number used for the first page specified in parameter page_range. More...
 
def SetText_color (value)
 Set text color used for header-footer content. More...
 
def SetText_size (value)
 Set text size of header-footer content. More...
 

Detailed Description

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

Member Function Documentation

◆ GetContent()

fsdk.HeaderFooter.GetContent ( )

Get header-footer content.

Returns
Header-footer content.

◆ GetFont()

fsdk.HeaderFooter.GetFont ( )

Get a valid font object which is expected to be used for header-footer content.

Note
Sometimes, Foxit PDF SDK cannot match an extract font with this font object. In this case, Foxit PDF SDK will match a similar font (which is not exactly same as this font object) for heasder-footer content instead.
Returns
A valid font object which is expected to be used for header-footer content.

◆ GetHas_fixedsize_for_print()

fsdk.HeaderFooter.GetHas_fixedsize_for_print ( )

Get a boolean value that decides whether to use fixed size for print or not.

Returns
A boolean value that decides whether to use fixed size for print or not.

◆ GetHas_text_shrinked()

fsdk.HeaderFooter.GetHas_text_shrinked ( )

Get a boolean value that decides whether to shrink text or not.

Returns
A boolean value that decides whether to shrink text or not.

◆ GetIs_replace_font()

fsdk.HeaderFooter.GetIs_replace_font ( )

Get (Reserved) A boolean value that decides whether to replace font or not.

Returns
(Reserved) A boolean value that decides whether to replace font or not. Currently Foxit PDF SDK will use this as true all the time.

◆ GetIs_to_embed_font()

fsdk.HeaderFooter.GetIs_to_embed_font ( )

Get a boolean value that decides whether to embed font or not.

Returns
A boolean value that decides whether to embed font or not.

◆ GetIs_underline()

fsdk.HeaderFooter.GetIs_underline ( )

Get a boolean value that decides whether to underline text or not.

Returns
A boolean value that decides whether to underline text or not.

◆ GetPage_margin()

fsdk.HeaderFooter.GetPage_margin ( )

Get page margin which specifies the location for header-footer content.

Note
This value does not represent 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. If bottom margin is no more than 0, the footer content will be invisible.
  • Top margin is used to specify the bottom location for any header content to be placed. If top margin is no more than 0, the header content will be invisible.

Returns
Page margin which specifies the location for header-footer content. Foxit PDF SDK will use a maring defined as (72.0, 36.0, 72.0, 36.0) as default if no margin value is set by user.

◆ GetPage_range()

fsdk.HeaderFooter.GetPage_range ( )

Get a page number range object which specifies pages where current header-footer is used.

All the values represented in this range should start from 1 and no more than page count of the PDF document, in which current header-footer object is used.

Returns
A page number range object which specifies pages where current header-footer is used.

◆ GetStart_page_number()

fsdk.HeaderFooter.GetStart_page_number ( )

Get a virtual page number used for the first page specified in parameter page_range.

Note
If this value is less than 1, Foxit PDF SDK will use 1 for this value when current header-footer object is used in a PDF document.
Returns
A virtual page 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.

◆ GetText_color()

fsdk.HeaderFooter.GetText_color ( )

Get text color used for header-footer content.

Returns
Text color used for header-footer content.

◆ GetText_size()

fsdk.HeaderFooter.GetText_size ( )

Get text size of header-footer content.

Returns
Text size of header-footer content.

◆ Set()

def fsdk.HeaderFooter.Set (   font,
  text_size,
  text_color,
  page_range,
  page_margin,
  has_text_shrinked,
  has_fixedsize_for_print,
  start_page_number,
  content,
  is_to_embed_font,
  is_underline 
)

Set value.

Parameters
[in]fontA valid font object which is expected to be used for header-footer content. Please refer to comment of font of current object.
[in]text_sizeText size of header-footer content.
[in]text_colorText color used for header-footer content.
[in]page_rangeA page number range object which specifies pages where current header-footer is used. Please refer to comment of page_range of current object.
[in]page_marginPage margin which specifies the location for header-footer content. Please refer to comment of page_margin of current object.
[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_numberA virtual page 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. If this value is less than 1, Foxit PDF SDK will use 1 for this value when current header-footer object is used in a PDF document.
[in]contentHeader-footer content.
[in]is_to_embed_fontA boolean value that decides whether to embed font or not.
[in]is_underlineA boolean value that decides whether to underline text or not.
Returns
None.

◆ SetContent()

fsdk.HeaderFooter.SetContent (   value)

Set header-footer content.

Parameters
[in]valueHeader-footer content.
Returns
None.

◆ SetFont()

fsdk.HeaderFooter.SetFont (   value)

Set a valid font object which is expected to be used for header-footer content.

Note
Sometimes, Foxit PDF SDK cannot match an extract font with this font object. In this case, Foxit PDF SDK will match a similar font (which is not exactly same as this font object) for heasder-footer content instead.
Parameters
[in]valueA valid font object which is expected to be used for header-footer content.
Returns
None.

◆ SetHas_fixedsize_for_print()

fsdk.HeaderFooter.SetHas_fixedsize_for_print (   value)

Set a boolean value that decides whether to use fixed size for print or not.

Parameters
[in]valueA boolean value that decides whether to use fixed size for print or not.
Returns
None.

◆ SetHas_text_shrinked()

fsdk.HeaderFooter.SetHas_text_shrinked (   value)

Set a boolean value that decides whether to shrink text or not.

Parameters
[in]valueA boolean value that decides whether to shrink text or not.
Returns
None.

◆ SetIs_replace_font()

fsdk.HeaderFooter.SetIs_replace_font (   value)

Set (Reserved) A boolean value that decides whether to replace font or not.

Parameters
[in]value(Reserved) A boolean value that decides whether to replace font or not. Currently Foxit PDF SDK will use this as true all the time.
Returns
None.

◆ SetIs_to_embed_font()

fsdk.HeaderFooter.SetIs_to_embed_font (   value)

Set a boolean value that decides whether to embed font or not.

Parameters
[in]valueA boolean value that decides whether to embed font or not.
Returns
None.

◆ SetIs_underline()

fsdk.HeaderFooter.SetIs_underline (   value)

Set a boolean value that decides whether to underline text or not.

Parameters
[in]valueA boolean value that decides whether to underline text or not.
Returns
None.

◆ SetPage_margin()

fsdk.HeaderFooter.SetPage_margin (   value)

Set page margin which specifies the location for header-footer content.

Note
This value does not represent 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. If bottom margin is no more than 0, the footer content will be invisible.
  • Top margin is used to specify the bottom location for any header content to be placed. If top margin is no more than 0, the header content will be invisible.

Parameters
[in]valuePage margin which specifies the location for header-footer content. Foxit PDF SDK will use a maring defined as (72.0, 36.0, 72.0, 36.0) as default if no margin value is set by user.
Returns
None.

◆ SetPage_range()

fsdk.HeaderFooter.SetPage_range (   value)

Set a page number range object which specifies pages where current header-footer is used.

All the values represented in this range should start from 1 and no more than page count of the PDF document, in which current header-footer object is used.

Parameters
[in]valueA page number range object which specifies pages where current header-footer is used.
Returns
None.

◆ SetStart_page_number()

fsdk.HeaderFooter.SetStart_page_number (   value)

Set a virtual page number used for the first page specified in parameter page_range.

Note
If this value is less than 1, Foxit PDF SDK will use 1 for this value when current header-footer object is used in a PDF document.
Parameters
[in]valueA virtual page 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.
Returns
None.

◆ SetText_color()

fsdk.HeaderFooter.SetText_color (   value)

Set text color used for header-footer content.

Parameters
[in]valueText color used for header-footer content.
Returns
None.

◆ SetText_size()

fsdk.HeaderFooter.SetText_size (   value)

Set text size of header-footer content.

Parameters
[in]valueText size of header-footer content.
Returns
None.