public final class StampAnnotation extends MarkupAnnotation
Represents rubber stamp annotation. This type of annotation displays text or graphics intended to look as if they were stamped on the page with a rubber stamp.
Next code snippet demonstrates how to add 2 stamps into the first pdf document page. Input document comes from inFile and changes are saved into the outFile. The first stamp has icon NotForPublicRelease and the second comes with image from rubber.jpg.Document document = new Document(inFile); StampAnnotation stamp1 = new StampAnnotation(StampIcon.NotForPublicRelease); stamp1.setRect ( new Rectangle(100, 100, 120, 120)) document.getPages().get(1).getAnnotations().add(stamp1); StampAnnotation stamp2 = new StampAnnotation(new FileStream("rubber.jpg", FileMode.Open)); stamp2.setRect ( new Rectangle(200, 200, 220, 220)) document.getPages().get(1).getAnnotations().add(stamp2); document.save(outFile);
_disableUpdateAppearance
Constructor and Description |
---|
StampAnnotation(Page page,
Rectangle rect)
Creates new Stamp annotation on the specified page.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(AnnotationSelector visitor)
Acepts
AnnotationSelector visitor when browsing annotation collection. |
int |
getIcon()
Gets or sets icon for rubber stamp.
|
InputStream |
getImage()
Gets or sets image of the annotation.
|
void |
setIcon(int value) |
void |
setImage(InputStream value) |
void |
writeXfdf(com.aspose.ms.System.Xml.XmlWriter writer) |
getCreationDate, getCreationDateInternal, getInReplyTo, getOpacity, getPopup, getReplyType, getRichText, getSubject, getTitle, setInReplyTo, setOpacity, setPopup, setReplyType, setRichText, setSubject, setTitle
createAnnotation, flatten, getActiveState, getAlignment, getAppearance, getBorder, getCharacteristics, getColor, getContents, getEngineDict, getEngineObj, getFlags, getFullName, getHeight, getHorizontalAlignment_Annotation_New, getModified, getModifiedInternal, getName, getNormalAppearance, getPage, getPageIndex, getPageIndex, getRect, getStates, getWidth, initialize, setActiveState, setAlignment, setBorder, setColor, setContents, setFlags, setHeight, setHorizontalAlignment_Annotation_New, setModified, setModifiedInternal, setName, setRect, setWidth
deepClone, getMargin, isKeptWithNext, isKeptWithNext, setHorizontalAlignment, setMargin, setVerticalAlignment
public void writeXfdf(com.aspose.ms.System.Xml.XmlWriter writer)
public int getIcon()
Gets or sets icon for rubber stamp.
public void setIcon(int value)
public void accept(AnnotationSelector visitor)
Acepts AnnotationSelector
visitor when browsing annotation collection.
accept
in class Annotation
visitor
- Visitor for annotation processing.public InputStream getImage()
Gets or sets image of the annotation.
public void setImage(InputStream value)
Copyright © 2019 Aspose. All Rights Reserved.