Table of Contents
There are several administration tasks:
agencies
users
code lists (groups, types, entities)
print setup
monitoring - via nagios (optional)
There is defined javascript code to generate box labels. Script code using several input variables to affect generated label. Box label content are stored to predifined output variable.
Following variables are set up before javascript code is executed.
label1, label2, label3, label4
box
Boolean variables determining which plate will be generated. Values are set from html page just before calling javascript for label generation.
Object containing box attributes.
Table 3.1. Box attributes
Method | Type | Description |
---|---|---|
getBoxNumber() | String | Number of box |
getEntity() | String | Entity |
getGroup() | String | Group |
getType() | String | Type |
getLifeTime() | String | Lifetime of box in years |
getNote() | String | Note describing box content. |
getCreationDate() | String | Date when box was created. |
getDiscardDate() | String | Date when box will be discarded. |
getDocumentNumberFrom() | String | First (lowest) document number in box. |
getDocumentNumberTo() | String | Last (highest) document number in box. |
getCreationTime() | Date | Date when box was created. |
getDiscardTime() | Date | Date when box will be discarded. |
getAgency() | String | Name of agency. |
Label content has to be stored to variable output. Variable output has following methods:
Table 3.2. Output variable methods.
Method | Ret |
---|---|
OutputStream getData() | Get OutputStream to write content to. |
void setMimetype(String mimetype) | Set mimetype of content. |
Generic template for genration of label in pdf format with itext library.
importPackage(com.itextpdf.text) importPackage(com.itextpdf.text.pdf) importPackage(java.io) importPackage(java.util) function createDocument(document,writer) { // create content here, use variables box, label1, label2, label3, label4 here } var document = new Document(PageSize.A4.rotate()); var writer = PdfWriter.getInstance(document,output.getData()); document.open(); createDocument(); document.close(); output.setMimetype('application/pdf');