Difference between revisions of "Stamp"

From OpenKM Documentation
Jump to: navigation, search
m (Text stamps)
 
(15 intermediate revisions by 3 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 got configured open office service, consider 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.
 
  
 
Detail of the functions according to their icons:  
 
Detail of the functions according to their icons:  
Line 12: Line 13:
  
 
== Stamping a document ==
 
== Stamping a document ==
Fist must select a document ( convertible to pdf or pdf ) in taxonomy view, then click [[File:Stamp.png‎]] the stamp icon. It'll 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 18: 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 25: Line 26:
  
 
== Stamp administration ==
 
== Stamp administration ==
On stamp administration can be defined text and image stamps.
+
=== Text stamps ===
 +
In the administration, the stamps can be managed. You can create text or image based stamps.
  
  
[[File:Okm_user_guide_194.jpeg|800px|center]]
+
[[File:Okm_user_guide_197.jpeg|800px|center]]
  
  
And edit the values
+
You can add new stamps or edit existing ones.
  
  
 
[[File:Okm_user_guide_195.jpeg|center]]
 
[[File:Okm_user_guide_195.jpeg|center]]
 +
 +
{{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.
 +
 +
 +
[[File:Okm_user_guide_199.jpeg|800px|center]]
 +
 +
 +
{{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_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.
 +
 +
 +
[[File:Okm_user_guide_200.jpeg|center]]
 +
 +
 +
Using the test icon [[File:Pdf.png]] you can generate a test file.
 +
 +
 +
[[File:Okm_user_guide_201.jpeg|center]]
  
  
 
[[Category: User Guide]]
 
[[Category: User Guide]]

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