Difference between revisions of "Stamp"
m (→Text stamps) |
|||
(14 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 | + | {{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 | + | * Only allowed for documents convertible to PDF or PDF files. |
− | * | + | * 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 | + | 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. | + | 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 ). |
Line 25: | Line 26: | ||
== Stamp administration == | == Stamp administration == | ||
− | + | === Text stamps === | |
+ | In the administration, the stamps can be managed. You can create text or image based stamps. | ||
Line 31: | Line 33: | ||
− | + | 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. | In image stamp it's shown image stamp definitions. | ||
− | [[Okm_user_guide_199.jpeg|800px|center]] | + | [[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:
Stamping a document
Fist select a document ( convertible to PDF or PDF ) in taxonomy view, then click the stamp icon. A popup will appear.
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 ).
Stamp administration
Text stamps
In the administration, the stamps can be managed. You can create text or image based stamps.
You can add new stamps or edit existing ones.
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.
A new image can be added or you can edit the actual one.
Using the test icon you can generate a test file.