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 declares 10 methods for TextParagraph objects in .NET programs. Available methods include: AppendLine, BeginEdit, EndEdit, TextParagraph. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BackgroundColor, FirstLineIndent, FormattingOptions, HorizontalAlignment, HyphenSymbol, Justify, and 10 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.
RemainingLinesTextFragmentCollectionReadThe wrapped lines that did not fit in the rectangle when LimitWithBounds cut the paragraph, each as a fragment ready to be appended to a paragraph on the next page.
BackgroundColorColor?Read/WriteBackground colour painted behind the whole paragraph block: one rectangle the height of the block, as wide as the widest line plus BackgroundPad (or the content width when a line overflows), seated at the block’s bottom-left.
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.
HyphenSymbolstringRead/WriteThe symbol a hyphenating wrap writes at the break.
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
TextParagraph()Creates an empty paragraph with no lines.
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

 English