Package eu.europa.esig.dss.pdf.visible
Class TextFitter
java.lang.Object
eu.europa.esig.dss.pdf.visible.TextFitter
Utility class to fit arbitrary text into a text box.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe result of a text fitting operation. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextFitter.ResultfitSignatureText(SignatureImageTextParameters textParameters, float properTextSize, DSSFontMetrics fontMetrics, AnnotationBox textBox) Attempts to fit the giventextin the giventextBoxusingmetricsto estimate the text size.
-
Method Details
-
fitSignatureText
public static TextFitter.Result fitSignatureText(SignatureImageTextParameters textParameters, float properTextSize, DSSFontMetrics fontMetrics, AnnotationBox textBox) Attempts to fit the giventextin the giventextBoxusingmetricsto estimate the text size. Existing line breaks intextwill be maintained.- Parameters:
textParameters-SignatureImageTextParameterscontaining 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
-