Foxit PDF SDK
FSHeaderFooter类 参考

继承自 NSObject .

构造函数

(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.
更多...
 
(id) - initWithOther:
 用另一个页眉页脚对象的构造函数。
更多...
 
(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:
 设置值。
更多...
 

属性

FSHeaderFooterContent * content
 页眉页脚内容。

 
FSFont * font
 期望用于页眉页脚内容的有效字体对象。
更多...
 
BOOL has_fixedsize_for_print
 决定是否为打印使用固定大小的布尔值。

 
BOOL has_text_shrinked
 决定是否缩小文本的布尔值。

 
BOOL is_replace_font
 (保留)决定是否替换字体的布尔值。目前 Foxit PDF SDK 始终将此值设为 YES。

 
BOOL is_to_embed_font
 决定是否嵌入字体的布尔值。

 
BOOL is_underline
 决定是否给文本加下划线的布尔值。

 
FSRectF * page_margin
 指定页眉页脚内容位置的页边距。 如果用户未设置边距值,Foxit PDF SDK 将使用定义为 (72.0, 36.0, 72.0, 36.0) 的边距作为默认值。
更多...
 
FSPageNumberRange * page_range
 指定当前页眉页脚使用页面的页码范围对象。
更多...
 
int start_page_number
 用于参数 page_range 中指定的第一页的虚拟页码。 这可以是任何数字,甚至与指定页面的实际页码不同。
更多...
 
unsigned int text_color
 用于页眉页脚内容的文本颜色。

 
float text_size
 页眉页脚内容的文本大小。

 

详细描述

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

函数文档

◆ 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.

参数
[in]fontA valid font object 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.

◆ initWithOther:()

- (id) initWithOther: (FSHeaderFooter*)  other

用另一个页眉页脚对象的构造函数。

参数
[in]other另一个页眉页脚对象。

◆ 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 

设置值。

参数
[in]font期望用于页眉页脚内容的有效字体对象。 请参阅当前对象的 font 注释。
[in]text_size页眉页脚内容的文本大小。
[in]text_color用于页眉页脚内容的文本颜色。
[in]page_range指定当前页眉页脚使用页面的页码范围对象。 请参阅当前对象的 page_range 注释。
[in]page_margin指定页眉页脚内容位置的页边距。 请参阅当前对象的 page_margin 注释。
[in]has_text_shrinked决定是否缩小文本的布尔值。
[in]has_fixedsize_for_print决定是否为打印使用固定大小的布尔值。
[in]start_page_number用于参数 page_range 中指定的第一页的虚拟页码。 这可以是任何数字,甚至与指定页面的实际页码不同。 如果此值小于 1,当当前页眉页脚对象在 PDF 文档中使用时,Foxit PDF SDK 将对此值使用 1。
[in]content页眉页脚内容。
[in]is_to_embed_font决定是否嵌入字体的布尔值。
[in]is_underline决定是否给文本加下划线的布尔值。
返回
无。

属性说明

◆ font

- (FSFont *) font
readwritenonatomicweak

期望用于页眉页脚内容的有效字体对象。

注解
有时,Foxit PDF SDK 无法将提取的字体与此字体对象匹配。 在这种情况下,Foxit PDF SDK 将为页眉页脚内容匹配一个类似的字体(与此字体对象不完全相同)。

◆ page_margin

- (FSRectF *) page_margin
readwritenonatomicweak

指定页眉页脚内容位置的页边距。 如果用户未设置边距值,Foxit PDF SDK 将使用定义为 (72.0, 36.0, 72.0, 36.0) 的边距作为默认值。

注解
此值不表示矩形。它只是定义 PDF 页面的左边距、下边距、右边距和上边距。这些边距可用于将页眉页脚内容定位在不同的位置:
  • 左边距用于指定左页眉或页脚内容开始的位置。
  • 右边距用于指定右页眉或页脚内容结束的位置。
  • 下边距用于指定任何页脚内容放置的顶部位置。如果下边距不大于 0,页脚内容将不可见。
  • 上边距用于指定任何页眉内容放置的底部位置。如果上边距不大于 0,页眉内容将不可见。

◆ page_range

- (FSPageNumberRange *) page_range
readwritenonatomicweak

指定当前页眉页脚使用页面的页码范围对象。

此范围中表示的所有值应从 1 开始且不超过使用当前页眉页脚对象的 PDF 文档的页数。

◆ start_page_number

- (int) start_page_number
readwritenonatomicassign

用于参数 page_range 中指定的第一页的虚拟页码。 这可以是任何数字,甚至与指定页面的实际页码不同。

注解
如果此值小于 1,当当前页眉页脚对象在 PDF 文档中使用时,Foxit PDF SDK 将对此值使用 1。