Foxit PDF SDK
FSDK.Stamp Class Reference
Inheritance diagram for FSDK.Stamp:
FSDK.Markup FSDK.Annot

Public Member Functions

 constructor ()
 Constructor.
 
 constructor (annot)
 Constructor, with parent class object. More...
 
 GetIconName ()
 Get icon name. More...
 
 GetRotation ()
 Get current rotation angle (in clockwise). More...
 
 Rotate (angle)
 Rotate current annotation from current state with specified angle degree in clockwise. More...
 
 SetBitmap (bitmap)
 Set bitmap to current stamp annotation. More...
 
 SetIconName (icon_name)
 Set icon name. More...
 
 SetImage (image, frame_index, compress)
 Set image to current stamp annotation, with a specified frame index. More...
 
 SetRotation (angle)
 Set rotation angle (in clockwise). More...
 
- Public Member Functions inherited from FSDK.Markup
 AddReply ()
 Add a new reply to the end of reply list. More...
 
 AddRichText (content, style)
 Add a new rich text string to the end. More...
 
 AddStateAnnot (title, model, state)
 Add a new state annotation. More...
 
 constructor ()
 Constructor.
 
 constructor (annot)
 Constructor, with parent class object. More...
 
 GetCreationDateTime ()
 Get creation date time. More...
 
 GetGroupElements ()
 Get an element (as markup annotation) from the group that current markup annotation belongs to. More...
 
 GetGroupHeader ()
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. More...
 
 GetIntent ()
 Get intent name. More...
 
 GetOpacity ()
 Get opacity value. More...
 
 GetPopup ()
 Get related pop-up annotation. More...
 
 GetReply (index)
 Get a reply by index. More...
 
 GetReplyCount ()
 Count all replies. More...
 
 GetRichTextContent (index)
 Get text string of a rich text string specified by index. More...
 
 GetRichTextCount ()
 Get the count of rich text strings. More...
 
 GetRichTextStyle (index)
 Get style data of a rich text string specified by index. More...
 
 GetStateAnnots (model)
 Get all state annotations in a specified state model. More...
 
 GetSubject ()
 Get subject string. More...
 
 GetTitle ()
 Get title string. More...
 
 InsertRichText (index, content, style)
 Insert a new rich text string to the place which is specified by index. More...
 
 IsGrouped ()
 Check whether current markup annotation is in a group or not. More...
 
 RemoveAllReplies ()
 Remove all the replies. More...
 
 RemoveAllStateAnnots ()
 Remove all the state annotations. More...
 
 RemovePopup ()
 Remove related pop-up annotation. More...
 
 RemoveReply (index)
 Remove a reply by index. More...
 
 RemoveRichText (index)
 Remove a rich text string specified by index. More...
 
 SetCreationDateTime (date_time)
 Set creation date time. More...
 
 SetIntent (intent)
 Set intent name. More...
 
 SetOpacity (opacity)
 Set opacity value. More...
 
 SetPopup (popup)
 Set related pop-up annotation. More...
 
 SetRichTextContent (index, content)
 Set text string of a rich text string specified by index. More...
 
 SetRichTextStyle (index, style)
 Set style data of a rich text string specified by index. More...
 
 SetSubject (subject)
 Set subject string. More...
 
 SetTitle (title)
 Set title string. More...
 
 Ungroup ()
 Ungroup current markup annotation from the group it belongs to. More...
 
- Public Member Functions inherited from FSDK.Annot
 constructor ()
 Constructor.
 
 constructor (page, annot_dict)
 Constructor, with PDF page and annotation's PDF dictionary. More...
 
 GetAppearanceStream (type, appearance_state)
 Get annotation's appearance stream with specified type and state. More...
 
 GetBorderColor ()
 Get border color. More...
 
 GetBorderInfo ()
 Get border information. More...
 
 GetContent ()
 Get content. More...
 
 GetDeviceRect (matrix)
 Get annotation rectangle in device coordinate system. More...
 
 GetDict ()
 Get annotation's dictionary object. More...
 
 GetDisplayMatrix (page_display_matrix)
 Get the display matrix, from PDF coordinate system to targeted device coordinate system. More...
 
 GetFlags ()
 Get annotation flags. More...
 
 GetIndex ()
 Get the index of current annotation in the page which current annotation belongs to. More...
 
 GetModifiedDateTime ()
 Get last modified date time. More...
 
 GetOptionalContent ()
 Get the PDF dictionary of annotation's optional content. More...
 
 GetPage ()
 Get the related PDF page. More...
 
 GetRect ()
 Get rectangle, in PDF coordinate system. More...
 
 GetType ()
 Get actual annotation type of current annotation. More...
 
 GetUniqueID ()
 Get unique ID. More...
 
 HasProperty (property)
 Whether current annotation has the specified annotation's property. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
 IsMarkup ()
 Check if current annotation is a markup annotation. More...
 
 Move (rect)
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
 
 Move (rect, is_reset_appearance)
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
 
 RemoveProperty (property)
 Remove a specified annotation's property. More...
 
 ResetAppearanceStream ()
 Reset appearance stream. More...
 
 ResetAppearanceStream (is_generate_new_appearance_obj)
 Reset appearance stream. More...
 
 SetBorderColor (color)
 Set border color. More...
 
 SetBorderInfo (border)
 Set border information. More...
 
 SetContent (content)
 Set content. More...
 
 SetFlags (flags)
 Set annotation flags. More...
 
 SetModifiedDateTime (date_time)
 Set last modified date time. More...
 
 SetUniqueID (unique_id)
 Set unique ID. More...
 

Additional Inherited Members

- Static Public Attributes inherited from FSDK.Markup
static e_EndingStyleButt
 A short line at the endpoint perpendicular to the line itself.
 
static e_EndingStyleCircle
 A circle filled with the annotation's interior color if any.
 
static e_EndingStyleClosedArrow
 Two short lines meeting in an acute angle as in the OpenArrow style and connected by a third line to form a triangular closed arrowhead filled with the annotation's interior color if any.
 
static e_EndingStyleDiamond
 A diamond shape filled with the annotation's interior color if any.
 
static e_EndingStyleNone
 Enumeration for line ending style. More...
 
static e_EndingStyleOpenArrow
 Two short lines meeting in an acute angle to form an open arrowhead.
 
static e_EndingStyleRClosedArrow
 A triangular closed arrowhead in the reverse direction from ClosedArrow.
 
static e_EndingStyleROpenArrow
 Two short lines in the reverse direction from OpenArrow.
 
static e_EndingStyleSlash
 A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself.
 
static e_EndingStyleSquare
 A square filled with the annotation's interior color if any.
 
static e_MeasureTypeA
 Measurement of area.
 
static e_MeasureTypeD
 Measurement of distance in any direction.
 
static e_MeasureTypeS
 Measurement of the slope of a line.
 
static e_MeasureTypeT
 Measurement of angles.
 
static e_MeasureTypeX
 Enumeration for annotation's measure type. More...
 
static e_MeasureTypeY
 Measurement of change along the y axis.
 
static e_StateAccepted
 (Used with state model FSDK.Markup.e_StateModelReview) The user agrees with the change.
 
static e_StateCancelled
 (Used with state model FSDK.Markup.e_StateModelReview) The change has been cancelled.
 
static e_StateCompleted
 (Used with state model FSDK.Markup.e_StateModelReview) The change has been completed.
 
static e_StateDeferred
 (Used with state model FSDK.Markup.e_StateModelReview) The change has been deferred.
 
static e_StateFuture
 (Used with state model FSDK.Markup.e_StateModelReview) The change will be working in the future.
 
static e_StateMarked
 (Used with state model FSDK.Markup.e_StateModelMarked) The annotation has been marked by the user.
 
static e_StateModelMarked
 Enumeration for markup annotation's state model. More...
 
static e_StateModelReview
 Markup annotation state model: review.
 
static e_StateNone
 Enumeration for markup annotation's state. More...
 
static e_StateRejected
 (Used with state model FSDK.Markup.e_StateModelReview) The user disagrees with the change.
 
static e_StateUnmarked
 (Used with state model FSDK.Markup.e_StateModelMarked) The annotation has not been marked by the user.
 
- Static Public Attributes inherited from FSDK.Annot
static e_3D
 Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_AppearanceTypeDown
 Annotation's down appearance.
 
static e_AppearanceTypeNormal
 Enumeration for the type of annotation's appearance. More...
 
static e_AppearanceTypeRollover
 Annotation's rollover appearance.
 
static e_Caret
 Annotation type: caret annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Circle
 Annotation type: circle annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_FileAttachment
 Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_FlagHidden
 Annotation flag: hidden. More...
 
static e_FlagInvisible
 Enumeration for PDF annotation flags. More...
 
static e_FlagLocked
 Annotation flag: locked. More...
 
static e_FlagLockedContents
 Annotation flag: locked contents. More...
 
static e_FlagNoRotate
 Annotation flag: no rotate. More...
 
static e_FlagNoView
 Annotation flag: no view. More...
 
static e_FlagNoZoom
 Annotation flag: no zoom. More...
 
static e_FlagPrint
 Annotation flag: print. More...
 
static e_FlagReadOnly
 Annotation flag: read only. More...
 
static e_FlagToggleNoView
 Annotation flag: toggle no view. More...
 
static e_FreeText
 Annotation type: free text annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Highlight
 Annotation type: highlight annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_HighlightingInvert
 Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
 
static e_HighlightingNone
 Enumeration for PDF annotation highlighting mode. More...
 
static e_HighlightingOutline
 Highlighting mode: Outline, which is to invert the annotation's border.
 
static e_HighlightingPush
 Highlighting mode: Push, which is to display the annotation's down appearance, if any.
 
static e_HighlightingToggle
 Highlighting mode: Toggle. This is only useful for widget annotation.
 
static e_Ink
 Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Line
 Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Link
 Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_MKEntryBackgroundColor
 Background color entry. "BG" in MK dictionary.
 
static e_MKEntryBorderColor
 Border color entry. "BC" in MK dictionary.
 
static e_MKEntryDownCaption
 Down caption (or alternate caption) entry. "AC" in MK dictionary. More...
 
static e_MKEntryDownIcon
 Down icon (or alternate icon) entry. "IX" in MK dictionary. More...
 
static e_MKEntryIconCaptionRelation
 Icon and caption relation entry. "TP" in MK dictionary. More...
 
static e_MKEntryIconFit
 Icon fit information entry. "IF" in MK dictionary. More...
 
static e_MKEntryNormalCaption
 Normal caption entry. "CA" in MK dictionary. More...
 
static e_MKEntryNormalIcon
 Normal icon entry. "I" in MK dictionary. More...
 
static e_MKEntryRolloverCaption
 Rollover caption entry. "RC" in MK dictionary. More...
 
static e_MKEntryRolloverIcon
 Rollover icon entry. "RI" in MK dictionary. More...
 
static e_MKEntryRotation
 Enumeration for annotation's MK dictionary (an appearance characteristics) entry. More...
 
static e_MKRelationCaptionAboveIcon
 Caption above the icon.
 
static e_MKRelationCaptionBelowIcon
 Caption below the icon.
 
static e_MKRelationCaptionLeft
 Caption to the left of the icon.
 
static e_MKRelationCaptionOvrlayOnIcon
 Caption overlaid directly on the icon.
 
static e_MKRelationCaptionRight
 Caption to the right of the icon.
 
static e_MKRelationNoCaption
 No caption; icon only.
 
static e_MKRelationNoIcon
 Enumeration for icon and caption relative position in annotation's MK dictionary. More...
 
static e_Movie
 Annotation type: movie annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Note
 Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PDF reference 1.7>.
 
static e_PagingSeal
 Annotation type: paging seal annotation. A Foxit PDF SDK custom annotation type (not a standard annotation type).
 
static e_Polygon
 Annotation type: polygon annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_PolyLine
 Annotation type: polyline annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Popup
 Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_PrinterMark
 Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_PropertyBorderColor
 Annotation property: border color. More...
 
static e_PropertyCreationDate
 Annotation property: creation date. More...
 
static e_PropertyFillColor
 Annotation property: fill color. More...
 
static e_PropertyModifiedDate
 Enumeration for some PDF annotation property. More...
 
static e_PSInk
 Annotation type: pressure sensitive ink annotation.
 
static e_Redact
 Annotation type: redact annotation.
 
static e_RichMedia
 Annotation type: rich media annotation.
 
static e_Screen
 Annotation type: screen annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Sound
 Annotation type: sound annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Square
 Annotation type: square annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Squiggly
 Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Stamp
 Annotation type: stamp annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_StrikeOut
 Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_TrapNet
 Annotation type: trap network annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Underline
 Annotation type: underline annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_UnknownType
 Enumeration for PDF annotation type. More...
 
static e_Watermark
 Annotation type: watermark annotation. One of standard annotation in <PDF reference 1.7>.
 
static e_Widget
 Annotation type: widget annotation. One of standard annotation in <PDF reference 1.7>. More...
 

Detailed Description

A stamp annotation displays text or graphics intended to look as if they were stamped on the page with a rubber stamp.
A stamp annotation's appearance can be with an icon or a bitmap. Currently, Foxit PDF SDK does not have any default appearance for predefined standard stamp icons, so user should set a customized annotation icon provider to Foxit PDF SDK by function FSDK.Library.SetAnnotIconProviderCallback if the stamp is represented by icon.
Stamp annotation is a kind of markup annotation, so class FSDK.Stamp is derived from class FSDK.Markup, and also offers functions to get/set stamp annotation's properties and reset appearance stream of a stamp annotation.
Before resetting appearance stream of a stamp annotation, please ensure a stamp annotation has been set valid bitmap or image, or it has an icon name with the supported customized annotation icon provider being set to Foxit PDF SDK; otherwise the stamp annotation cannot be reset appearance stream.

Note
For a newly created stamp annotation, some properties will be set with default values:
opacity = 1.0, icon name = "Draft".
Before calling FSDK.Annot.ResetAppearanceStream (inherited from FSDK.Stamp's parent class), user should ensure to set a bitmap to the stamp by function FSDK.Stamp.SetBitmap or FSDK.Stamp.SetImage, or set a useful customized annotation icon provider to Foxit PDF SDK by function FSDK.Library.SetAnnotIconProviderCallback.
See also
FSDK.Markup
FSDK.Library

Member Function Documentation

◆ constructor()

FSDK.Stamp.constructor ( annot  )

Constructor, with parent class object.

Parameters
[in]annotParent class object.

◆ GetIconName()

FSDK.Stamp.GetIconName ( )

Get icon name.

This property may has effect on stamp annotation's appearance when a supported customized annotation icon provider being set to Foxit PDF SDK. Stamp annotation has predefined standard icon names:
"Approved", "AsIs", "Confidential", "Departmental", "Draft", "Experimental", "Expired", "Final", "ForComment", "ForPublicRelease", "NotApproved", "NotForPublicRelease", "Sold", "TopSecret".

Returns
Icon name string.

◆ GetRotation()

FSDK.Stamp.GetRotation ( )

Get current rotation angle (in clockwise).

Returns
Current rotation angle (in clockwise). Value range: from 0 to 360.

◆ Rotate()

FSDK.Stamp.Rotate ( angle  )

Rotate current annotation from current state with specified angle degree in clockwise.

Parameters
[in]angleAngle degree value, which is used to rotate current annotation from current state in clockwise. Value range: from 0 to 360. Specially, if the input value is 0 or 360 (which means not to rotate current annotation), current function will do nothing.
Returns
None.

◆ SetBitmap()

FSDK.Stamp.SetBitmap ( bitmap  )

Set bitmap to current stamp annotation.

If user wants the new bitmap has effect on annotation's appearance, please call function FSDK.Annot.ResetAppearanceStream after setting the new bitmap.

Parameters
[in]bitmapA bitmap to be set to current stamp.
Returns
None.

◆ SetIconName()

FSDK.Stamp.SetIconName ( icon_name  )

Set icon name.

This property may has effect on stamp annotation's appearance when a supported customized annotation icon provider being set to Foxit PDF SDK. Stamp annotation has predefined standard icon names:
"Approved", "AsIs", "Confidential", "Departmental", "Draft", "Experimental", "Expired", "Final", "ForComment", "ForPublicRelease", "NotApproved", "NotForPublicRelease", "Sold", "TopSecret".
Once user set a new icon name to current stamp annotation, please ensure the customized icon provider has been set to Foxit PDF SDK by function FSDK.Library.SetAnnotIconProviderCallback before function FSDK.Annot.ResetAppearanceStream (inherited from Stamp's parent class) is called. For a newly created stamp annotation, if current function is not called, icon name will be "Draft" by default.
If user wants the new icon name has effect on annotation's appearance, please ensure a supported customized annotation icon provider has been set to Foxit PDF SDK and then call function FSDK.Annot.ResetAppearanceStream after setting the new icon name.

Parameters
[in]icon_nameNew icon name string to be set. An empty icon name string means icon of current stamp annotation would be treated as "Draft".
Returns
None.

◆ SetImage()

FSDK.Stamp.SetImage ( image  ,
frame_index  ,
compress   
)

Set image to current stamp annotation, with a specified frame index.

Input image may contain multiple frames, and only one frame of the image can be set to current stamp annotation.
If user wants the new image has effect on annotation's appearance, please call function FSDK.Annot.ResetAppearanceStream after setting the new image.

Parameters
[in]imageAn image. One of its frames will be set to current stamp. This image contains at least one frame and the image type should not be FSDK.Image.e_Unknown.
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function FSDK.Image.GetFrameCount.
[in]compressCompress algorithm type used to compress image data. Currently, it only supports 2 valid value:
  • 0: no compress.
  • 1: do default compress.
Returns
None.

◆ SetRotation()

FSDK.Stamp.SetRotation ( angle  )

Set rotation angle (in clockwise).

This property has effect on stamp annotation's appearance. If user wants the effect to be shown in annotation's appearance, please call function FSDK.Annot.ResetAppearanceStream after this function.

Parameters
[in]angleNew rotation angle (in clockwise) to be set to current annotation. Value range: from 0 to 360.
Returns
None.