Class TextStamp
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.Annotation
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.MarkupAnnotation
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.Stamp
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.TextStamp
-
public class TextStamp extends Stamp
A text stamp annotation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TextStamp
create(Document targetDocument, Point topLeft, java.lang.Double height, TextStampType textType)
Create a text stamp annotation.static TextStamp
createRaw(Document targetDocument, Point topLeft, java.lang.Double height, TextStampType textType, java.lang.String text)
Deprecated.Deprecated in Version 4.2.TextStampType
getTextType()
The displayed text (Getter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.Stamp
getPopup, getPopupPaint
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.MarkupAnnotation
getInfo, getLocked, getReplies
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.annotations.Annotation
copy, getBoundingBox, getHidden, getId, getNoPrint, getNoRotate, getNoZoom
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
createRaw
public static TextStamp createRaw(Document targetDocument, Point topLeft, java.lang.Double height, TextStampType textType, java.lang.String text)
Deprecated.Deprecated in Version 4.2. Use static method TextStamp.Create instead.Create a text stamp annotation.
The width of the annotation is computed from the given stamp text. The returned text stamp annotation is not yet part of any page. It can be added to a page's list of annotations.- Parameters:
targetDocument
- The output document with which the returned object is associated.topLeft
- The location of the annotation's upper left corner on the page.height
- The height of the annotation.textType
- The text stamp type.text
- The text to be shown in this stamp.- Returns:
- The newly created text stamp annotation.
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if thetextType
argument isTextStampType.CUSTOM_STAMP_TEXT
java.lang.IllegalArgumentException
- if thetext
argument is emptyjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- iftopLeft
isnull
java.lang.IllegalArgumentException
- iftextType
isnull
java.lang.IllegalArgumentException
- iftext
isnull
-
create
public static TextStamp create(Document targetDocument, Point topLeft, java.lang.Double height, TextStampType textType)
Create a text stamp annotation.
The width of the annotation is computed based on the giventextType
. The returned text stamp annotation is not yet part of any page. It can be added to a page's list of annotations.- Parameters:
targetDocument
- The output document with which the returned object is associated.topLeft
- The location of the annotation's upper left corner on the page.height
- The height of the annotation.textType
- The text stamp type.- Returns:
- The newly created text stamp annotation.
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if thetextType
argument isTextStampType.CUSTOM_STAMP_TEXT
java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- iftopLeft
isnull
java.lang.IllegalArgumentException
- iftextType
isnull
-
getTextType
public TextStampType getTextType()
The displayed text (Getter)
This defines a predefined text for this text stamp.- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
-