|
Foxit PDF SDK
|
Public Member Functions | |
| def | GetIconName () |
| Get icon name. More... | |
| def | GetRotation () |
| Get current rotation angle (in clockwise). More... | |
| def | Rotate (angle) |
| Rotate current annotation from current state with specified angle degree in clockwise. More... | |
| def | SetBitmap (bitmap) |
| Set bitmap to current stamp annotation. More... | |
| def | SetIconName (icon_name) |
| Set icon name. More... | |
| def | SetImage (image, frame_index, compress) |
| Set image to current stamp annotation, with a specified frame index. More... | |
| def | SetRotation (angle) |
| Set rotation angle (in clockwise). More... | |
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.LibrarySetAnnotIconProviderCallback if the stamp is represented by icon.
Stamp annotation is a kind of markup annotation, so class Stamp is derived from class 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.
| def 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".
| def fsdk.Stamp.GetRotation | ( | ) |
Get current rotation angle (in clockwise).
| def fsdk.Stamp.Rotate | ( | angle | ) |
Rotate current annotation from current state with specified angle degree in clockwise.
| [in] | angle | Angle 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. |
| def 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.
| [in] | bitmap | A bitmap to be set to current stamp. |
| def 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.LibrarySetAnnotIconProviderCallback 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.
| [in] | icon_name | New icon name string to be set. An empty icon name string means icon of current stamp annotation would be treated as "Draft". |
| def 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.
| [in] | image | An 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.ImageE_Unknown . |
| [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount . |
| [in] | compress | Compress algorithm type used to compress image data. Currently, it only supports 2 valid value:
|
| def 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.
| [in] | angle | New rotation angle (in clockwise) to be set to current annotation. Value range: from 0 to 360. |