resizeToFitText

open fun resizeToFitText(@NonNull freeTextAnnotation: FreeTextAnnotation, @NonNull document: PdfDocument, @NonNull widthScaleMode: FreeTextAnnotationUtils.ScaleMode, @NonNull heightScaleMode: FreeTextAnnotationUtils.ScaleMode)

Resizes the given free text annotation so the text fits inside its bounds.

Parameters

freeTextAnnotation

Free text annotation to resize.

document

Document to use for acquiring the page size.

widthScaleMode

Scale mode to use when determining the width.

heightScaleMode

Scale mode to use when determining the height.