PdfTextRun class

One run of text from a single show-text operator.

Constructors

PdfTextRun({required String text, required PdfMatrix transform, required PdfColor color, required double width, PdfGradient? gradient, String? fontName, double fontSize = 0, List<PdfGlyphPlacement>? glyphs, bool invisible = false, bool fill = true, PdfColor? strokeColor, double strokeWidth = 0, int? mcid})
const

Properties

color PdfColor
final
fill bool
Whether the glyphs are filled (text rendering modes 0/2/4/6). False for stroke-only modes (1/5) and when a fill that can't be represented (an unrenderable tiling-pattern fill on a substituted font) is dropped in favour of the stroke. color/gradient describe the fill.
final
fontName String?
The /BaseFont name, e.g. ABCDEF+Helvetica-Bold.
final
fontSize double
Nominal font size before transformation, for font selection heuristics.
final
glyphs List<PdfGlyphPlacement>?
Real glyph outlines from the embedded font, when available. Devices should prefer these over substituted text rendering.
final
gradient PdfGradient?
Shading-pattern fill for this run, already resolved into page space.
final
hashCode int
The hash code for this object.
no setterinherited
hasOutlines bool
no setter
invisible bool
Render mode 3 (§9.4.3): the run paints nothing but still occupies its geometry — the OCR text layer of scanned documents. Painting devices must skip it; text extraction wants it like any other run.
final
mcid int?
The marked-content id (/MCID) of the innermost tagged marked-content sequence enclosing this run, or null when the run is untagged. In a Tagged PDF this ties the run to a structure element (§14.7).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeColor PdfColor?
Stroke colour for text rendering modes that stroke the glyph outline (1 stroke, 2 fill+stroke, 5/6 the same plus clip); null when the mode doesn't stroke. Painting devices outline the glyphs in this colour.
final
strokeWidth double
Stroke line width in page space (the current line width mapped through the CTM, like every other stroke); 0 means the thinnest renderable line.
final
text String
Best-effort Unicode (via ToUnicode CMaps or the font's encoding).
final
transform PdfMatrix
Maps em-space (origin at the baseline start, 1.0 = the font size) to page space. Includes font size, horizontal scaling, and rise.
final
width double
Advance width in em units, from the PDF's font metrics. Devices should scale their substituted font's output to match, so columns line up.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited