Difference between revisions of "Stamp"
(→Text stamps) |
m (→Text stamps) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{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]]. | 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]]. | ||
Line 38: | Line 40: | ||
{{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.}} | {{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.}} | + | {{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: | For example, to show the current date you can do: | ||
<source lang="java"> | <source lang="java"> | ||
− | + | import java.text.SimpleDateFormat; | |
+ | import java.util.Date; | ||
+ | |||
+ | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
+ | sdf.format(new Date()); | ||
</source> | </source> | ||
− | You can also access the document to be stamped using the variable '''document'''. So, you can use this code to stamp the document | + | 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"> | <source lang="java"> | ||
− | document. | + | document.getAuthor(); |
</source> | </source> | ||
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.