Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfContentBuilder

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

Builds document flow at any supported nesting level. The same receiver is used for document content, page content, rows, columns, containers, components, and deferred content.

Inheritance

  • object
  • PdfContentBuilder

Usage

Explore 84 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 54

Accepted by parameters 30

Methods

AddDeferredTable 2 overloads
public PdfContentBuilder AddDeferredTable(Func<IEnumerable<string[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a deferred simple-text table whose rows are materialized in bounded batches.

Parameters

rowFactory System.Func<System.Collections.Generic.IEnumerable<string[]>> required
batchSize int = 256 optional
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
public PdfContentBuilder AddDeferredTable(Func<IEnumerable<PdfTableCell[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a deferred explicit-cell table whose rows are materialized in bounded batches.

Parameters

rowFactory System.Func<System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]>> required
batchSize int = 256 optional
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
public PdfContentBuilder AddHeading(string text, int level = 1, OfficeAlignment align = Left, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #

Adds a heading at an authored level from 1 through 9.

Parameters

text string required
level int = 1 optional
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
linkUri string? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
AddImage 2 overloads
public PdfContentBuilder AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, string? altText) #

Adds a meaningful image from supported image bytes with alternative text.

Parameters

imageBytes byte[] required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
altText string? required
public PdfContentBuilder AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, OfficeAlignment? align = null, OfficeClipPath? clipPath = null, OfficeImageFit? fit = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfImageStyle? style = null, string? linkUri = null, string? linkContents = null, string? altText = null) #

Adds a raster image supported by OfficeIMO.Drawing. See PdfDocument.AddImage.

Parameters

imageBytes byte[] required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
align OfficeIMO.OfficeAlignment? = null optional
clipPath OfficeIMO.Drawing.OfficeClipPath? = null optional
fit OfficeIMO.Drawing.OfficeImageFit? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfImageStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
altText string? = null optional
AddKeyValueTable 2 overloads
public PdfContentBuilder AddKeyValueTable(IEnumerable<KeyValuePair<string, string?>> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #

Adds a two-column key/value table.

Parameters

rows System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>> required
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
includeHeader bool = false optional
keyHeader string = "Key" optional
valueHeader string = "Value" optional
public PdfContentBuilder AddKeyValueTable(IEnumerable<PdfKeyValueRow> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #

Adds a two-column key/value table with rich row values.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfKeyValueRow> required
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
includeHeader bool = false optional
keyHeader string = "Key" optional
valueHeader string = "Value" optional
AddList 2 overloads
public PdfContentBuilder AddList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #

Adds a bulleted list of plain items.

Parameters

items System.Collections.Generic.IEnumerable<string> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfListStyle? = null optional
public PdfContentBuilder AddList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #

Adds a bulleted list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfListStyle? = null optional
AddNumberedList 2 overloads
public PdfContentBuilder AddNumberedList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #

Adds a numbered list of plain items.

Parameters

items System.Collections.Generic.IEnumerable<string> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
startNumber int = 1 optional
style OfficeIMO.Pdf.PdfListStyle? = null optional
public PdfContentBuilder AddNumberedList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #

Adds a numbered list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
startNumber int = 1 optional
style OfficeIMO.Pdf.PdfListStyle? = null optional
public PdfContentBuilder AddPanelParagraph(Action<PdfParagraph> build, PdfPanelStyle? style = null, OfficeAlignment align = Left, OfficeColor? color = null) #

Adds a paragraph inside a styled panel.

Parameters

build System.Action<OfficeIMO.Pdf.PdfParagraph> required
Paragraph content builder.
style OfficeIMO.Pdf.PdfPanelStyle? = null optional
Panel style (padding, background, border, etc.).
align OfficeIMO.OfficeAlignment = Left optional
Paragraph alignment; Left by default. Start places a paragraph whose first strong character is right-to-left at the right edge.
color OfficeIMO.OfficeColor? = null optional
Optional text colour.
AddParagraph 2 overloads
public PdfContentBuilder AddParagraph(string text, OfficeAlignment align = Start, OfficeColor? color = null, PdfParagraphStyle? style = null) #

Adds a paragraph with one text run. See PdfDocument.AddParagraph.

Parameters

text string required
align OfficeIMO.OfficeAlignment = Start optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfParagraphStyle? = null optional
public PdfContentBuilder AddParagraph(Action<PdfParagraph> build, OfficeAlignment align = Start, OfficeColor? color = null, PdfParagraphStyle? style = null) #

Adds a paragraph built from styled text runs. See PdfDocument.AddParagraph.

Parameters

build System.Action<OfficeIMO.Pdf.PdfParagraph> required
align OfficeIMO.OfficeAlignment = Start optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfParagraphStyle? = null optional
AddTable 4 overloads
public PdfContentBuilder AddTable(IEnumerable<string[]> rows) #

Adds a table of plain text rows with the document table style.

Parameters

rows System.Collections.Generic.IEnumerable<string[]> required
public PdfContentBuilder AddTable(IEnumerable<PdfTableCell[]> rows) #

Adds a table of explicit cells with the document table style.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]> required
public PdfContentBuilder AddTable(IEnumerable<string[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a table of plain text rows.

Parameters

rows System.Collections.Generic.IEnumerable<string[]> required
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
public PdfContentBuilder AddTable(IEnumerable<PdfTableCell[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a table of explicit cells, including spans, links, images, form fields and rich runs.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]> required
align OfficeIMO.OfficeAlignment = Left optional
style OfficeIMO.Pdf.PdfTableStyle? = null optional
public PdfContentBuilder AddTable<T>(IEnumerable<T?> rows, OfficeTableOptions? options = null) #

Adds a table from typed rows. See PdfDocument.AddTable.

Type Parameters

T

Parameters

rows System.Collections.Generic.IEnumerable<T?> required
options OfficeIMO.OfficeTableOptions? = null optional
public PdfContentBuilder Bookmark(string name) #

Adds a named bookmark at the current flow position.

Parameters

name string required
public PdfContentBuilder Canvas(Action<PdfPageCanvas> build) #

Adds page-canvas drawing commands to the current flow.

Parameters

build System.Action<OfficeIMO.Pdf.PdfPageCanvas> required
public PdfContentBuilder CheckBox(string name, bool isChecked = false, OfficeLength? size = null, OfficeAlignment align = Left, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, string checkedValueName = "Yes", PdfFormFieldStyle? style = null) #

Adds a simple AcroForm check box at the current flow position.

Parameters

name string required
isChecked bool = false optional
size OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment = Left optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
checkedValueName string = "Yes" optional
style OfficeIMO.Pdf.PdfFormFieldStyle? = null optional
public PdfContentBuilder ChoiceField(string name, IEnumerable<string> options, string? value = null, OfficeLength? width = null, OfficeLength? height = null, OfficeAlignment align = Left, OfficeLength? fontSize = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, bool isComboBox = true, PdfFormFieldStyle? style = null) #

Adds a simple AcroForm choice field at the current flow position.

Parameters

name string required
options System.Collections.Generic.IEnumerable<string> required
value string? = null optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment = Left optional
fontSize OfficeIMO.OfficeLength? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
isComboBox bool = true optional
style OfficeIMO.Pdf.PdfFormFieldStyle? = null optional
public PdfContentBuilder Column(Action<PdfContentBuilder> build) #

Adds a vertical content sequence using this same universal receiver.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
public PdfContentBuilder ColumnBreak() #

Advances automatic multi-column flow to the next column.

public PdfContentBuilder Columns(Action<PdfContentBuilder> build, PdfMultiColumnOptions? options = null) #

Flows common block content across equal-width columns in reading order.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
options OfficeIMO.Pdf.PdfMultiColumnOptions? = null optional
Component 2 overloads
public PdfContentBuilder Component(IPdfComponent component, PdfFlowOptions? options = null, PdfLayoutPositionCapture? capture = null) #

Adds a reusable typed component through the canonical flow engine.

Parameters

component OfficeIMO.Pdf.IPdfComponent required
options OfficeIMO.Pdf.PdfFlowOptions? = null optional
capture OfficeIMO.Pdf.PdfLayoutPositionCapture? = null optional
public PdfContentBuilder Component(IPdfContextComponent component, PdfFlowOptions? options = null, PdfLayoutPositionCapture? capture = null) #

Adds a reusable page-aware component through the canonical deferred-flow engine.

Parameters

component OfficeIMO.Pdf.IPdfContextComponent required
options OfficeIMO.Pdf.PdfFlowOptions? = null optional
capture OfficeIMO.Pdf.PdfLayoutPositionCapture? = null optional
public PdfContentBuilder Deferred(Func<PdfFlowContext, Action<PdfContentBuilder>> build, PdfFlowOptions? options = null, PdfLayoutPositionCapture? capture = null) #

Adds replayable content materialized from the live page context during layout.

Parameters

build System.Func<OfficeIMO.Pdf.PdfFlowContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>> required
options OfficeIMO.Pdf.PdfFlowOptions? = null optional
capture OfficeIMO.Pdf.PdfLayoutPositionCapture? = null optional
public PdfFootnoteDefinition DefineFootnote(Action<PdfContentBuilder> build, PdfFootnoteOptions? options = null) #

Captures reusable footnote flow without inserting it into the body. Associate its handle with a styled text run.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
Static paragraphs, lists, panels, supported eager inline tables, images, rules, and spacers forming the footnote.
options OfficeIMO.Pdf.PdfFootnoteOptions? = null optional
Placement and optional separator flow, snapshotted during this call.

Returns

PdfFootnoteDefinition An immutable handle belonging to this document.
public PdfContentBuilder Drawing(OfficeDrawing drawing, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a shared OfficeIMO.Drawing scene.

Parameters

drawing OfficeIMO.Drawing.OfficeDrawing required
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder Element(Action<PdfElementBuilder> build) #

Builds a visual and semantic envelope around nested flow content.

Parameters

build System.Action<OfficeIMO.Pdf.PdfElementBuilder> required
Element layout, semantics, and content configuration.
public PdfContentBuilder Ellipse(OfficeLength width, OfficeLength height, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeColor? fillColor = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds an ellipse vector shape.

Parameters

width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder Flow(Action<PdfContentBuilder> build, PdfFlowOptions? options = null, PdfLayoutPositionCapture? capture = null) #

Adds a nested flow group with optional constraints and position capture.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
options OfficeIMO.Pdf.PdfFlowOptions? = null optional
capture OfficeIMO.Pdf.PdfLayoutPositionCapture? = null optional
public PdfContentBuilder FreeTextAnnotation(string contents, OfficeLength width, OfficeLength height, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeLength? fontSize = null, OfficeColor? textColor = null, OfficeColor? borderColor = null, OfficeLength? borderWidth = null, OfficeColor? fillColor = null, OfficeAlignment textAlign = Left, OfficeLength? padding = null, OfficeLength? lineHeight = null) #

Adds a PDF free-text annotation at the current flow position.

Parameters

contents string required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
fontSize OfficeIMO.OfficeLength? = null optional
textColor OfficeIMO.OfficeColor? = null optional
borderColor OfficeIMO.OfficeColor? = null optional
borderWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
textAlign OfficeIMO.OfficeAlignment = Left optional
padding OfficeIMO.OfficeLength? = null optional
lineHeight OfficeIMO.OfficeLength? = null optional
H1 2 overloads
public PdfContentBuilder H1(string text, PdfHeadingStyle? style = null, string? linkUri = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H1 heading.

Parameters

text string required
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
public PdfContentBuilder H1(string text, OfficeAlignment align, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H1 heading with explicit alignment and color.

Parameters

text string required
align OfficeIMO.OfficeAlignment required
color OfficeIMO.OfficeColor? = null optional
linkUri string? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
H2 2 overloads
public PdfContentBuilder H2(string text, PdfHeadingStyle? style = null, string? linkUri = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H2 heading.

Parameters

text string required
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
public PdfContentBuilder H2(string text, OfficeAlignment align, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H2 heading with explicit alignment and color.

Parameters

text string required
align OfficeIMO.OfficeAlignment required
color OfficeIMO.OfficeColor? = null optional
linkUri string? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
H3 2 overloads
public PdfContentBuilder H3(string text, PdfHeadingStyle? style = null, string? linkUri = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H3 heading.

Parameters

text string required
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
public PdfContentBuilder H3(string text, OfficeAlignment align, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #

Adds an H3 heading with explicit alignment and color.

Parameters

text string required
align OfficeIMO.OfficeAlignment required
color OfficeIMO.OfficeColor? = null optional
linkUri string? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional
public PdfContentBuilder HighlightAnnotation(string contents, OfficeLength width, OfficeLength height, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeColor? color = null) #

Adds a PDF highlight annotation rectangle at the current flow position.

Parameters

contents string required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
color OfficeIMO.OfficeColor? = null optional
public PdfContentBuilder HR(OfficeLength? thickness = null, OfficeColor? color = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfHorizontalRuleStyle? style = null) #

Adds a horizontal rule.

Parameters

thickness OfficeIMO.OfficeLength? = null optional
Line thickness (pt).
color OfficeIMO.OfficeColor? = null optional
Optional color; inherited from the current default rule style when omitted.
spacingBefore OfficeIMO.OfficeLength? = null optional
Top spacing (pt), inherited from the current default rule style when omitted.
spacingAfter OfficeIMO.OfficeLength? = null optional
Bottom spacing (pt), inherited from the current default rule style when omitted.
style OfficeIMO.Pdf.PdfHorizontalRuleStyle? = null optional
Optional reusable rule style.
Item 2 overloads
public PdfContentBuilder Item() #

Returns this content receiver for readable grouping in fluent chains.

public PdfContentBuilder Item(Action<PdfContentBuilder> build) #

Adds a logical group of content without introducing layout behavior.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
public PdfContentBuilder Layer(string name, Action<PdfContentBuilder> build, PdfLayerOptions? options = null) #

Adds flow content controlled by a generated optional-content layer.

Parameters

name string required
build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
options OfficeIMO.Pdf.PdfLayerOptions? = null optional
public PdfContentBuilder Line(OfficeLength x1, OfficeLength y1, OfficeLength x2, OfficeLength y2, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a line vector shape.

Parameters

x1 OfficeIMO.OfficeLength required
y1 OfficeIMO.OfficeLength required
x2 OfficeIMO.OfficeLength required
y2 OfficeIMO.OfficeLength required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder MultiSelectChoiceField(string name, IEnumerable<string> options, IEnumerable<string>? values = null, OfficeLength? width = null, OfficeLength? height = null, OfficeAlignment align = Left, OfficeLength? fontSize = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfFormFieldStyle? style = null) #

Adds a simple AcroForm multi-select choice field at the current flow position.

Parameters

name string required
options System.Collections.Generic.IEnumerable<string> required
values System.Collections.Generic.IEnumerable<string>? = null optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment = Left optional
fontSize OfficeIMO.OfficeLength? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfFormFieldStyle? = null optional
PageBreak 2 overloads
public PdfContentBuilder PageBreak() #

Starts a new page.

public PdfContentBuilder PageBreak(bool preserveEmptyPage) #

Starts a new page, optionally preserving an empty current page for consecutive explicit breaks.

Parameters

preserveEmptyPage bool required
public PdfContentBuilder Panel(Action<PdfContentBuilder> build, PdfPanelStyle? style = null) #

Adds a styled element while preserving its paragraphs, tables, links, and semantic structure.

Parameters

build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
Panel content builder.
style OfficeIMO.Pdf.PdfPanelStyle? = null optional
Panel style (padding, background, border, etc.).
public PdfContentBuilder Path(IEnumerable<OfficePathCommand> commands, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeColor? fillColor = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a freeform path vector shape.

Parameters

commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder Polygon(IEnumerable<OfficePoint> points, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeColor? fillColor = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a polygon vector shape.

Parameters

points System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePoint> required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder RadioButtonGroup(string name, IEnumerable<string> options, string? value = null, OfficeLength? size = null, OfficeLength? gap = null, OfficeAlignment align = Left, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfFormFieldStyle? style = null) #

Adds a simple AcroForm radio button group at the current flow position.

Parameters

name string required
options System.Collections.Generic.IEnumerable<string> required
value string? = null optional
size OfficeIMO.OfficeLength? = null optional
gap OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment = Left optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfFormFieldStyle? = null optional
public PdfContentBuilder Rectangle(OfficeLength width, OfficeLength height, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeColor? fillColor = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a rectangle vector shape.

Parameters

width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder RoundedRectangle(OfficeLength width, OfficeLength height, OfficeLength cornerRadius, OfficeColor? strokeColor = null, OfficeLength? strokeWidth = null, OfficeColor? fillColor = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, OfficeStrokeDashStyle strokeDashStyle = Solid, OfficeStrokeLineCap? strokeLineCap = null, OfficeStrokeLineJoin? strokeLineJoin = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a rounded rectangle vector shape.

Parameters

width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
cornerRadius OfficeIMO.OfficeLength required
strokeColor OfficeIMO.OfficeColor? = null optional
strokeWidth OfficeIMO.OfficeLength? = null optional
fillColor OfficeIMO.OfficeColor? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
strokeDashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optional
strokeLineCap OfficeIMO.Drawing.OfficeStrokeLineCap? = null optional
strokeLineJoin OfficeIMO.Drawing.OfficeStrokeLineJoin? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder Row(Action<PdfRowBuilder> build) #

Adds a row whose columns can use relative, fixed, automatic, or percentage sizing.

Parameters

build System.Action<OfficeIMO.Pdf.PdfRowBuilder> required
public PdfContentBuilder Section(string title, Action<PdfContentBuilder> build, PdfSectionOptions? options = null) #

Adds a semantic section backed by an outline entry and named destination.

Parameters

title string required
build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
options OfficeIMO.Pdf.PdfSectionOptions? = null optional
public PdfContentBuilder Semantic(PdfSemanticRole role, Action<PdfContentBuilder> build, string? alternativeText = null) #

Groups content under an explicit tagged-PDF semantic role without changing its visual layout.

Parameters

role OfficeIMO.Pdf.PdfSemanticRole required
build System.Action<OfficeIMO.Pdf.PdfContentBuilder> required
alternativeText string? = null optional
public PdfContentBuilder Shape(OfficeShape shape, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfDrawingStyle? style = null, string? linkUri = null, string? linkContents = null) #

Adds a shared OfficeIMO.Drawing shape.

Parameters

shape OfficeIMO.Drawing.OfficeShape required
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfDrawingStyle? = null optional
linkUri string? = null optional
linkContents string? = null optional
public PdfContentBuilder Spacer(OfficeLength height) #

Adds invisible vertical space to the current flow.

Parameters

height OfficeIMO.OfficeLength required
public PdfContentBuilder Subtitle(string text, OfficeAlignment align = Left, OfficeColor? color = null) #

Adds a subtitle paragraph in the theme accent colour.

Parameters

text string required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
public PdfContentBuilder TableOfContents(PdfTableOfContentsOptions? options = null) #

Adds an automatically generated, internally linked table of contents.

Parameters

options OfficeIMO.Pdf.PdfTableOfContentsOptions? = null optional
public PdfContentBuilder TextAnnotation(string contents, OfficeLength? width = null, OfficeLength? height = null, OfficeAlignment? align = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfTextAnnotationIcon icon = Comment, OfficeColor? color = null, bool open = false) #

Adds a PDF text annotation at the current flow position.

Parameters

contents string required
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
align OfficeIMO.OfficeAlignment? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
icon OfficeIMO.Pdf.PdfTextAnnotationIcon = Comment optional
color OfficeIMO.OfficeColor? = null optional
open bool = false optional
public PdfContentBuilder TextField(string name, OfficeLength? width = null, OfficeLength? height = null, string value = "", OfficeAlignment align = Left, OfficeLength? fontSize = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfFormFieldStyle? style = null) #

Adds a simple AcroForm text field at the current flow position.

Parameters

name string required
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
value string = "" optional
align OfficeIMO.OfficeAlignment = Left optional
fontSize OfficeIMO.OfficeLength? = null optional
spacingBefore OfficeIMO.OfficeLength? = null optional
spacingAfter OfficeIMO.OfficeLength? = null optional
style OfficeIMO.Pdf.PdfFormFieldStyle? = null optional
public PdfContentBuilder Title(string text, OfficeAlignment align = Left, OfficeColor? color = null, PdfHeadingStyle? style = null) #

Adds a document title above the heading hierarchy. It uses the theme title size and stays out of the generated outline.

Parameters

text string required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional