THPDFHeadlessTextAppearance.TextHeight

Unit: HPDFHeadlessAppearance

property TextHeight: Double read FTextHeight;

Read the final logical line extent in PDF points from a completed plain or rich appearance bundle

The extent starts at the first line's ascent and ends at the last line's descent, using the actual supplied TrueType font metrics and the final line baselines after wrapping

It excludes the top and bottom Padding and excludes an additional trailing line-spacing advance after the final line; intermediate line advances remain part of the extent

For rich text, each line uses the greatest ascent and lowest descent amongst its actual style faces and sizes, and the line advance is the greater of that metric height and the configured LineSpacing advance

For plain multiline text, the final fitted font size and the actual wrapped line count determine the extent; a single line uses its font's ascent minus descent

This is a font-metric layout extent, not a tight painted-glyph bounding box; combining marks, underlines, strikes and other ink may extend beyond the font metrics

The value describes the logical text axes before Rotation; it is not clamped to the appearance rectangle, and an overflowing fixed-size layout can therefore report a larger height than the clip

The property is read-only and remains available until the bundle is destroyed, including after individual objects have been detached

Appearance bundle ownership · TextWidth · Automatic XFA caption measurement