Class CustomStamp


  • public class CustomStamp
    extends Stamp

    A stamp annotation with custom content

    • 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 given boundingBox, and with coordinate origin located at the bottom left corner. Use a toolbox.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 the targetDocument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument is read-only
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if boundingBox is null
      • getAppearance

        public Group getAppearance()

        The custom stamp's visual appearance (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed