resizeToFitText

fun FreeTextAnnotation.resizeToFitText(document: PdfDocument, widthScaleMode: ScaleMode, heightScaleMode: ScaleMode)

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

Parameters

document

Document used to acquire the page size.

widthScaleMode

Scale mode to use when determining the width.

heightScaleMode

Scale mode to use when determining the height.