Stamp Types

Introduction

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.

Initiating a stamp instance doesn't render any content on a document but it is required to add a stamp instance to the stamper instance and executing the stamp process.

The Stamper component comes with follow pre-defined stamp classes:

General Stamp Properties

The abstract SetaPDF_Stamper_Stamp class offers methods that allows you to control the visibility, opacity and actions of the stamp: 

Opacity

Each stamp can be defined with an opacity value and blend mode: 

getOpacity()

Get the opacity.

getOpacityBlendMode()

Get the blend mode.

setOpacity()

Set the opacity and blend mode of the stamp object.

Visibility

 To control the visibility of a stamp object on screen view and/or printer output the the following methods are available: 

getVisibility()

Get the visibility of the stamp object.

setVisibility()

Set the visibility of the stamp object.

Possible visibility values are defined in class constants: 

public const string SetaPDF_Stamper_Stamp::VISIBILITY_ALL = 'all'

Visibility constant

public const string SetaPDF_Stamper_Stamp::VISIBILITY_PRINT = 'print'

Visibility constant

public const string SetaPDF_Stamper_Stamp::VISIBILITY_VIEW = 'view'

Visibility constant

You should be aware that not all Readers support this features and may display the appearance throughout. 

Actions and Links

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: 

getAction()

Get the current attached action.

setAction()

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.