Skip to content
Other versions

Loading…

Stamp

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

Stamps are shown in a table structure.

Id Name Description Text Script Color Users Active

Field descriptions:

Field Description
Name Stamp name.
Description Stamp description.
Text The text to be shown on the stamp.
Script When set, the result of the script will be the stamped text.
List of variables that can be used directly:
- document:

Document object of the document node.

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

Sample:
<br>import java.util;<br>String value = "";<br>value = document.getActualVersion().getName();<br>value += "-" + String.valueOf(new Date());<br>return value;<br>
Sample:
<br>import org.springframework.web.context.*;<br>import com.openkm.util.*;<br>import com.openkm.api.*;<br>WebApplicationContext cc = (WebApplicationContext) ContextWrapper.getContext();<br>OKMPropertyGroup okmPrpGrp = cc.getBean(OKMPropertyGroup.class);<br>String prpGrpName = "okg:sample";<br>if (okmPrpGrp.hasGroup(null, document.getUuid(), prpGrpName)) {<br> Map props = okmPrpGrp.getProperties(null, document.getUuid(), prpGrpName);<br> return "Number: " + props.get("okp:sample.number");<br>} else {<br> return "No property group assigned: " + prpGrpName;<br>}<br>
Font unicode.ttf
The font file must be copied into the $TOMCAT_HOME/lib folder.
Layer Position of the stamped image.
Available values:
- Under content.
- Over content.
Opacity The text opacity. The range of allowed values is from 0 to 1.
An Opacity equal to 0 means the text or image is transparent and you won’t see it. Set it to 0.5 to see semi-transparent text or to 1 to be opaque.
Also try changing the layer to stamp over or below the default text layer.
Size Text size.
Align Text alignment.
Available values:
- Left.
- Center.
- Right.
Rotation Text rotation. The range of allowed values is 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.
  • Click on  Create new Stamp icon.
  • Fill in the form.
  • Click on the Create button.

Field descriptions:

Field Description
Name Stamp name.
Description Stamp description.
Image The image to be added into the document.
Script When set, the result of the script will be the stamped text.
List of variables that can be used directly:
- document:

Document object of the document node.

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

Sample:
cs<br>import java.util;<br>String value = "";<br>value = document.getActualVersion().getName();<br>value += "-" + String.valueOf(new Date());<br>return value;<br>
Layer Position of the stamped image.
Available values:
- Under content.
- Over content.
Opacity The image opacity. The range of allowed values is 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 users.
Users List of users who can use the stamp.
  • Click on  Create new Stamp icon.
  • Fill in the form.
  • Click on the Create button.
  • Click on  Edit icon.
  • Modify the form.
  • Click on the Edit button.
  • Click on  Delete icon.
  • Click on the Delete button.
  • Click on  the icon.