public class FreeText extends MarkupAnnotation
| Modifier and Type | Method and Description | 
|---|---|
static FreeText | 
create(Document targetDocument,
      Rectangle boundingBox,
      java.lang.String content,
      Paint paint)
Create a free-text annotation. 
 | 
static FreeText | 
createDynamicObject(long handle)  | 
HorizontalAlignment | 
getAlignment()
The text alignment (Getter) 
 | 
Paint | 
getPaint()
The paint for the text background and the popup (Getter) 
 | 
getInfo, getLocked, getRepliescopy, getBoundingBox, getHidden, getNoPrint, getNoRotate, getNoZoomequals, hashCodepublic static FreeText createDynamicObject(long handle)
public static FreeText create(Document targetDocument, Rectangle boundingBox, java.lang.String content, Paint paint)
targetDocument - The output document with which the returned object is associated.boundingBox - The location on the page.content - The text content.paint - This paint used for the background of the free text annotation.
        If null, the background is transparent.java.lang.IllegalArgumentException - if the targetDocument is nulljava.lang.IllegalArgumentException - if the targetDocument has already been closedjava.lang.IllegalArgumentException - if the targetDocument is read-onlyjava.lang.IllegalArgumentException - if the paint has a pdftoolbox.pdf.content.Paint.getColorSpace other than a device color spacejava.lang.IllegalArgumentException - if the paint has a non-nullpdftoolbox.pdf.content.Paint.getTransparency with pdftoolbox.pdf.content.Transparency.getBlendMode other than pdftoolbox.pdf.content.BlendMode.NORMALjava.lang.IllegalArgumentException - if the paint argument is not associated with the targetDocumentjava.lang.IllegalArgumentException - if boundingBox is nullpublic HorizontalAlignment getAlignment()
java.lang.IllegalStateException - if the object has already been closedpublic Paint getPaint() throws CorruptException
java.lang.IllegalStateException - if the object has already been closedCorruptException - if the PDF is corrupt and the annotation's paint cannot be read