TextParagraph

TextParagraph

Overview

TextParagraph is a class in Aspose.PDF FOSS for .NET.

Represents a text paragraph that can be placed on a page via AppendParagraph.

This class provides 9 methods for working with TextParagraph objects in .NET programs. Available methods include: AppendLine, BeginEdit, EndEdit. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: FirstLineIndent, FormattingOptions, HorizontalAlignment, Justify, LimitWithBounds, Margin, and 8 more.

Properties

NameTypeAccessDescription
RectangleRectangle?Read/WriteThe bounding rectangle where the paragraph is rendered on the page.
PositionPosition?Read/WriteThe absolute position for the paragraph.
FormattingOptionsTextFormattingOptionsRead/WriteFormatting options for the paragraph, including word wrap mode.
RotationdoubleRead/WriteRotation angle in degrees for the entire paragraph.
RemainingLinesTextFragmentCollectionReadLines that didn’t fit in the paragraph’s rectangle and should be re-rendered on a subsequent page.
updatePositioningCallsintRead/WriteDiagnostic counter incremented whenever the renderer performs a layout-positioning pass for this paragraph.
HorizontalAlignmentHorizontalAlignmentRead/WriteHorizontal alignment of text within the paragraph rectangle.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment of text within the paragraph rectangle.
MarginMarginInfoRead/WriteMargin around the paragraph.
LimitWithBoundsboolRead/WriteWhen true, text is limited to the bounds of the paragraph rectangle.
TextRectangleRectangleReadThe calculated bounding rectangle of the paragraph text.
FirstLineIndentfloatRead/WriteFirst-line indent in points.
SubsequentLinesIndentfloatRead/WriteIndent (points) applied to every line except the first.
JustifyboolRead/WriteWhen true, paragraph lines fill the rectangle width by adjusting word spacing.

Methods

SignatureDescription
BeginEdit()Begin a batched edit window.
EndEdit()End a batched edit window started by BeginEdit.
AppendLine(line: TextFragment)Append a text fragment as a new line in the paragraph.
AppendLine(line: TextFragment, textState: TextState)Append a TextFragment line and override its text state.
AppendLine(line: TextFragment, textState: TextState, lineSpacing: float)Append a TextFragment with text-state override and per-line spacing.
AppendLine(line: string)Append a text string as a new line in the paragraph using default text state.
AppendLine(line: string, textState: TextState)Append a text string with the given text state as a new line.
AppendLine(line: string, textState: TextState, lineSpacing: float)Append a text string with text state and per-line spacing.
AppendLine(line: string, lineSpacing: float)Append a text string with per-line spacing using default text state.

See Also