Foxit PDF SDK

Instance Methods | Properties | List of all members
FSHeaderFooter Class Reference

Inherits NSObject.

## Instance Methods
(id) | - init
| Constructor.
(id) | - initWithFont: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:
| Constructor, with parameters. More...
(id) | - initWithOther:
| Constructor, with another header-footer object. More...
(void) | - set: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...

## Properties
FSHeaderFooterContent * | content
| Header-footer content.
FSFont * | font
| A valid font object which is expected to be used for header-footer content. More...
BOOL | has_fixedsize_for_print
| A boolean value that decides whether to use fixed size for print or not.
BOOL | has_text_shrinked
| A boolean value that decides whether to shrink text or not.
BOOL | is_replace_font
| (Reserved) A boolean value that decides whether to replace font or not. Currently Foxit PDF SDK will use this as YES all the time.
BOOL | is_to_embed_font
| A boolean value that decides whether to embed font or not.
BOOL | is_underline
| A boolean value that decides whether to underline text or not.
FSRectF * | page_margin
| 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. More...
FSPageNumberRange * | page_range
| A page number range object which specifies pages where current header-footer is used. More...
int | start_page_number
| 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. More...
unsigned int | text_color
| Text color used for header-footer content.
float | text_size
| Text size of header-footer content.

## Detailed Description

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

## Method Documentation

## ◆ initWithFont: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:()

- (id) initWithFont: |  | (FSFont*) | font
text_size: |  | (float) | text_size
text_color: |  | (unsigned int) | text_color
page_range: |  | (FSPageNumberRange*) | page_range
page_margin: |  | (FSRectF*) | page_margin
has_text_shrinked: |  | (BOOL) | has_text_shrinked
has_fixedsize_for_print: |  | (BOOL) | has_fixedsize_for_print
start_page_number: |  | (int) | start_page_number
content: |  | (FSHeaderFooterContent*) | content
is_to_embed_font: |  | (BOOL) | is_to_embed_font
is_underline: |  | (BOOL) | is_underline

Constructor, with parameters.

Parameters

  [in] | font | A valid font object used for header-footer content. Please refer to comment of font of current object.
  [in] | text_size | Text size of header-footer content.
  [in] | text_color | Text color used for header-footer content.
  [in] | page_range | A 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_margin | Page margin which specifies the location for header-footer content. Please refer to comment of page_margin of current object.
  [in] | has_text_shrinked | A boolean value that decides whether to shrink text or not.
  [in] | has_fixedsize_for_print | A boolean value that decides whether to use fixed size for print or not.
  [in] | start_page_number | 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. 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] | content | Header-footer content.
  [in] | is_to_embed_font | A boolean value that decides whether to embed font or not.
  [in] | is_underline | A boolean value that decides whether to underline text or not.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSHeaderFooter*) | other |

Constructor, with another header-footer object.

Parameters

  [in] | other | Another header-footer object.

## ◆ set: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:()

- (void) set: |  | (FSFont*) | font
text_size: |  | (float) | text_size
text_color: |  | (unsigned int) | text_color
page_range: |  | (FSPageNumberRange*) | page_range
page_margin: |  | (FSRectF*) | page_margin
has_text_shrinked: |  | (BOOL) | has_text_shrinked
has_fixedsize_for_print: |  | (BOOL) | has_fixedsize_for_print
start_page_number: |  | (int) | start_page_number
content: |  | (FSHeaderFooterContent*) | content
is_to_embed_font: |  | (BOOL) | is_to_embed_font
is_underline: |  | (BOOL) | is_underline

Set value.

Parameters

  [in] | font | A valid font object which is expected to be used for header-footer content. Please refer to comment of font of current object.
  [in] | text_size | Text size of header-footer content.
  [in] | text_color | Text color used for header-footer content.
  [in] | page_range | A 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_margin | Page margin which specifies the location for header-footer content. Please refer to comment of page_margin of current object.
  [in] | has_text_shrinked | A boolean value that decides whether to shrink text or not.
  [in] | has_fixedsize_for_print | A boolean value that decides whether to use fixed size for print or not.
  [in] | start_page_number | 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. 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] | content | Header-footer content.
  [in] | is_to_embed_font | A boolean value that decides whether to embed font or not.
  [in] | is_underline | A boolean value that decides whether to underline text or not.

Returns
  None.

## Property Documentation

## ◆ font

- (FSFont *) font
| read write nonatomic weak

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.

## ◆ page_margin

- (FSRectF *) page_margin
| read write nonatomic weak

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.

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.

## ◆ page_range

- (FSPageNumberRange *) page_range
| read write nonatomic weak

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.

## ◆ start_page_number

- (int) start_page_number
| read write nonatomic assign

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.

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.