Stamp

From OpenKM Documentation
Jump to: navigation, search

Stamp is only allowed in taxonomy view for any document which can be converted to PDF or is a PDF. In order to stamp a document it's necessary to have working integration with OpenOffice. Take a look at OpenOffice.org or Application configuration.

Restrictions:

  • Only allowed for documents convertible to PDF or PDF files.
  • Have write privileges on folder.
  • Only allowed on taxonomy view.

Detail of the functions according to their icons:

  • Stamp.png → Start stamping a document


Stamping a document

Fist select a document ( convertible to PDF or PDF ) in taxonomy view, then click Stamp.png the stamp icon. A popup will appear.


Okm user guide 192.jpeg


Several stamp types can be assigned in administration view to each user. A user must select one of the available stamps he's got and execute it. After some time, a new PDF file will be generated ( or new version PDF file in case the selected stamped file was a PDF ).


Okm user guide 193.jpeg


Stamp administration

Text stamps

In the administration, the stamps can be managed. You can create text or image based stamps.


Okm user guide 197.jpeg


You can add new stamps or edit existing ones.


Okm user guide 195.jpeg

Nota advertencia.png 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.


Nota clasica.png Since OpenKM Professional 6.2.18 you can customize the stamp text using scripting. Keep on mind that the script should return an String.

For example, to show the current date you can do:

import java.text.SimpleDateFormat;
import java.util.Date;

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
sdf.format(new Date());

You can also access the document to be stamped using the variable document. So, you can use this code to stamp the document author:

document.getAuthor();

Image stamps

In image stamp it's shown image stamp definitions.


Okm user guide 199.jpeg



Nota idea.png 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

A new image can be added or you can edit the actual one.


Okm user guide 200.jpeg


Using the test icon Pdf.png you can generate a test file.


Okm user guide 201.jpeg