Table of Contents

Class TextSegment

Namespace
PdfEngine.Text
Assembly
PdfEngine.Abstractions.dll

A granular text segment with character/word bounds and normalized coordinates.

public record TextSegment : IEquatable<TextSegment>
Inheritance
TextSegment
Implements
Inherited Members

Properties

Bounds

The bounds as one rectangle in the same normalized coordinates.

public PdfRect Bounds { get; }

Property Value

PdfRect

FontName

The font name, or an empty string when the engine does not report it.

public string FontName { get; init; }

Property Value

string

FontSize

The approximate font size in points.

public double FontSize { get; init; }

Property Value

double

Height

The height, as a fraction of the displayed page height.

public double Height { get; init; }

Property Value

double

Length

The number of characters.

public int Length { get; init; }

Property Value

int

PageNumber

The page number, starting at 1.

public int PageNumber { get; init; }

Property Value

int

StartIndex

The index of the first character in the page's character list.

public int StartIndex { get; init; }

Property Value

int

Text

The text of the segment (one word for the vector engine).

public string Text { get; init; }

Property Value

string

Width

The width, as a fraction of the displayed page width.

public double Width { get; init; }

Property Value

double

X

The left edge, as a fraction of the displayed page width (0 to 1, from the left).

public double X { get; init; }

Property Value

double

Y

The top edge, as a fraction of the displayed page height (0 to 1, from the top).

public double Y { get; init; }

Property Value

double