Templates
Templates are text or files that Tempus Serva will output content to, when displaying a userinterface or exporting a record.
Interface templates
Interface templates is cleartext text content in HTML format, that is edited directly the backend.
Two types of tags exist
- General repeatable placeholders
- Specific placeholders referencing a single field
Specific placeholders have priority, over generic placeholders.
Its generally recommended to use the generic placeholders, because they automatically adapt when fields are added or deactivated in the solution. Also note that specific placeholders ignore the field sort order.
Export templates
Export templates are binary files uploaded to the template, containing special tags where the content from Tempus Serva fields should be inserted. Transformation of tables, files etc. is done automatically.
An example for a Word report is found here: Tutorial/Word_documents_from_templates
DOCX / Word limitations
Content can inserted most places in the document, except for the following
- Page header and footers
- Document metadata
Due to Microsoft Word everchanging document format, it is not possible to preserve the all styling of text inserted into drawing building blocks (textareas,circles etc.).
- Normal formatting will be preserved
- Special properties like angle will be lost
PDF templates
PDF templates a basically Word templates transformed to PDF afterwards. To build PDF's just upload a normal docx template, and change the type to PDF after upload.
To enable docx to pdf conversion the configuration 'servicePdfConverter' has to be set up.
To do this, first a token has to be generated and inserted into the database on the convert server.
This token has to be added to the value of 'servicePdfConverter', after the url.
The value of 'servicePdfConverter' should then look like: https://convert.tempusserva.dk/Word2pdf/Word2pdf?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX