Package com.pspdfkit.utils
Class FreeTextAnnotationUtils
-
- All Implemented Interfaces:
public class FreeTextAnnotationUtils
This provides methods to help with working with FreeTextAnnotations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
FreeTextAnnotationUtils.ScaleMode
How to determine the size of the annotation.
-
Constructor Summary
Constructors Constructor Description FreeTextAnnotationUtils()
-
Method Summary
Modifier and Type Method Description static void
resizeToFitText(@NonNull() FreeTextAnnotation freeTextAnnotation, @NonNull() PdfDocument document, @NonNull() FreeTextAnnotationUtils.ScaleMode widthScaleMode, @NonNull() FreeTextAnnotationUtils.ScaleMode heightScaleMode)
Resizes the given free text annotation so the text fits inside its bounds. static void
placeCallOutPoints(@NonNull() FreeTextAnnotation freeTextAnnotation)
This will place the call out points in the same way the UI will place them based on user interaction. -
-
Method Detail
-
resizeToFitText
static void resizeToFitText(@NonNull() FreeTextAnnotation freeTextAnnotation, @NonNull() PdfDocument document, @NonNull() FreeTextAnnotationUtils.ScaleMode widthScaleMode, @NonNull() FreeTextAnnotationUtils.ScaleMode heightScaleMode)
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.
-
placeCallOutPoints
static void placeCallOutPoints(@NonNull() FreeTextAnnotation freeTextAnnotation)
This will place the call out points in the same way the UI will place them based on user interaction.
- Parameters:
freeTextAnnotation
- The free text annotation of which we want to place the call out points.
-
-
-
-