public class

FreeTextAnnotationUtils

extends Object
java.lang.Object
   ↳ com.pspdfkit.utils.FreeTextAnnotationUtils

Class Overview

This provides methods to help with working with FreeTextAnnotations.

Summary

Nested Classes
enum FreeTextAnnotationUtils.ScaleMode How to determine the size of the annotation. 
Public Constructors
FreeTextAnnotationUtils()
Public Methods
static void placeCallOutPoints(FreeTextAnnotation freeTextAnnotation)
This will place the call out points in the same way the UI will place them based on user interaction.
static void resizeToFitText(FreeTextAnnotation freeTextAnnotation, PdfDocument document, FreeTextAnnotationUtils.ScaleMode widthScaleMode, FreeTextAnnotationUtils.ScaleMode heightScaleMode)
Resizes the given free text annotation so the text fits inside its bounds.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FreeTextAnnotationUtils ()

Public Methods

public static void placeCallOutPoints (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.

public static void resizeToFitText (FreeTextAnnotation freeTextAnnotation, PdfDocument document, FreeTextAnnotationUtils.ScaleMode widthScaleMode, 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.