Template Tutorials

This page shows all articles in this category.

Please select a product, using the dropdown menu at the top right of this page, to filter this site further.

See how to combine different page sizes and orientations in a template. These can also be custom page sizes, used for mailing labels, tickets, packaging details, and so on. Docmosis uses the template's page setups, when generating a document. Microsoft…
You can use the conditional section <<cs_ directive in a template to include or exclude a section of content. This is similar to using an "IF" statement. If you use a conditional section within a numbered list, the numbering…
Conditional Sections covered how to add or remove content from the final document. When a conditional section returns false and content is removed, there is sometimes a blank line left behind. Blank lines can be controlled by changing the…
Repeating data, from an array of data, can be displayed in many ways. This example contains: each item on a new line, each item on the same line, bullet lists, and numbered lists. Defining a repeating section A repeating…
Dynamically inserting an image in to a document requires two things: The template controls where the image will appear The data determines what image is used This article explains how to use a placeholder image in the template. The…
This example shows you how to use tables to display repeating data (eg: objects in an array). By setting different table properties and paragraph properties you can control how the table lays out on the page when it is…
Use the conditional rows <<cr_ directive in a template to include or exclude single or multiple rows from a table. You can filter out multiple rows based on conditions in the supplied data. Defining conditional rows In a table…
There may be times when you want to include or exclude columns in a table depending on the supplied data. Docmosis allows tables to conditionally add or remove a column through the use of conditional fields and expressions, allowing…
The Conditional Columns article covered how to include or exclude columns in a table using Boolean fields and expressions. However, sometimes a column may need to be excluded from a table when there is no data to display anywhere…
Tables with alternating row colors. The header row color is fixed. The color of the first two data rows determine if alternating colours should be used and what the alternating pattern colors are. Row coloring The first row in…
Docmosis allows you to control how dates and times are displayed in the finished document. For example: the raw data may have a date like: 21-03-16. Using the built-in function dateFormat the date can be formatted so that it…
Docmosis allows you to control how numbers are displayed in the finished document. For example: the raw data may have numbers like: 1234.5. Using the built-in function numFormat the number can be formatted so that it looks like this: …
This example introduces the notation used to perform simple math calculations in the templates. It explains how to call math functions and format the results that are displayed in the generated document. It is best to view the template…
Docmosis can help prepare a document for signing using signature services such as Adobe Sign. This example demonstrates how to add a signature field into a template. Adding Adobe Sign Text Tags to a template The required Adobe fields…
Docmosis can help prepare a document for signing using signature services such as signNow. This example demonstrates how to add a signNow signature tag into a Docmosis template. Adding signNow signature tags to a template A signNow signature tag…
Depending on the particular software application you are using, it might not be possible to change your data before sending it to Docmosis. Docmosis has a range of string functions you can use within the templates to modify and…
If a total is not provided as part of the data, it is possible to calculate a subtotal or a total from the data and display the result in the finished document. These examples make use of tables built…
Templates can be combined into one resulting document, allowing content that appears in multiple documents to be separated out into a "shared" or common template. NOTE: This example relies on multiple template files, which can be found in the…
It’s possible to modify the “looping” features in Docmosis so that the data can be looped through in small groups or steps. The stepping feature can be used with the <<rs_ repeating sections or <<rr_ repeating rows directives. By…
The Stepping - Data example showed how data could be arranged into steps or groups of size “N” through the “:stepN” and “:stepNdown” directives – the “N” referring to the number of columns of data to be shown. When…
Within a Conditional Section it is possible to include an Else statement to allow alternative content to be provided in case where an expression is false. Else-If style statements provide an alternative expression to be evaluated to conditionally include…
Items in an array can be displayed as a comma separated string in a sentence. The examples below describe methods used to cater for the different possibilities of one, two, or more than two items in such a list,…
This example demonstrates the use of the Docmosis size()function, and the built-in $size variable. Using array size When working with groups or sets of data, it may be necessary to display the total number of items in that group,…
Docmosis can add hyperlinks and mailto links to documents, where the URL can be static or dynamic. With a static hyperlink the URL is known in advance. For a dynamic hyperlink, the URL is provided by the data at…
Docmosis can generate and insert barcodes into documents. Docmosis supports Code 39, Code 128 and ITF 14 formats. Inserting barcodes Inserting barcodes with Docmosis uses a technique similar to inserting images. To insert a barcode, start by inserting a…
This example introduces the notation used to perform simple logic calculations in the templates. It explores how to call logic and boolean operators such as AND/OR within the template, which is most useful in Conditional Sections. It is best…