OfficeIMO

API Reference

Class

ParagraphBuilder

Namespace OfficeIMO.Word.Fluent
Assembly OfficeIMO.Word

Builder for paragraphs.

Inheritance

  • Object
  • ParagraphBuilder

Methods

public ParagraphBuilder Align(HorizontalAlignment alignment) #
Returns: ParagraphBuilder

Sets the paragraph alignment.

Parameters

alignment OfficeIMO.HorizontalAlignment requiredposition: 0
Desired alignment.
public ParagraphBuilder Bold(String text) #
Returns: ParagraphBuilder

Appends bold text (Markdown parity helper).

Parameters

text System.String requiredposition: 0
public ParagraphBuilder Border(Action<WordParagraphBorders> configure) #
Returns: ParagraphBuilder

Configures borders for the paragraph.

Parameters

configure System.Action{OfficeIMO.Word.WordParagraphBorders} requiredposition: 0
Callback to configure individual border settings.
public ParagraphBuilder Break(Nullable<BreakValues> breakType = null) #
Returns: ParagraphBuilder

Inserts a break into the paragraph.

Parameters

breakType System.Nullable{DocumentFormat.OpenXml.Wordprocessing.BreakValues} = null optionalposition: 0
Optional break type.
public ParagraphBuilder Code(String text) #
Returns: ParagraphBuilder

Appends inline code using a monospace font (Markdown parity helper).

Parameters

text System.String requiredposition: 0
public ParagraphBuilder Indentation(Nullable<Double> left = null, Nullable<Double> firstLine = null, Nullable<Double> right = null) #
Returns: ParagraphBuilder

Sets indentation values for the paragraph.

Parameters

left System.Nullable{System.Double} = null optionalposition: 0
Left indentation in points.
firstLine System.Nullable{System.Double} = null optionalposition: 1
First-line indentation in points.
right System.Nullable{System.Double} = null optionalposition: 2
Right indentation in points.
public ParagraphBuilder InlineImage(String path, Nullable<Double> widthPx = null, Nullable<Double> heightPx = null, String alt = "") #
Returns: ParagraphBuilder

Inserts an inline image into the paragraph.

Parameters

path System.String requiredposition: 0
Path to the image file.
widthPx System.Nullable{System.Double} = null optionalposition: 1
Optional width in pixels.
heightPx System.Nullable{System.Double} = null optionalposition: 2
Optional height in pixels.
alt System.String = "" optionalposition: 3
Alternative text.
public ParagraphBuilder Italic(String text) #
Returns: ParagraphBuilder

Appends italic text (Markdown parity helper).

Parameters

text System.String requiredposition: 0
public ParagraphBuilder Justify() #
Returns: ParagraphBuilder

Applies justified alignment to the paragraph.

public ParagraphBuilder LineSpacing(Double points) #
Returns: ParagraphBuilder

Sets line spacing for the paragraph.

Parameters

points System.Double requiredposition: 0
Spacing in points.
public ParagraphBuilder Run(String text, Action<TextBuilder> configure = null) #
Returns: ParagraphBuilder

Adds a text run to the paragraph.

Parameters

text System.String requiredposition: 0
Text to add.
configure System.Action{OfficeIMO.Word.Fluent.TextBuilder} = null optionalposition: 1
Optional configuration for the run.
public ParagraphBuilder Shading(Color color) #
Returns: ParagraphBuilder

Applies shading to the paragraph.

Parameters

color SixLabors.ImageSharp.Color requiredposition: 0
Fill color.
public ParagraphBuilder SpacingAfter(Double points) #
Returns: ParagraphBuilder

Sets spacing after the paragraph.

Parameters

points System.Double requiredposition: 0
Spacing in points.
public ParagraphBuilder SpacingBefore(Double points) #
Returns: ParagraphBuilder

Sets spacing before the paragraph.

Parameters

points System.Double requiredposition: 0
Spacing in points.
public ParagraphBuilder Strike(String text) #
Returns: ParagraphBuilder

Appends strikethrough text (Markdown parity helper).

Parameters

text System.String requiredposition: 0
Style 2 overloads
public ParagraphBuilder Style(WordParagraphStyles style) #
Returns: ParagraphBuilder

Applies a built-in style to the paragraph.

Parameters

style OfficeIMO.Word.WordParagraphStyles requiredposition: 0
Built-in style.
public ParagraphBuilder Style(String styleId) #
Returns: ParagraphBuilder

Applies a style by its identifier.

Parameters

styleId System.String requiredposition: 0
Style identifier.
public ParagraphBuilder Tab() #
Returns: ParagraphBuilder

Inserts a tab character.

public ParagraphBuilder Text(String text, Action<TextBuilder> configure = null) #
Returns: ParagraphBuilder

Adds a text run to the paragraph.

Parameters

text System.String requiredposition: 0
Text to add.
configure System.Action{OfficeIMO.Word.Fluent.TextBuilder} = null optionalposition: 1
Optional configuration for the run.
public ParagraphBuilder Underline(String text) #
Returns: ParagraphBuilder

Appends underlined text (Markdown parity helper).

Parameters

text System.String requiredposition: 0

Properties

public WordParagraph Paragraph { get; } #

Gets the underlying paragraph.