Show / Hide Table of Contents

# Class RubberStamp

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.

##### Inheritance

object
Annot
Markup
RubberStamp

##### Implements

IDisposable

##### Inherited Members

Markup.GetTitle()
Markup.SetTitle(string)
Markup.GetPopup()
Markup.SetPopup(Popup)
Markup.GetOpacity()
Markup.GetSubject()
Markup.SetSubject(string)
Markup.GetCreationDates()
Markup.SetCreationDates(Date)
Markup.GetBorderEffect()
Markup.SetBorderEffect(Markup.BorderEffect)
Markup.GetBorderEffectIntensity()
Markup.SetBorderEffectIntensity(double)
Markup.GetInteriorColor()
Markup.GetInteriorColorCompNum()
Markup.SetInteriorColor(ColorPt, int)
Markup.GetContentRect()
Markup.SetContentRect(Rect)
Markup.GetPadding()
Markup.SetPadding(Rect)
Markup.RotateAppearance(double)
Annot.Dispose()
Annot.Dispose(bool)
Annot.GetHandleInternal()
Annot.GetRefHandleInternal()
Annot.CreateInternal(IntPtr, object)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(string)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(string)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, bool)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance()
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance(Annot.AnnotationState, string)
Annot.SetAppearance(Obj)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj, Annot.AnnotationState, string)
Annot.RemoveAppearance()
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance(Annot.AnnotationState, string)
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(string)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt, int)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(int)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(int)
Annot.RefreshAppearance()
Annot.GetCustomData(string)
Annot.SetCustomData(string, string)
Annot.DeleteCustomData(string)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF.Annots

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class RubberStamp : Markup, IDisposable

### Constructors

#### RubberStamp(Annot)

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

##### Declaration

    public RubberStamp(Annot ann)

##### Parameters

Type | Name | Description
--- | --- | ---
Annot | ann | the annot

##### Remarks

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

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### RubberStamp(Obj)

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

##### Declaration

    public RubberStamp(Obj d)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | d | the d

##### Remarks

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

### Methods

#### Create(SDFDoc, Rect)

Creates a new RubberStamp annotation, in the specified document.

##### Declaration

    public static RubberStamp Create(SDFDoc doc, Rect pos)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the annotation is added.
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates.

##### Returns

Type | Description
--- | ---
RubberStamp | A newly created blank RubberStamp annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Create(SDFDoc, Rect, Icon)

Creates a new RubberStamp annotation, in the specified document.

##### Declaration

    public static RubberStamp Create(SDFDoc doc, Rect pos, RubberStamp.Icon icon)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the annotation is added.
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates.
RubberStamp.Icon | icon | icon for the rubber stamp

##### Returns

Type | Description
--- | ---
RubberStamp | A newly created blank RubberStamp annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### ~RubberStamp()

Releases all resources used by the RubberStamp

##### Declaration

    protected ~RubberStamp()

#### GetIcon()

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

##### Declaration

    public RubberStamp.Icon GetIcon()

##### Returns

Type | Description
--- | ---
RubberStamp.Icon | An entry of "Icon" that represents the type of icon that is corresponding with this RubberStamp annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetIconName()

Gets the Icon type as a string.

##### Declaration

    public string GetIconName()

##### Returns

Type | Description
--- | ---
string | A string representing icon type of the RubberStamp annotation

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetIcon()

Sets the type of the icon associated with the RubberStamp annotation to e_Draft.

##### Declaration

    public void SetIcon()

#### SetIcon(string)

Sets the Icon type as a string.

##### Declaration

    public void SetIcon(string icon)

##### Parameters

Type | Name | Description
--- | --- | ---
string | icon | A string representing icon type of the RubberStamp annotation

##### Remarks

The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetIcon(Icon)

Sets the Icon type as an entry of the enum "Icon". *

##### Declaration

    public void SetIcon(RubberStamp.Icon type)

##### Parameters

Type | Name | Description
--- | --- | ---
RubberStamp.Icon | type | An entry of "Icon" that represents the type of icon that is corresponding with this RubberStamp annotation.

##### Remarks

The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOpacity(double)

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

##### Declaration

    public void SetOpacity(double opacity)

##### Parameters

Type | Name | Description
--- | --- | ---
double | opacity |

### Implements

IDisposable