PDFTextRun¶
Namespace: O2S.Components.PDF4NET.Content
Defines a fragment of text displayed on a PDF page.
Inheritance Object → PDFTextRun
Remarks
A text fragment is defined by a single 'show text' PDF operator. All the glyphs in a text fragment share the same graphic attributes.
Properties¶
Brush¶
Gets the brush used for filling the text interior.
Property Value
PDFBrush
The brush used to fill the text interior.
Corners¶
Gets the coordinates of the text fragment corners.
Property Value
PDFPoint[]
The coordinates on the page of the text fragment's corners.
Remarks
The order of the corners in the array is the following: lower left, lower right, upper right, upper left. These corners match the text baseline for the lower corners. The PDFTextRun.TypographicCorners property considers the font's Descent for the lower corners.
DisplayBounds¶
Gets the bounds of the text fragment.
Property Value
PDFDisplayRectangle
The bounding rectangle of the text fragment in visual coordinates.
Remarks
These bounds are based on the PDFTextRun.Corners property.
FontMetrics¶
Gets the font metrics.
Property Value
PDFFontMetrics
The metrics of the font used for displaying the text fragment.
FontSize¶
Gets the font size.
Property Value
Double
The size of the font used to draw the text on the page.
FriendlyFontName¶
Gets the friendly font name.
Property Value
String
The friendly name of the font used to draw the text on the page.
Glyphs¶
Gets the collection of glyphs that compose this fragment.
Property Value
PDFTextGlyphCollection
The glyphs included in this text fragment.
MarkedContentIdentifier¶
Gets the marked content identifier.
Property Value
Int32
An integer representing the id of the marked content sequence this text fragment object belongs to.
Remarks
A negative value means the text fragment does not belong to a marked content sequence.
Pen¶
Gets the pen used for stroking the text outline.
Property Value
PDFPen
The pen used to stroke the text outline.
PostScriptFontName¶
Gets the PostScript font name.
Property Value
String
The PostScript name of the font used to draw the text on the page.
StructureElement¶
Gets the structure element that includes this visual object.
Property Value
PDFStructureElement
A PDFStructureElement object that includes this visual object.
Text¶
Gets the text included in the fragment.
Property Value
String
The text displayed on the page.
TransformedFontSize¶
Gets the transformed font size.
Property Value
Double
The actual size of the font used to draw the text on the page,
it is the PDFTextRun.FontSize transformed by current text matrix.
TypographicCorners¶
Gets the typographic coordinates of the text fragment corners.
Property Value
PDFPoint[]
The typographic coordinates on the page of the text fragment's corners.
Remarks
The order of the corners in the array is the following: lower left, lower right, upper right, upper left. The typographic corners consider the font's Descent for the lower corners. The PDFTextRun.Corners property considers the text baseline for the lower corners.
TypographicDisplayBounds¶
Gets the typographic bounds of the text fragment.
Property Value
PDFDisplayRectangle
The typographic bounding rectangle of the text fragment in visual coordinates.
Remarks
These bounds are based on the PDFTextRun.TypographicCorners property.
Methods¶
ExtractTextFragment(Int32, Int32)¶
Extracts a text fragment from the current fragment starting at the specified position with the given length.
Parameters
start Int32
length Int32
Returns
GetEmbeddedFontData()¶
Gets the embedded font data.
Returns
Byte[]
The embedded font data as a byte array if the font is embedded in the PDF file.
ToString()¶
Gets the text fragment as string.
Returns
String
The text fragment as string.