public class

RubberStamp

extends Markup
java.lang.Object
   ↳ com.pdftron.pdf.Annot
     ↳ com.pdftron.pdf.annots.Markup
       ↳ com.pdftron.pdf.annots.RubberStamp

Class Overview

A rubber stamp annotation (PDF 1.3) displays text or graphics intended to look as if they were stamped on the page with a rubber stamp. When opened, it shall display a pop-up window containing the text of the associated note. Table 181 shows the annotation dictionary entries specific to this type of annotation.

Summary

Constants
int e_Approved This integer list represents the Icon type of the RubberStamp annotation e_Approved - a stamp with the text "Approved" e_Experimental - a stamp with the text "Experimental" e_NotApproved - a stamp with the text "NotApproved" e_AsIs, - a stamp with the text "AsIs" e_Expired - a stamp with the text "Expired" e_NotForPublicRelease - a stamp with the text "NotForPublicRelease" e_Confidential - a stamp with the text "Confidential" e_Final - a stamp with the text "Final" e_Sold - a stamp with the text "Sold" e_Departmental - a stamp with the text "Departmental" e_ForComment - a stamp with the text "ForComment" e_TopSecret - a stamp with the text "TopScret" e_ForPublicRelease - a stamp with the text "ForPublicRelease" e_Draft - a stamp with the text "Draft" e_Unknown - User defined or invalid.
int e_AsIs The Constant e_AsIs.
int e_Confidential The Constant e_Confidential.
int e_Departmental The Constant e_Departmental.
int e_Draft The Constant e_Draft.
int e_Experimental The Constant e_Experimental.
int e_Expired The Constant e_Expired.
int e_Final The Constant e_Final.
int e_ForComment The Constant e_ForComment.
int e_ForPublicRelease The Constant e_ForPublicRelease.
int e_NotApproved The Constant e_NotApproved.
int e_NotForPublicRelease The Constant e_NotForPublicRelease.
int e_Sold The Constant e_Sold.
int e_TopSecret The Constant e_TopSecret.
int e_Unknown The Constant e_Unknown.
[Expand]
Inherited Constants
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
Public Constructors
RubberStamp(Obj d)
Creates a RubberStamp annotation and initialize it using given Cos/SDF object.
RubberStamp()
Creates an empty RubberStamp annotation.
RubberStamp(Annot annot)
Creates a RubberStamp annotation and initialize it using given annotation object.
Public Methods
void SetIcon(int type)
Set the Icon type as an entry of the enum "Icon".
void SetOpacity(double opacity)
Updates the appearance of the stamp with the given opacity value Opacity value does not accumulate in case of subsequent calls - i.e.
static RubberStamp create(Doc doc, Rect pos)
Creates a new RubberStamp annotation, in the specified document.
static RubberStamp createCustom(Doc doc, Rect pos, Obj in_options)
Creates a new RubberStamp annotation with custom options, in the specified document.
int getIcon()
Get the Icon type as an entry of the enum "Icon".
String getIconName()
Get the Icon type as a string.
void setIcon(String icon)
Set the Icon type as a string.
[Expand]
Inherited Methods
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
From class java.lang.Object

Constants

public static final int e_Approved

This integer list represents the Icon type of the RubberStamp annotation e_Approved - a stamp with the text "Approved" e_Experimental - a stamp with the text "Experimental" e_NotApproved - a stamp with the text "NotApproved" e_AsIs, - a stamp with the text "AsIs" e_Expired - a stamp with the text "Expired" e_NotForPublicRelease - a stamp with the text "NotForPublicRelease" e_Confidential - a stamp with the text "Confidential" e_Final - a stamp with the text "Final" e_Sold - a stamp with the text "Sold" e_Departmental - a stamp with the text "Departmental" e_ForComment - a stamp with the text "ForComment" e_TopSecret - a stamp with the text "TopScret" e_ForPublicRelease - a stamp with the text "ForPublicRelease" e_Draft - a stamp with the text "Draft" e_Unknown - User defined or invalid.

Constant Value: 0 (0x00000000)

public static final int e_AsIs

The Constant e_AsIs.

Constant Value: 3 (0x00000003)

public static final int e_Confidential

The Constant e_Confidential.

Constant Value: 6 (0x00000006)

public static final int e_Departmental

The Constant e_Departmental.

Constant Value: 9 (0x00000009)

public static final int e_Draft

The Constant e_Draft.

Constant Value: 13 (0x0000000d)

public static final int e_Experimental

The Constant e_Experimental.

Constant Value: 1 (0x00000001)

public static final int e_Expired

The Constant e_Expired.

Constant Value: 4 (0x00000004)

public static final int e_Final

The Constant e_Final.

Constant Value: 7 (0x00000007)

public static final int e_ForComment

The Constant e_ForComment.

Constant Value: 10 (0x0000000a)

public static final int e_ForPublicRelease

The Constant e_ForPublicRelease.

Constant Value: 12 (0x0000000c)

public static final int e_NotApproved

The Constant e_NotApproved.

Constant Value: 2 (0x00000002)

public static final int e_NotForPublicRelease

The Constant e_NotForPublicRelease.

Constant Value: 5 (0x00000005)

public static final int e_Sold

The Constant e_Sold.

Constant Value: 8 (0x00000008)

public static final int e_TopSecret

The Constant e_TopSecret.

Constant Value: 11 (0x0000000b)

public static final int e_Unknown

The Constant e_Unknown.

Constant Value: 14 (0x0000000e)

Public Constructors

public RubberStamp (Obj d)

Creates a RubberStamp annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
d the input Cos/SDF object

public RubberStamp ()

Creates an empty RubberStamp annotation.

public RubberStamp (Annot annot)

Creates a RubberStamp annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annot the input annotation object

Public Methods

public void SetIcon (int type)

Set the Icon type as an entry of the enum "Icon".

Note: the icon type represnets an icon that shall be used in displaying the annotation. There are predefined icon appearances for at the following standard names: e_Approved, e_Experimental, e_NotApproved, e_AsIs, e_Expired , e_NotForPublicRelease, e_Confidential, e_Final, e_Sold, e_Departmental, e_ForComment, e_TopSecret, e_Draft, e_ForPublicRelease Additional names may be supported as well. Default value: Draft. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

Parameters
type An entry of "Icon" that represents the type of icon that is corresponding with this RubberStamp annotation.

public void SetOpacity (double opacity)

Updates the appearance of the stamp with the given opacity value Opacity value does not accumulate in case of subsequent calls - i.e. last call sets the final opacity

public static RubberStamp create (Doc doc, Rect pos)

Creates a new RubberStamp annotation, in the specified document.

Parameters
doc A document to which the annotation is added.
pos A rectangle specifying the annotation's bounds, specified in user space coordinates.
Returns
  • A newly created blank RubberStamp annotation.

public static RubberStamp createCustom (Doc doc, Rect pos, Obj in_options)

Creates a new RubberStamp annotation with custom options, in the specified document.

Parameters
doc A document to which the annotation is added.
pos A rectangle specifying the annotation's bounds, specified in user space coordinates.
in_options The input options for creating custom appearance, including TEXT as string (mandatory): The text to be displayed in rubber stamp TEXT_BELOW as string (optional): The text to be displayed below the first text FILL_COLOR as an array of three or four numbers between 0.0 to 1.0 (optional): The fill color TEXT_COLOR as an array of three or four numbers between 0.0 to 1.0 (optional): The text color BORDER_COLOR as an array of three or four numbers between 0.0 to 1.0 (optional): The border color FILL_COLOR_START as an array of three or four numbers between 0.0 to 1.0 (optional): The start fill color if background is gradient FILL_COLOR_END as an array of three or four numbers between 0.0 to 1.0 (optional): The end fill color if background is gradient FILL_OPACITY as a number (optional): the fill opacity TEXT_OPACITY as a number (optional): the text opacity ROTATION as a number (optional): rotation. valid numbers are {0, 90, 180, 270} POINTING_LEFT as a boolean (optional): if the stamp is pointing left POINTING_RIGHT as a boolean (optional): if the stamp is pointing right
Returns
  • A newly created RubberStamp annotation.

public int getIcon ()

Get the Icon type as an entry of the enum "Icon".

Note: the icon type represnets an icon that shall be used in displaying the annotation. There are predefined icon appearances for at the following standard names: e_Approved, e_Experimental, e_NotApproved, e_AsIs, e_Expired , e_NotForPublicRelease, e_Confidential, e_Final, e_Sold, e_Departmental, e_ForComment, e_TopSecret, e_Draft, e_ForPublicRelease Additional names may be supported as well. Default value: Draft. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

Returns
  • An entry of "Icon" that represents the type of icon that is corresponding with this RubberStamp annotation.

public String getIconName ()

Get the Icon type as a string.

Note: the icon type represnets an icon that shall be used in displaying the annotation. There are predefined icon appearances for at the following standard names: Approved, Experimental, NotApproved, AsIs, Expired , NotForPublicRelease, Confidential, Final, Sold, Departmental, ForComment, TopSecret, Draft, ForPublicRelease. Additional names may be supported as well. Default value: Draft. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

Returns
  • A string representing icon type of the RubberStamp annotation

public void setIcon (String icon)

Set the Icon type as a string.

Note: the icon type represnets an icon that shall be used in displaying the annotation. There are predefined icon appearances for at the following standard names: Approved, Experimental, NotApproved, AsIs, Expired , NotForPublicRelease, Confidential, Final, Sold, Departmental, ForComment, TopSecret, Draft, ForPublicRelease Additional names may be supported as well. Default value: Draft. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

Parameters
icon A string representing icon type of the RubberStamp annotation