A stamp object could be seen as a kind of content, that should get added onto a specific or several pages. It describes its appearance on a page and optionally its actions that should be executed when a stamp appearance is clicked. The position or rotation is defined in the addStamp() method of the stamper instance.
All stamp objects extend the abstract SetaPDF_Stamper_Stamp class.
The Stamper component comes with follow pre-defined stamp classes:
The abstract SetaPDF_Stamper_Stamp class offers methods that allows you to control the visibility, opacity and actions of the stamp:
Each stamp can be defined with an opacity value and blend mode:
Get the opacity.
Get the blend mode.
Set the opacity and blend mode of the stamp object.
To control the visibility of a stamp object on screen view and/or printer output the the following methods are available:
Get the visibility of the stamp object.
Set the visibility of the stamp object.
Possible visibility values are defined in class constants:
You should be aware that not all Readers support this features and may display the appearance throughout.
It is possible to add individual actions to a stamp appearance which get triggered when the appearance is clicked with the mouse. An action instance could be set or get by the following methods:
Get the current attached action.
Add an action object to the stamp object.
To simply create a link/URI action a helper method exists that will create this automatically. This method also exists for historical reason (it was available in version 1):
Set a link onto the stamp.