TextLayoutHelper
Overview
TextLayoutHelper is a class in Aspose.PDF FOSS for Java.
Provides text measurement and word wrapping using PDF standard font metrics.
This class provides 3 methods for working with TextLayoutHelper objects in Java programs.
Available methods include: getLineHeight, measureTextWidth, wrapText.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Methods
| Signature | Description |
|---|---|
measureTextWidth(text: String, fontName: String, fontSize: double) → double | Measures the width of the given text string in user-space units. |
wrapText(text: String, fontName: String, fontSize: double, maxWidth: double) → List<String> | Wraps text into lines that fit within the specified maximum width. |
getLineHeight(fontName: String, fontSize: double) → double | Returns the line height for the given font and size. |