Table of Contents

Class OdfPageSetup

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Represents the page setup of a text document. 表示文字文件的頁面設定。

public class OdfPageSetup
Inheritance
OdfPageSetup
Inherited Members

Constructors

OdfPageSetup(TextDocument)

Initializes a new instance of the OdfPageSetup class using the default master page (Standard / Mpm1). 使用預設主頁面(Standard / Mpm1)初始化。

public OdfPageSetup(TextDocument doc)

Parameters

doc TextDocument

Properties

Gets the default footer region. 取得預設頁尾區域。

public OdfPageHeaderFooter Footer { get; }

Property Value

OdfPageHeaderFooter

FooterDynamicSpacing

Gets or sets whether the footer uses dynamic spacing. 取得或設定頁尾是否採用動態間距。

public bool? FooterDynamicSpacing { get; set; }

Property Value

bool?

FooterFirst

Gets the first-page-only footer region. 取得首頁專用頁尾區域。

public OdfPageHeaderFooter FooterFirst { get; }

Property Value

OdfPageHeaderFooter

FooterLeft

Gets the left-page footer region (mirrored layout). 取得左頁尾區域(鏡像版面)。

public OdfPageHeaderFooter FooterLeft { get; }

Property Value

OdfPageHeaderFooter

FooterLeftText

Gets or sets the left-page footer's text content. 取得或設定左頁尾的文字內容。

public string? FooterLeftText { get; set; }

Property Value

string

FooterMinHeight

Gets or sets the minimum height of the footer region (e.g. 1cm). 取得或設定頁尾區域最小高度(例如 1cm)。

public string? FooterMinHeight { get; set; }

Property Value

string

FooterText

Gets or sets the footer's text content. 取得或設定頁尾的文字內容。

public string? FooterText { get; set; }

Property Value

string

Header

Gets the default header region. 取得預設頁首區域。

public OdfPageHeaderFooter Header { get; }

Property Value

OdfPageHeaderFooter

HeaderDynamicSpacing

Gets or sets whether the header uses dynamic spacing. 取得或設定頁首是否採用動態間距。

public bool? HeaderDynamicSpacing { get; set; }

Property Value

bool?

HeaderFirst

Gets the first-page-only header region. 取得首頁專用頁首區域。

public OdfPageHeaderFooter HeaderFirst { get; }

Property Value

OdfPageHeaderFooter

HeaderLeft

Gets the left-page header region (mirrored layout). 取得左頁首區域(鏡像版面)。

public OdfPageHeaderFooter HeaderLeft { get; }

Property Value

OdfPageHeaderFooter

HeaderLeftText

Gets or sets the left-page header's text content. 取得或設定左頁首的文字內容。

public string? HeaderLeftText { get; set; }

Property Value

string

HeaderMinHeight

Gets or sets the minimum height of the header region (e.g. 1.5cm). 取得或設定頁首區域最小高度(例如 1.5cm)。

public string? HeaderMinHeight { get; set; }

Property Value

string

HeaderText

Gets or sets the header's text content. 取得或設定頁首的文字內容。

public string? HeaderText { get; set; }

Property Value

string

LayoutGridBaseHeight

Gets or sets the base height of the layout grid. 取得或設定版面配置網格的基礎高度。

public string? LayoutGridBaseHeight { get; set; }

Property Value

string

LayoutGridBaseWidth

Gets or sets the base width of the layout grid. 取得或設定版面配置網格的基礎寬度。

public string? LayoutGridBaseWidth { get; set; }

Property Value

string

LayoutGridCharacters

Gets or sets the number of characters in the layout grid. 取得或設定版面配置網格的字數。

public int? LayoutGridCharacters { get; set; }

Property Value

int?

LayoutGridDisplay

Gets or sets a value indicating whether the layout grid is displayed. 取得或設定一個值,指出是否顯示版面配置網格。

public bool? LayoutGridDisplay { get; set; }

Property Value

bool?

LayoutGridLines

Gets or sets the number of lines in the layout grid. 取得或設定版面配置網格的行數。

public int? LayoutGridLines { get; set; }

Property Value

int?

LayoutGridMode

Gets or sets the mode of the page layout grid. 取得或設定頁面版面配置網格的模式。

public OdfLayoutGridMode LayoutGridMode { get; set; }

Property Value

OdfLayoutGridMode

LayoutGridPrint

Gets or sets a value indicating whether the layout grid is printed. 取得或設定一個值,指出是否列印版面配置網格。

public bool? LayoutGridPrint { get; set; }

Property Value

bool?

LayoutGridRubyHeight

Gets or sets the ruby (phonetic annotation) height of the layout grid. 取得或設定版面配置網格的旁註標記(注音)高度。

public string? LayoutGridRubyHeight { get; set; }

Property Value

string

MasterPageName

Gets the master page style name corresponding to this page setup. 取得此頁面設定對應的主頁面樣式名稱。

public string MasterPageName { get; }

Property Value

string

PageHeight

Gets or sets the page height (in centimeters). 取得或設定頁面高度(公分)。

public double PageHeight { get; set; }

Property Value

double

PageUsage

Gets or sets the page usage. 取得或設定頁面使用方式。

public OdfPageUsage PageUsage { get; set; }

Property Value

OdfPageUsage

PageWidth

Gets or sets the page width (in centimeters). 取得或設定頁面寬度(公分)。

public double PageWidth { get; set; }

Property Value

double

WritingMode

Gets or sets the page's text writing mode. 取得或設定頁面的文字書寫模式。

public OdfWritingMode WritingMode { get; set; }

Property Value

OdfWritingMode

Methods

AddFontFace(string, string)

Short overload of AddFontFace that accepts name and fontFamily; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 fontFamily;其餘可選參數使用預設值並轉呼叫最長 AddFontFace 多載。

public void AddFontFace(string name, string fontFamily)

Parameters

name string
fontFamily string

AddFontFace(string, string, string?)

Short overload of AddFontFace that accepts name, fontFamily, and genericFamily; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、fontFamily 與 genericFamily;其餘可選參數使用預設值並轉呼叫最長 AddFontFace 多載。

public void AddFontFace(string name, string fontFamily, string? genericFamily)

Parameters

name string
fontFamily string
genericFamily string

AddFontFace(string, string, string?, string?)

Adds a font declaration entry to the page setup. 在頁面設定中新增字型宣告專案。

public void AddFontFace(string name, string fontFamily, string? genericFamily, string? pitch)

Parameters

name string

The font code or alias. / 字型代碼或別名。

fontFamily string

The actual font name. / 實際的字型名稱。

genericFamily string

The generic font family. / 泛用字型系列。

pitch string

The font pitch mode. / 字距模式。