TextFragment
Overview
TextFragment is a interface in Aspose.PDF FOSS for TypeScript.
A positioned text run sharing one font, size, and baseline — the public unit of structured extraction (Page.GetTextFragments).
Properties: angle, bold, fontName, fontSize, italic, quad, and 3 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
text | : string | Read | The fragment’s decoded text (includes any literal space glyphs). |
quad | : [number, number, number, number] | Read | Page-space axis box [x0,y0,x1,y1]: x from the pen span, y baseline..baseline+size. |
fontSize | : number | Read | Effective font size in page units. |
fontName | : string | Read | The producing font’s /BaseFont name, or undefined if the font has none. |
bold | : boolean | Read | True when the producing font declares itself bold / italic (see fontStyleOf, the single owner of that question). |
italic | : boolean | Read | Gets the italic. |
angle | : number | Read | Baseline angle in radians; absent when horizontal. |
vertical | : boolean | Read | True when the run is set vertically (/WMode 1): it reads top-to-bottom within quad, and its column orders right-to-left against its siblings. |
script | : 'sub' | 'super' | Read | Set when this run reads as a sub- or superscript of its own line. |