PdfTextGlyph Class

A glyph of the text of a page: its text and where it is painted (see PdfPage.ExtractTextLayout).

public sealed class PdfTextGlyph

Remarks

The coordinates are in the default user space of the page: the space of its media box, in points, with the y axis upward, before the rotation of the page (PdfPage.Rotation).

Properties

NameDescription
AngleGets the direction of the writing, in degrees counterclockwise from the x axis: 0 for horizontal text, -90 for text written vertically from top to bottom.
BoundsGets the smallest rectangle that contains the box of the glyph: from PdfTextGlyph.Origin to PdfTextGlyph.End, and from the descent to the ascent of the font (/Descent and /Ascent of its font descriptor) across the baseline; the box of a glyph written vertically is as wide as the glyph, around its vertical origin.
EndGets the point where the next glyph would be painted: the origin moved by the displacement of the glyph and the character and word spacing.
FontNameGets the PostScript name of the font (/BaseFont), or null.
FontSizeGets the font size of the glyph in user space units: the font size of the text state scaled by the text and transformation matrices.
IsVerticalGets a value indicating whether the font of the glyph is written vertically (/WMode 1).
OriginGets the point where the glyph is painted: the origin of the glyph on the baseline, or its vertical origin for a font written vertically.
TextGets the text of the glyph: the characters its font maps it to, or the replacement text (/ActualText) of the glyphs it stands for.

Gets the direction of the writing, in degrees counterclockwise from the x axis: 0 for horizontal text, -90 for text written vertically from top to bottom.

public double Angle { get; }

Property value

double

Gets the smallest rectangle that contains the box of the glyph: from PdfTextGlyph.Origin to PdfTextGlyph.End, and from the descent to the ascent of the font (/Descent and /Ascent of its font descriptor) across the baseline; the box of a glyph written vertically is as wide as the glyph, around its vertical origin.

public PdfRectangle Bounds { get; }

Property value

PdfRectangle

Gets the point where the next glyph would be painted: the origin moved by the displacement of the glyph and the character and word spacing.

public PdfPoint End { get; }

Property value

PdfPoint

Gets the PostScript name of the font (/BaseFont), or null.

public string? FontName { get; }

Property value

string?

Gets the font size of the glyph in user space units: the font size of the text state scaled by the text and transformation matrices.

public double FontSize { get; }

Property value

double

IsVertical

PdfTextGlyph.cs

Gets a value indicating whether the font of the glyph is written vertically (/WMode 1).

public bool IsVertical { get; }

Property value

bool

Gets the point where the glyph is painted: the origin of the glyph on the baseline, or its vertical origin for a font written vertically.

public PdfPoint Origin { get; }

Property value

PdfPoint

Gets the text of the glyph: the characters its font maps it to, or the replacement text (/ActualText) of the glyphs it stands for.

public string Text { get; }

Property value

string

Methods

NameDescription
ToString()Returns a string that represents the current object.

ToString()

PdfTextGlyph.cs

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.