All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Annots::RubberStamp Class Reference

#include <RubberStamp.h>

+ Inheritance diagram for pdftron::PDF::Annots::RubberStamp:

Public Types

enum  Icon {
  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_ForPublicRelease, e_Draft, e_Unknown
}
 
- Public Types inherited from pdftron::PDF::Annots::Markup
enum  BorderEffect { e_None, e_Cloudy }
 
- Public Types inherited from pdftron::PDF::Annot
enum  Type {
  e_Text, e_Link, e_FreeText, e_Line,
  e_Square, e_Circle, e_Polygon, e_Polyline,
  e_Highlight, e_Underline, e_Squiggly, e_StrikeOut,
  e_Stamp, e_Caret, e_Ink, e_Popup,
  e_FileAttachment, e_Sound, e_Movie, e_Widget,
  e_Screen, e_PrinterMark, e_TrapNet, e_Watermark,
  e_3D, e_Redact, e_Projection, e_RichMedia,
  e_Unknown
}
 
enum  Flag {
  e_invisible, e_hidden, e_print, e_no_zoom,
  e_no_rotate, e_no_view, e_read_only, e_locked,
  e_toggle_no_view, e_locked_contents
}
 
enum  ActionTriggerEvent {
  e_action_trigger_activate = 0, e_action_trigger_annot_enter = 1, e_action_trigger_annot_exit = 2, e_action_trigger_annot_down = 3,
  e_action_trigger_annot_up = 4, e_action_trigger_annot_focus = 5, e_action_trigger_annot_blur = 6, e_action_trigger_annot_page_open = 7,
  e_action_trigger_annot_page_close = 8, e_action_trigger_annot_page_visible = 9, e_action_trigger_annot_page_invisible = 10
}
 
enum  AnnotationState { e_normal, e_rollover, e_down }
 
typedef pdftron::PDF::BorderStyle BorderStyle
 

Public Member Functions

 RubberStamp (SDF::Obj d=0)
 
 RubberStamp (const Annot &ann)
 
Icon GetIcon () const
 
void SetIcon (Icon type=e_Draft)
 
const char * GetIconName () const
 
void SetIcon (const char *icon)
 
void SetOpacity (double opacity)
 
- Public Member Functions inherited from pdftron::PDF::Annots::Markup
 Markup (SDF::Obj d=0)
 
 Markup (const Annot &ann)
 
UString GetTitle ()
 
void SetTitle (const UString &title)
 
void SetTitle (const char *title)
 
Popup GetPopup () const
 
void SetPopup (const Popup &ppup)
 
double GetOpacity () const
 
void SetOpacity (double op)
 
UString GetSubject () const
 
void SetSubject (const UString &contents)
 
Date GetCreationDates () const
 
void SetCreationDates (const Date &dt)
 
BorderEffect GetBorderEffect () const
 
void SetBorderEffect (BorderEffect effect=e_None)
 
double GetBorderEffectIntensity () const
 
void SetBorderEffectIntensity (double intensity=0)
 
ColorPt GetInteriorColor () const
 
int GetInteriorColorCompNum () const
 
void SetInteriorColor (const ColorPt &c, int CompNum)
 
Rect GetContentRect () const
 
void SetContentRect (const Rect &cr)
 
Rect GetPadding () const
 
void SetPadding (const Rect &rd)
 
void SetPadding (double x)
 
void RotateAppearance (double angle)
 
- Public Member Functions inherited from pdftron::PDF::Annot
 Annot (SDF::Obj d=0)
 
 Annot (const Annot &d)
 
Annotoperator= (const Annot &d)
 
bool operator== (const Annot &d)
 
bool IsValid () const
 
SDF::Obj GetSDFObj () const
 
Type GetType () const
 
Rect GetRect () const
 
Rect GetVisibleContentBox () const
 
bool IsMarkup () const
 
void SetRect (const Rect &pos)
 
Page GetPage () const
 
void SetPage (const Page &page)
 
SDF::Obj GetUniqueID () const
 
void SetUniqueID (const char *id, int id_buf_sz=0)
 
Date GetDate () const
 
void SetDate (const Date &date)
 
bool GetFlag (Flag flag) const
 
void SetFlag (Flag flag, bool value)
 
SDF::Obj GetTriggerAction (Annot::ActionTriggerEvent trigger)
 
BorderStyle GetBorderStyle () const
 
void SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
 
SDF::Obj GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
 
void RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void Flatten (class Page page)
 
const char * GetActiveAppearanceState () const
 
void SetActiveAppearanceState (const char *astate)
 
ColorPt GetColorAsRGB () const
 
ColorPt GetColorAsCMYK () const
 
ColorPt GetColorAsGray () const
 
int GetColorCompNum () const
 
void SetColor (const ColorPt &col, int numcomp=3)
 
int GetStructParent () const
 
void SetStructParent (const int parkeyval)
 
SDF::Obj GetOptionalContent () const
 
void SetOptionalContent (SDF::Obj content)
 
void SetContents (const UString &contents)
 
UString GetContents () const
 
int GetRotation () const
 
void SetRotation (int angle)
 
void RefreshAppearance ()
 
void RefreshAppearance (const RefreshOptions &options)
 
UString GetCustomData (const UString &key) const
 
void SetCustomData (const UString &key, const UString &value)
 
void DeleteCustomData (const UString &key)
 
void Resize (const Rect &newrect)
 
ptrdiff_t GetHandleInternal ()
 

Static Public Member Functions

static RubberStamp Create (SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Draft)
 
static RubberStamp CreateAnnot (SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Draft)
 
static RubberStamp Create (SDF::SDFDoc &doc, const Rect &pos, SDF::Obj *form_xobject)
 
static RubberStamp CreateAnnot (SDF::SDFDoc &doc, const Rect &pos, SDF::Obj *form_xobject)
 
- Static Public Member Functions inherited from pdftron::PDF::Annot
static Annot Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
 
static AnnotCreateInternal (ptrdiff_t impl)
 

Detailed Description

A RubberStamp annotation displays text or graphics intended to look as if they were stamped on the page with a rubber stamp.

Definition at line 17 of file RubberStamp.h.

Member Enumeration Documentation

This enum represents the Icon type of the RubberStamp annotation

Enumerator
e_Approved 

a stamp with the text "Approved".

e_Experimental 

a stamp with the text "Experimental".

e_NotApproved 

a stamp with the text "Not Approved".

e_AsIs 

a stamp with the text "As Is".

e_Expired 

a stamp with the text "Expired".

e_NotForPublicRelease 

a stamp with the text "Not For Public Release".

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 "For Comment".

e_TopSecret 

a stamp with the text "Top Secret".

e_ForPublicRelease 

a stamp with the text "For Public Release".

e_Draft 

a stamp with the text "Draft".

e_Unknown 

Non-standard or user defined stamp.

Definition at line 39 of file RubberStamp.h.

Constructor & Destructor Documentation

pdftron::PDF::Annots::RubberStamp::RubberStamp ( SDF::Obj  d = 0)

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

Parameters
dThe Cos/SDF object to initialze the annotation with.
Note
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
pdftron::PDF::Annots::RubberStamp::RubberStamp ( const Annot ann)
inline

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

Parameters
annAnnot object used to initialize the RubberStamp annotation.
Note
The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Definition at line 34 of file RubberStamp.h.

Member Function Documentation

static RubberStamp pdftron::PDF::Annots::RubberStamp::Create ( SDF::SDFDoc doc,
const Rect pos,
Icon  icon = e_Draft 
)
static

Creates a new RubberStamp annotation in the specified document.

Parameters
docA document to which the annotation is added.
posA rectangle specifying the annotation's bounds in default user space units.
Returns
A newly created blank RubberStamp annotation.
static RubberStamp pdftron::PDF::Annots::RubberStamp::Create ( SDF::SDFDoc doc,
const Rect pos,
SDF::Obj form_xobject 
)
static

Creates a new RubberStamp annotation in the specified document.

Parameters
docA document to which the annotation is added.
posA rectangle specifying the annotation's bounds in default user space units.
form_xobjectAn object specifying a custom appearance for the annotation, containing 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.
static RubberStamp pdftron::PDF::Annots::RubberStamp::CreateAnnot ( SDF::SDFDoc doc,
const Rect pos,
Icon  icon = e_Draft 
)
static
static RubberStamp pdftron::PDF::Annots::RubberStamp::CreateAnnot ( SDF::SDFDoc doc,
const Rect pos,
SDF::Obj form_xobject 
)
static
Icon pdftron::PDF::Annots::RubberStamp::GetIcon ( ) const

Returns the type of the icon associated with the RubberStamp annotation.

Returns
A value of enum "Icon" that represents the type of icon associated with the annotation. Default value: e_Draft.
const char* pdftron::PDF::Annots::RubberStamp::GetIconName ( ) const

Returns the name of the icon associated with the RubberStamp annotation.

Returns
A string that is the name of the icon associated with the RubberStamp annotation.
Note
The following icon names are equivalent to predefined icon types from the enum "Icon": "Approved" = e_Approved "Experimental" = e_Experimental "NotApproved" = e_NotApproved "AsIs" = e_AsIs "Expired" = e_Expired "NotForPublicRelease" = e_NotForPublicRelease "Confidential" = e_Confidential "Final" = e_Final "Sold" = e_Sold "Departmental" = e_Departmental "Format" = e_ForComment "TopSecret" = e_TopSecret "ForPublicRelease" = e_ForPublicRelease "Draft" = e_Draft "Unknown" = e_Unknown Names other than mentioned above do not have predefined icon appearances.
void pdftron::PDF::Annots::RubberStamp::SetIcon ( Icon  type = e_Draft)

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

Parameters
typeA value of enum "Icon" type that represents the type of icon associated with the annotation. Default value: e_Draft.
void pdftron::PDF::Annots::RubberStamp::SetIcon ( const char *  icon)

Sets the name of the icon associated with the RubberStamp annotation.

Parameters
iconstringthe name of the icon associated with the RubberStamp annotation.
Note
The following icon names are equivalent to predefined icon types from the enum "Icon": "Approved" = e_Approved "Experimental" = e_Experimental "NotApproved" = e_NotApproved "AsIs" = e_AsIs "Expired" = e_Expired "NotForPublicRelease" = e_NotForPublicRelease "Confidential" = e_Confidential "Final" = e_Final "Sold" = e_Sold "Departmental" = e_Departmental "Format" = e_ForComment "TopSecret" = e_TopSecret "ForPublicRelease" = e_ForPublicRelease "Draft" = e_Draft "Unknown" = e_Unknown Names other than mentioned above do not have predefined icon appearances.
void pdftron::PDF::Annots::RubberStamp::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


The documentation for this class was generated from the following file: