Business Letter

A standard business letter.

This example has placeholders in the body of the document and in the footer.

The images are static and anchored to the text.

The data is nested.

This example in detail

This example letter uses plain-text placeholders, conditional sections, and regular expressions.

Using placeholders

You can create these just by wrapping any field from your data in << and >>.

In this example the data is nested. For example, the top level "person" object has a "firstName" object.

In your data you would have (JSON example) :

"person": {
  "firstName": "John",

In the finished document the placeholder "<<person.firstName>>" will be replaced with "John".

Any formatting applied to a placeholder (bold/italic/etc.) will be applied to the data in the finished document

Conditional sections

These start with the <<cs_ condtional section directive and end with <<es_.

These are like IF statements. <<cs_includeTimeframe>> is like saying:

IF  includeTimeframe = "true"  THEN

display all text up to <<es_includeTimeframe>>

In your data you would have (JSON example):

"includeTimeframe":"true"

If <<cs_ or <<es_ is on a line by itself,  the line is removed in the final document.  Tip: that includes no trailing white space as well.

Docmosis expression processing

The expression {numApplications>50} is evaluated using the Docmosis built-in expression processing.

If it returns "true" then all following text up to the next <<es_ appears in the final document.

In your data you would have: "numApplications":"57" (JSON example).

Feedback

Invalid Input

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam.

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam.

Invalid Input

Applies To

Docmosis-Java Tornado Cloud
Version(s) ALL ALL ALL