Package eu.europa.esig.dss.pdf.visible
Class TextFitter
java.lang.Object
eu.europa.esig.dss.pdf.visible.TextFitter
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The result of a text fitting operation. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextFitter.Result
fitSignatureText
(SignatureImageTextParameters textParameters, float properTextSize, DSSFontMetrics fontMetrics, AnnotationBox textBox) Attempts to fit the giventext
in the giventextBox
usingmetrics
to estimate the text size.
-
Method Details
-
fitSignatureText
public static TextFitter.Result fitSignatureText(SignatureImageTextParameters textParameters, float properTextSize, DSSFontMetrics fontMetrics, AnnotationBox textBox) Attempts to fit the giventext
in the giventextBox
usingmetrics
to estimate the text size. Existing line breaks intext
will be maintained.- Parameters:
textParameters
-SignatureImageTextParameters
containing the text to fitproperTextSize
- the computed text sizefontMetrics
- the font metrics to estimate text sizetextBox
- the box into which to fit the text- Returns:
- the fitting operation result
-