Stamp

Stamp feature helps you to insert an image into a document.

This option is hidden when Stamp extension is not enabled. Read about it at Enable extensions .

More information at Stamp extension.

You can set two types of stamp:

  • Based on images.
  • Based on text.

On top right you can switch between "Text stamp list" or "Image stamp list" with :

  • Text stamp list button.
  • Image stamp list button.

Stamp are shown in a table structure.

Name

Descripcion

Text

Script

Colour

Active

Create new stamp based on text

When use stamp based on text, the text is converted to an image and then stamped into a document.

Fields description:

FieldDescription

Name

Stamp name.

Description

Stamp description.

Text

The text to be shown in stamp.

Script

When is set the result of the script will be stamped text.

List of variables what can be used directly:

VariableDescription

document

Document object of the document node.

For more information see com.openkm.bean.Document class at API description.

Sample:

import java.util;

String value = "";
value = document.getActualVersion().getName();
value += "-" + String.valueOf(new Date());

return value;

Layer

Stamped image position.

Available values:

  • Under content.
  • Over content.

Opacity

The text opacity. The range of values allowed are from 0 to 1.

An Opacity equals to 0 means a transparent text or image and you won't see it. Set to 0.5 to see an semi-transparent text or set to 1 to be opaque.

Also play with layer to stamp over or below the default text layer.

Size

Text size.

Align

Text align.

Available values:

  • Left.
  • Center.
  • Right.

Rotation

Text rotation. The range of values allowed are from 0 to 360.

Colour

The text colour.

Expr. X

Expression to set the position in X coordinates.

Expr. Y

Expression to set the position in Y coordinates.

Active

When enabled the stamp will be available to the users.

Users

List of users who can use the stamp.

In Expr. X and Expr. Y input fields you can put more than a simple number. Currently the following macros are defined:

  • IMAGE_WIDTH
  • IMAGE_HEIGHT
  • PAGE_WIDTH
  • PAGE_HEIGHT
  • PAGE_CENTER
  • PAGE_MIDDLE

So to center a stamp in the page you can use:

Expr. X

PAGE_CENTER

Expr. Y

PAGE_MIDDLE

  • Click on  Create new Stamp icon.
  • Fill the form.
  • Click on Create button.

Create new stamp based on image

Fields description:

FieldDescription

Name

Stamp name.

Description

Stamp description.

Image

The image to be added into the document.

Layer

Stamped image position.

Available values:

  • Under content.
  • Over content.

Opacity

The text opacity. The range of values allowed are from 0 to 1.

Expr. X

Expression to set the position in X coordinates.

Expr. Y

Expression to set the position in Y coordinates.

Active

When enabled the stamp will be available to the users.

Users

List of users who can use the stamp.

In Expr. X and Expr. Y input fields you can put more than a simple number. Currently the following macros are defined:

  • IMAGE_WIDTH
  • IMAGE_HEIGHT
  • PAGE_WIDTH
  • PAGE_HEIGHT
  • PAGE_CENTER
  • PAGE_MIDDLE

So to center a stamp in the page you can use:

Expr. X

PAGE_CENTER - IMAGE_WIDTH / 2

Expr. Y

PAGE_MIDDLE - IMAGE_HEIGHT / 2

  • Click on  Create new Stamp icon.
  • Fill the form.
  • Click on Create button.

Edit stamp

  • Click on  Edit icon.
  • Modify the form.
  • Click on Edit button.

Delete stamp

  • Click on  Delete icon.
  • Click on Delete button.

Test stamp

  • Click on  icon.

Staps what use scripting with variable document can not be tested from administration.