Formatting in Word Template

While generating documents you may want to apply formatting to a dynamically populated result - like a resulting value of an expression. Using PDF4me, you can easily apply formatting to the results of your condition or expression.

Let us look at an example to see how these formatting can be applied-

Basic Syntax

The basic syntax for applying formatting -


We can look at how we can format the date-time expression results.

Suppose we want an output result like -

Invoice Date: 12.09.2022 instead of 2022/09/12

We need to create the template like -

Invoice Date:  <<[invoiceDate]:"dd.MM.yyyy">>

and the Data can be -

  "vendorName": "Ynoox GmbH",
  "invoiceDate": "2022/09/12"

Types of Formatting

String Formatting

You can format strings or text to be populated in your document using the following formats.


Converts a string to upper case


Capitalizes the first letter of every word in a string


Capitalizes the first letter of the first word in a string

Date Formatting

<<[token]:"dd MMM yy H:mm:ss">>

E.g 15 Dec 12 10:10:21


E.g 15-12-2022