Class TextParagraphBuilder
Builds paragraph text runs with a fluent API. 提供段落文字片段的 Fluent 建立 API。
public sealed class TextParagraphBuilder
- Inheritance
-
TextParagraphBuilder
- Inherited Members
Methods
AddChart(OdfChartDefinition, OdfLength, OdfLength)
Adds an embedded chart. 新增嵌入圖表。
public TextParagraphBuilder AddChart(OdfChartDefinition chart, OdfLength width, OdfLength height)
Parameters
chartOdfChartDefinitionThe chart definition. / 圖表定義。
widthOdfLengthThe chart width. / 圖表寬度。
heightOdfLengthThe chart height. / 圖表高度。
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。
AddComment(string, string)
Adds a document comment. 新增註解。
public TextParagraphBuilder AddComment(string author, string text)
Parameters
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。
AddFootnote(string, string)
Adds a footnote to the document. 新增腳註。
public TextParagraphBuilder AddFootnote(string citation, string bodyText)
Parameters
citationstringThe footnote citation marker. / 腳註引用標記。
bodyTextstringThe footnote body text. / 腳註本文。
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。
AddImage(byte[], OdfLength, OdfLength)
Short overload of AddImage that accepts imageBytes, width, and height; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 imageBytes、width 與 height;其餘可選參數使用預設值並轉呼叫最長 AddImage 多載。
public TextParagraphBuilder AddImage(byte[] imageBytes, OdfLength width, OdfLength height)
Parameters
Returns
AddImage(byte[], OdfLength, OdfLength, string?)
Adds an image frame. 新增圖片框架。
public TextParagraphBuilder AddImage(byte[] imageBytes, OdfLength width, OdfLength height, string? name)
Parameters
imageBytesbyte[]The image bytes. / 圖片位元組。
widthOdfLengthThe image width. / 圖片寬度。
heightOdfLengthThe image height. / 圖片高度。
namestringThe image name. / 圖片名稱。
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。
Append(string)
Appends a plain text run. 新增純文字片段。
public TextParagraphBuilder Append(string text)
Parameters
textstringThe text content. / 文字內容。
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。
Append(string, Action<TextRunFormattingBuilder>)
Appends a formatted text run. 新增帶格式的文字片段。
public TextParagraphBuilder Append(string text, Action<TextRunFormattingBuilder> configure)
Parameters
textstringThe text content. / 文字內容。
configureAction<TextRunFormattingBuilder>The format configuration delegate. / 格式設定委派。
Returns
- TextParagraphBuilder
The current builder instance. / 目前 builder 執行個體。