resize To Fit Text
open fun resizeToFitText(@NonNull annotationConfigurationRegistry: AnnotationConfigurationRegistry, @NonNull pageSize: Size)
Resizes the annotation to fit the text. This will update the bounding box of the annotation.
Parameters
annotation Configuration Registry
The annotation configuration registry to use for updating the annotation, can be retrieved by PdfFragment.getAnnotationConfigurationRegistry().
page Size
The size of the page the annotation is on. Get it from PdfDocument.getPageSize(annotation.getPageIndex).