Difference between revisions of "Stamp"

From OpenKM Documentation
Jump to: navigation, search
m
m (Text stamps)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Stamp is only allowed in taxonomy view for any document which can be converted to PDF or be a PDF. In order to stamp a document is necessary and working integration with OpenOffice. Take a look at [[OpenOffice.org]] or [[Application_configuration]].
+
{{TOCright}} __TOC__
 +
 
 +
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:'''
 
'''Restrictions:'''
 
* Only allowed for documents convertible to PDF or PDF files.
 
* Only allowed for documents convertible to PDF or PDF files.
* Has write privileges on folder.
+
* Have write privileges on folder.
 
* Only allowed on taxonomy view.
 
* Only allowed on taxonomy view.
  
Line 11: Line 13:
  
 
== Stamping a document ==
 
== Stamping a document ==
Fist select a document ( convertible to PDF or PDF ) in taxonomy view, then click [[File:Stamp.png‎]] the stamp icon. Will appear a popup.
+
Fist select a document ( convertible to PDF or PDF ) in taxonomy view, then click [[File:Stamp.png‎]] the stamp icon. A popup will appear.
  
  
Line 17: Line 19:
  
  
Several stamp types can be assigned in administration view to each user. User must select one of the available stamp he's got and execute it. After some time it'll be generated a new PDF file ( or new version PDF file in case the selected stamped file was a PDF ).
+
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 timea new PDF file will be generated ( or new version PDF file in case the selected stamped file was a PDF ).
  
  
Line 24: Line 26:
  
 
== Stamp administration ==
 
== Stamp administration ==
In the administration, the stamps can be manager. You can create text or image based stamps.
+
=== Text stamps ===
 +
In the administration, the stamps can be managed. You can create text or image based stamps.
  
  
Line 30: Line 33:
  
  
It can be added new or edit available.
+
You can add new stamps or edit existing ones.
  
  
 
[[File:Okm_user_guide_195.jpeg|center]]
 
[[File:Okm_user_guide_195.jpeg|center]]
  
{{Warning|En '''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.}}
+
{{Warning|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.}}
 +
 
 +
{{Note|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:
 +
 
 +
<source lang="java">
 +
import java.text.SimpleDateFormat;
 +
import java.util.Date;
 +
 
 +
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 +
sdf.format(new Date());
 +
</source>
 +
 
 +
You can also access the document to be stamped using the variable '''document'''. So, you can use this code to stamp the document author:
 +
 
 +
<source lang="java">
 +
document.getAuthor();
 +
</source>
  
 +
=== Image stamps ===
 
In image stamp it's shown image stamp definitions.
 
In image stamp it's shown image stamp definitions.
  
Line 43: Line 65:
  
  
{{Advice|In '''Expr. X''' and '''Expr. Y''' input fields you can put more than a simply number. Currently the following macros are defined:
+
{{Advice|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_WIDTH
 
* IMAGE_HEIGHT
 
* IMAGE_HEIGHT
Line 56: Line 78:
 
}}
 
}}
  
A new image can be added or edit the actual one.
+
A new image can be added or you can edit the actual one.
  
  
Line 62: Line 84:
  
  
Using the test icon [[File:Pdf.png]] it's generated a testing file
+
Using the test icon [[File:Pdf.png]] you can generate a test file.
  
  

Latest revision as of 13:27, 23 July 2013

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