Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfParagraph

OfficeIMO.Pdf

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

A paragraph of styled text runs in the document flow. The paragraph stays editable until the document is laid out: runs added or formatted later are rendered.

Inheritance

  • object
  • PdfParagraph

Usage

Explore 6 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.

Accepted by parameters 3

Methods

public PdfParagraph AddFallbackText(PdfEmbeddedFontFallbackSet fallbackSet, string text, string source = "") #

Appends text planned through an embedded-font fallback set, formatted from PdfParagraph.RunDefaults.

Parameters

fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet required
text string required
source string = "" optional
public PdfTextRun AddInline(PdfInlineElement element) #

Appends an inline visual; flexible rules take their typography from PdfParagraph.RunDefaults.

Parameters

element OfficeIMO.Pdf.PdfInlineElement required

Returns

PdfTextRun
public PdfTextRun AddInlineBox(OfficeLength width, OfficeLength height, OfficeColor? background = null, OfficeColor? borderColor = null, OfficeLength? borderWidth = null, string? altText = null, OfficeLength? baselineOffset = null) #

Appends a filled and/or bordered box that participates in paragraph wrapping.

Parameters

width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
background OfficeIMO.OfficeColor? = null optional
borderColor OfficeIMO.OfficeColor? = null optional
borderWidth OfficeIMO.OfficeLength? = null optional
altText string? = null optional
baselineOffset OfficeIMO.OfficeLength? = null optional

Returns

PdfTextRun
public PdfTextRun AddInlineImage(byte[] imageBytes, OfficeLength width, OfficeLength height, string? altText = null, OfficeImageFit fit = Contain, OfficeLength? baselineOffset = null) #

Appends an image that participates in paragraph wrapping.

Parameters

imageBytes byte[] required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
altText string? = null optional
fit OfficeIMO.Drawing.OfficeImageFit = Contain optional
baselineOffset OfficeIMO.OfficeLength? = null optional

Returns

PdfTextRun
public PdfTextRun AddLineBreak() #

Appends an explicit line break formatted from PdfParagraph.RunDefaults.

Returns

PdfTextRun
public PdfParagraph AddRuns(IEnumerable<PdfTextRun> runs) #

Appends prepared runs as they are, keeping their own formatting and font selections.

Parameters

runs System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTextRun> required
public PdfTextRun AddTab(PdfTabLeaderStyle leader = None, PdfTabAlignment alignment = Left) #

Appends an aligned paragraph tab formatted from PdfParagraph.RunDefaults.

Parameters

leader OfficeIMO.Pdf.PdfTabLeaderStyle = None optional
alignment OfficeIMO.Pdf.PdfTabAlignment = Left optional

Returns

PdfTextRun
public PdfTextRun AddText(string text) #

Appends a text run formatted from PdfParagraph.RunDefaults and returns it.

Parameters

text string required

Returns

PdfTextRun

Properties

public OfficeAlignment Alignment { get; } #

Paragraph alignment.

public PdfTextRunDefaults RunDefaults { get; } #

Formatting copied into each run that this paragraph creates afterwards.

public IReadOnlyList<PdfTextRun> Runs { get; } #

Runs in this paragraph, in reading order.