# PdfParagraphStyleFluent

The fluent methods of PdfParagraphStyle, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Modifiers**

static

The fluent methods of [PdfParagraphStyle](/api/pdf/officeimo-pdf-pdfparagraphstyle/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- PdfParagraphStyleFluent

Filter members 

Show inherited

## Methods

`public static TSelf DefaultTabStopWidth<TSelf>(TSelf pdfParagraphStyle, OfficeLength? value)` [#](#method-defaulttabstopwidth-nullable-officeimo-officelength)

Sets [PdfParagraphStyle.DefaultTabStopWidth](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical default paragraph tab-stop width. When null the writer uses the Word-compatible half-inch default.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                   // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { DefaultTabStopWidth = value };    pdfParagraphStyle.DefaultTabStopWidth(value);
```

`public static TSelf FirstLineIndent<TSelf>(TSelf pdfParagraphStyle, OfficeLength value)` [#](#method-firstlineindent-officeimo-officelength)

Sets [PdfParagraphStyle.FirstLineIndent](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical additional indent for the first line. Negative values create a hanging indent relative to [PdfParagraphStyle.LeftIndent](/api/pdf/officeimo-pdf-pdfparagraphstyle/).

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { FirstLineIndent = value };    pdfParagraphStyle.FirstLineIndent(value);
```

`public static TSelf FontSize<TSelf>(TSelf pdfParagraphStyle, OfficeLength? value)` [#](#method-fontsize-nullable-officeimo-officelength)

Sets [PdfParagraphStyle.FontSize](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical fallback font size and empty-line font size. When null the writer uses the current default font size.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { FontSize = value };    pdfParagraphStyle.FontSize(value);
```

`public static TSelf JustificationMode<TSelf>(TSelf pdfParagraphStyle, PdfJustificationMode value)` [#](#method-justificationmode-officeimo-pdf-pdfjustificationmode)

Sets [PdfParagraphStyle.JustificationMode](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Expandable boundaries when the paragraph uses OfficeAlignment.Justify. The default expands word separators.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.Pdf.PdfJustificationMode required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { JustificationMode = value };    pdfParagraphStyle.JustificationMode(value);
```

`public static TSelf JustifyExplicitLineBreaks<TSelf>(TSelf pdfParagraphStyle, bool value = true)` [#](#method-justifyexplicitlinebreaks-boolean)

Sets [PdfParagraphStyle.JustifyExplicitLineBreaks](/api/pdf/officeimo-pdf-pdfparagraphstyle/): When true, a justified paragraph also expands lines ending with an explicit line break. The default retains natural spacing on those lines.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                         // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { JustifyExplicitLineBreaks = value };    pdfParagraphStyle.JustifyExplicitLineBreaks(value);
```

`public static TSelf JustifyLastLine<TSelf>(TSelf pdfParagraphStyle, bool value = true)` [#](#method-justifylastline-boolean)

Sets [PdfParagraphStyle.JustifyLastLine](/api/pdf/officeimo-pdf-pdfparagraphstyle/): When true, a justified paragraph also expands its final line. The default retains natural spacing on that line.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { JustifyLastLine = value };    pdfParagraphStyle.JustifyLastLine(value);
```

`public static TSelf KeepTogether<TSelf>(TSelf pdfParagraphStyle, bool value = true)` [#](#method-keeptogether-boolean)

Sets [PdfParagraphStyle.KeepTogether](/api/pdf/officeimo-pdf-pdfparagraphstyle/): When true, the paragraph starts on a new page instead of splitting across pages.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { KeepTogether = value };    pdfParagraphStyle.KeepTogether(value);
```

`public static TSelf KeepWithNext<TSelf>(TSelf pdfParagraphStyle, bool value = true)` [#](#method-keepwithnext-boolean)

Sets [PdfParagraphStyle.KeepWithNext](/api/pdf/officeimo-pdf-pdfparagraphstyle/): When true, the paragraph moves to the next page when it would otherwise be separated from the following paragraph.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { KeepWithNext = value };    pdfParagraphStyle.KeepWithNext(value);
```

`public static TSelf LeftIndent<TSelf>(TSelf pdfParagraphStyle, OfficeLength value)` [#](#method-leftindent-officeimo-officelength)

Sets [PdfParagraphStyle.LeftIndent](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical offset from the left edge of the paragraph frame. Negative values extend text into the left margin.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { LeftIndent = value };    pdfParagraphStyle.LeftIndent(value);
```

`public static TSelf LineHeight<TSelf>(TSelf pdfParagraphStyle, double? value)` [#](#method-lineheight-nullable-system-double)

Sets [PdfParagraphStyle.LineHeight](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Line advance multiplier relative to the paragraph font size. Used when [PdfParagraphStyle.LineSpacing](/api/pdf/officeimo-pdf-pdfparagraphstyle/) is null. When null the writer uses the default line height.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value double? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                          // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { LineHeight = value };    pdfParagraphStyle.LineHeight(value);
```

`public static TSelf LineSpacing<TSelf>(TSelf pdfParagraphStyle, PdfLineSpacing? value)` [#](#method-linespacing-officeimo-pdf-pdflinespacing)

Sets [PdfParagraphStyle.LineSpacing](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Explicit line spacing. When set, this overrides [PdfParagraphStyle.LineHeight](/api/pdf/officeimo-pdf-pdfparagraphstyle/).

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.Pdf.PdfLineSpacing? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { LineSpacing = value };    pdfParagraphStyle.LineSpacing(value);
```

`public static TSelf MinimumOrphanLines<TSelf>(TSelf pdfParagraphStyle, int value)` [#](#method-minimumorphanlines-int32)

Sets [PdfParagraphStyle.MinimumOrphanLines](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Minimum number of paragraph lines kept at the bottom of a page when the paragraph splits. Zero uses the two-line default when [PdfParagraphStyle.WidowControl](/api/pdf/officeimo-pdf-pdfparagraphstyle/) is enabled, or disables this constraint otherwise.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value int required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                  // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { MinimumOrphanLines = value };    pdfParagraphStyle.MinimumOrphanLines(value);
```

`public static TSelf MinimumWidowLines<TSelf>(TSelf pdfParagraphStyle, int value)` [#](#method-minimumwidowlines-int32)

Sets [PdfParagraphStyle.MinimumWidowLines](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Minimum number of paragraph lines carried to the top of the following page when the paragraph splits. Zero uses the two-line default when [PdfParagraphStyle.WidowControl](/api/pdf/officeimo-pdf-pdfparagraphstyle/) is enabled, or disables this constraint otherwise.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value int required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { MinimumWidowLines = value };    pdfParagraphStyle.MinimumWidowLines(value);
```

`public static TSelf RightIndent<TSelf>(TSelf pdfParagraphStyle, OfficeLength value)` [#](#method-rightindent-officeimo-officelength)

Sets [PdfParagraphStyle.RightIndent](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical offset from the right edge of the paragraph frame. Negative values extend text into the right margin.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { RightIndent = value };    pdfParagraphStyle.RightIndent(value);
```

`public static TSelf SpacingAfter<TSelf>(TSelf pdfParagraphStyle, OfficeLength? value)` [#](#method-spacingafter-nullable-officeimo-officelength)

Sets [PdfParagraphStyle.SpacingAfter](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical space after the paragraph. When null the writer uses the default paragraph spacing.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { SpacingAfter = value };    pdfParagraphStyle.SpacingAfter(value);
```

`public static TSelf SpacingBefore<TSelf>(TSelf pdfParagraphStyle, OfficeLength value)` [#](#method-spacingbefore-officeimo-officelength)

Sets [PdfParagraphStyle.SpacingBefore](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Physical space before the paragraph.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.OfficeLength required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                             // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { SpacingBefore = value };    pdfParagraphStyle.SpacingBefore(value);
```

`public static TSelf TabStops<TSelf>(TSelf pdfParagraphStyle, IEnumerable<PdfTabStop> items)` [#](#method-tabstops-collections-generic-ienumerable-officeimo-pdf-pdftabstop)

Adds items to [PdfParagraphStyle.TabStops](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Explicit physical paragraph tab stops relative to the paragraph text frame.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTabStop> required**

The items, in order.

Returns

`TSelf` The same instance.

`public static TSelf TabStop<TSelf>(TSelf pdfParagraphStyle, PdfTabStop item)` [#](#method-tabstop-officeimo-pdf-pdftabstop)

Adds an item to [PdfParagraphStyle.TabStops](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Explicit physical paragraph tab stops relative to the paragraph text frame.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**item OfficeIMO.Pdf.PdfTabStop required**

The item.

Returns

`TSelf` The same instance.

`public static TSelf TextWhitespaceMode<TSelf>(TSelf pdfParagraphStyle, PdfTextWhitespaceMode? value)` [#](#method-textwhitespacemode-nullable-officeimo-pdf-pdftextwhitespacemode)

Sets [PdfParagraphStyle.TextWhitespaceMode](/api/pdf/officeimo-pdf-pdfparagraphstyle/): Overrides document whitespace handling for this paragraph. Null uses the document setting.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value OfficeIMO.Pdf.PdfTextWhitespaceMode? required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                  // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { TextWhitespaceMode = value };    pdfParagraphStyle.TextWhitespaceMode(value);
```

`public static TSelf WidowControl<TSelf>(TSelf pdfParagraphStyle, bool value = true)` [#](#method-widowcontrol-boolean)

Sets [PdfParagraphStyle.WidowControl](/api/pdf/officeimo-pdf-pdfparagraphstyle/): When true, paragraph page splits avoid single-line widows and orphans where the page frame allows it.

Type Parameters

**TSelf**

Parameters

**pdfParagraphStyle TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Pdf.PdfParagraphStyle { WidowControl = value };    pdfParagraphStyle.WidowControl(value);
```

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:77586893CD52D30A86E3260311FA4731A4D2C79077DC7EFFCC4FBE13C1D37A7A -->
