TextSegment

Overview

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

A single segment within a TextFragment.

This class provides 3 methods for working with TextSegment objects in .NET programs. Available methods include: MyHtmlEncode, TextSegment. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BaselinePosition, Characters, EndCharIndex, Hyperlink, PhysicalSegment, Position, and 5 more.

Properties

NameTypeAccessDescription
TextstringRead/WriteThe text of this segment.
PositionPosition?Read/WriteThe position of this segment on the page.
BaselinePositionPosition?Read/WriteGets or sets the baseline position.
TextStateTextStateRead/WriteThe text state (font, size, colour, etc.) for this segment.
StartCharIndexintReadThe starting character index of this segment within the source text run on the page.
EndCharIndexintReadThe ending character index of this segment within the source text run on the page.
RectangleRectangle?ReadThe bounding rectangle of this segment.
CharactersCharInfoCollectionReadPer-character layout information for this segment: one CharInfo per character, in text order, populated when the segment is produced by a text absorber.
HyperlinkHyperlink?Read/WriteOptional hyperlink associated with this segment.
TextEditOptionsTextEditOptionsRead/WriteEdit options applied during text replacement / font substitution.
PhysicalSegmentPhysicalTextSegmentReadPhysical (page-space) view of this segment: exposes its on-page start X via TextState.TextXIndent and per-range advance measurement via MeasureSegment(int, int, bool).

Methods

SignatureDescription
TextSegment()Calls TextSegment on this TextSegment instance.
TextSegment(text: string)Calls TextSegment(text) on this TextSegment instance.
MyHtmlEncode(value: string)HTML-encode a string by replacing &, <, >, ", and ' with their entity references.

See Also

 English