Class TextFitter

java.lang.Object
eu.europa.esig.dss.pdf.visible.TextFitter

public final class TextFitter extends Object
Utility class to fit arbitrary text into a text box.
  • Method Details

    • fitSignatureText

      public static TextFitter.Result fitSignatureText(SignatureImageTextParameters textParameters, float properTextSize, DSSFontMetrics fontMetrics, AnnotationBox textBox)
      Attempts to fit the given text in the given textBox using metrics to estimate the text size. Existing line breaks in text will be maintained.
      Parameters:
      textParameters - SignatureImageTextParameters containing the text to fit
      properTextSize - the computed text size
      fontMetrics - the font metrics to estimate text size
      textBox - the box into which to fit the text
      Returns:
      the fitting operation result