com.qoppa.pdf.annotations
Interface RubberStamp

All Superinterfaces:
Annotation

public interface RubberStamp
extends Annotation

Interface representing a Rubber Stamp annotation in a PDF document.

Author:
Qoppa Software

Field Summary
static String APPROVED
           
static String ASIS
           
static String CONFIDENTIAL
           
static String DEPARTMENTAL
           
static String DRAFT
           
static String EXPERIMENTAL
           
static String EXPIRED
           
static String FINAL
           
static String FORCOMMENT
           
static String FORPUBLICRELEASE
           
static String NOTAPPROVED
           
static String NOTFORPUBLICRELEASE
           
static String SOLD
           
static String TOPSECRET
           
 
Fields inherited from interface com.qoppa.pdf.annotations.Annotation
BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
 
Method Summary
 Image createImage(double scale, int maxWidth, int maxHeight)
          Return an image for the current stamp.
 String getContents()
          Returns the annotation's text content.
 String getIconName()
          If this stamp was created using a default predefined stamp, returns the stamp's predefined name.
 Image getImage()
          If this stamp was created from an image, then it returns the image that it was created from.
 int getRotation()
          Gets the rotation.
 void setContents(String contents)
          Sets the annotation's text content.
 void setIconName(String iconName)
          Sets the name of the predefined stamp from the PDF format specs.
 void setImage(Image image)
           
 void setRotation(int rotation)
          Sets the rotation for standard or image stamps that do not have an appearance stream yet.
 void setRunInfo(Hashtable runInfo)
          Sets information used for stamps that have dynamic fields, such as the current date and time.
 
Methods inherited from interface com.qoppa.pdf.annotations.Annotation
getActions, getBorderStyle, getBorderWidth, getColor, getComponent, getCreationDate, getCreator, getFlags, getName, getOpacity, getRectangle, getSubtype, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, paint, print, revalidate, setActions, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPrintable, setReadOnly, setRectangle, setSubtype, setTriggerActions, shiftRectangle
 

Field Detail

ASIS

public static final String ASIS
See Also:
Constant Field Values

APPROVED

public static final String APPROVED
See Also:
Constant Field Values

CONFIDENTIAL

public static final String CONFIDENTIAL
See Also:
Constant Field Values

DEPARTMENTAL

public static final String DEPARTMENTAL
See Also:
Constant Field Values

DRAFT

public static final String DRAFT
See Also:
Constant Field Values

EXPERIMENTAL

public static final String EXPERIMENTAL
See Also:
Constant Field Values

EXPIRED

public static final String EXPIRED
See Also:
Constant Field Values

FINAL

public static final String FINAL
See Also:
Constant Field Values

FORCOMMENT

public static final String FORCOMMENT
See Also:
Constant Field Values

FORPUBLICRELEASE

public static final String FORPUBLICRELEASE
See Also:
Constant Field Values

NOTAPPROVED

public static final String NOTAPPROVED
See Also:
Constant Field Values

NOTFORPUBLICRELEASE

public static final String NOTFORPUBLICRELEASE
See Also:
Constant Field Values

SOLD

public static final String SOLD
See Also:
Constant Field Values

TOPSECRET

public static final String TOPSECRET
See Also:
Constant Field Values
Method Detail

setRunInfo

public void setRunInfo(Hashtable runInfo)
Sets information used for stamps that have dynamic fields, such as the current date and time.

Parameters:
runInfo -

createImage

public Image createImage(double scale,
                         int maxWidth,
                         int maxHeight)
Return an image for the current stamp. If width and height are set to 0, the default stamp width and height are used. If width and height are > 0, the image is scaled to fit in (maxWidth, maxWeight) while preserving the original ratio width / height

Parameters:
maxWidth - Maximum width desired for the image. If the natural image is larger than this, the image will be rescaled.
maxHeight - Maximum height desired for the image. If the natural image is larger than this, the image will be rescaled.
Returns:
An Image object of the current stamp.

getIconName

public String getIconName()
If this stamp was created using a default predefined stamp, returns the stamp's predefined name.

Returns:
The stamp's predefined name.

getContents

public String getContents()
Returns the annotation's text content.

Specified by:
getContents in interface Annotation
Returns:
The annotation's content.

setContents

public void setContents(String contents)
Sets the annotation's text content.

Parameters:
contents - The new content.

setIconName

public void setIconName(String iconName)
Sets the name of the predefined stamp from the PDF format specs. (Confidential, As is, etc)

Parameters:
iconName - The predefined name.

getImage

public Image getImage()
If this stamp was created from an image, then it returns the image that it was created from.

Returns:
The image that the stamp was created from.

setImage

public void setImage(Image image)

getRotation

public int getRotation()
Gets the rotation.

Returns:
rotation.

setRotation

public void setRotation(int rotation)
Sets the rotation for standard or image stamps that do not have an appearance stream yet. Once the appearance stream is generated, this parameter is ignored and will not be saved in the pdf document. * @param rotation the rotation.