Class CustomStamp
- java.lang.Object
-
public class CustomStamp extends Stamp
A stamp annotation with custom content
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CustomStamp
create(Document targetDocument, Rectangle boundingBox)
Create a custom stamp annotation.Group
getAppearance()
The custom stamp's visual appearance (Getter)-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.Stamp
getPopup, getPopupPaint
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.MarkupAnnotation
getInfo, getLocked, getReplies
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.Annotation
copy, getBoundingBox, getHidden, getId, getNoPrint, getNoRotate, getNoZoom
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static CustomStamp create(Document targetDocument, Rectangle boundingBox)
Create a custom stamp annotation.
The returned custom stamp annotation's appearance has an empty content with size equal to the givenboundingBox
, and with coordinate origin located at the bottom left corner. Use atoolbox.pdf.content.ContentGenerator
to generate the stamp's content prior to adding the stamp annotation to a page's list of annotations.- Parameters:
targetDocument
- The output document with which the returned object is associated.boundingBox
- The location of the annotation on the page.- Returns:
- The newly created custom stamp annotation.
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifboundingBox
isnull
-
getAppearance
public Group getAppearance()
The custom stamp's visual appearance (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
-