Technical Examples

Below you will find examples of different features of the Docmosis document generation system.

Each example includes:

  • Template (as DOC or ODT)
  • the Data (as XML or JSON)
  • the Output Files in three different formats (PDF / DOC / ODT)

 


Conditional Sections

Conditional Sections

Add or remove content using "IF" statements.   List numbering changes to match the data.

Format - Numbers

Format - Numbers

Using the numFormat function to output: currency, percentages, decimals and more.

Conditional Rows

Conditional Rows

Add or remove table rows using conditional statements and repeating rows.

Alternating Rows

Alternating Rows

An example of a table with one header row and subsequent rows filled with alternating colours.

Master/Sub Templates

Master/Sub Templates

Examples of how to merge one template in to another template, directly or as determined by data.

Page Size & Orientation

Page Size & Orientation

Examples showing different page sizes and different orientations in the same document.

This, This and That

This, This and That

These examples show how to display a list of items in a sentence, separated using "comma" and "and".

Repeating Sections

Repeating Sections

This example shows how to display repeating data including bullet lists and numbered lists.

Tables - Part One

Tables - Part One

An introduction to Tables and controlling layout with Table and Paragraph properties.

Barcodes

Barcodes

This example shows how to dynamically insert and configure barcodes into documents.

Format - Dates

Format - Dates

Examples of using the formatDate function to decode and display Dates and Times.

Hyperlinks

Hyperlinks

Examples of using static and dynamic hyperlinks to other websites and email addresses.

Stepping - Images

Stepping - Images

These examples show how to display a series of images in “steps” across or down a page.

Conditional Sections 2

Conditional Sections 2

These examples explain why a blank line can appear when a conditional statement returns false.

Images - Part One

Images - Part One

An introduction to adding dynamic images to a document from Base64 encoded image data.

Expressions - Strings

Expressions - Strings

Examples of the built-in String functions for formatting your data in the generated document.

Expressions - Math

Expressions - Math

How to perform Math and Logic calculations and call Math Functions from within your templates.

Else and Else-If

Else and Else-If

Examples of providing alternative content to "IF" statements with additional expressions.

Stepping - Data

Stepping - Data

These examples show how to display repeating data in “steps” across or down a page.

Conditional Columns

Conditional Columns

These examples show how to add or remove table columns using conditional statements.