Renderer Reference

Ultradox comes with a number of renderers that will help you to format your data in the various ways.

The rendering is defined by adding the following to the variable when using in templates:

${myVariable;renderer(options)}

Where

myVariable is the name of the variable contents to be output.

renderer is the name of the renderer to use, see below, (eg image).

options contains a number of options, see the example sections below

String

If the variable contains text, you can apply different formatting options:

Break into multiple lines

If no delimiter is specified the text will be wrapped whenever a newline character occurs. Using the character sequence space as delimiter will replace newlines with spaces.

wrap

Characters

UPPERCASE

Prints the contents of a variable in uppercase letters

uppercase

true

false

lowercase

Prints the contents of a variable in lowercase letters

lowercase

true

false

Titlecase

Prints the first letter in uppercase (e.g. first will become First)

titlecase

true

false

CamelCase

Prints the contents of a variable in camelcase (e.g. FIRST_LAST will become FirstLast)

camelcase

true

false

Maximum length

Cuts off the contents of a variable after the specified number of characters

max

0 - 99999 (Number)

Ellipsis

Prints the specified character sequence if the text has been cut off.
Only makes sense in conjunction with the max option

ellipsis

Characters

Prepend characters

Prepends the given characters, but only if the variable is set

pre

Characters

Append characters

Appends the given characters, but only if the variable is set

post

Characters

Insert linebreak

Adds a newline before or after the text, but only if the variable is set

break

after
before

Encode

Encode the value if you want to use it in an URL or an other context that requires encoding

encode

url
csv
html
xml
javascript
json

Decode

If you are dealing with an encoded value you can decode it by picking the correct encoding

decode

url
csv
html
xml
javascript
json

From

Use this option if you want to print a substring starting from the given character index. Use negative to get the index starting from the end of the string.

from

-999 - 999 (Number)

From first

Creates a substring starting from the first appearance of the given character(s)

fromFirst

Characters

From after first

Creates a substring starting after the first appearance of the given character(s)

fromAfterFirst

Characters

From last

Creates a substring starting from the last appearance of the given character(s)

fromLast

Characters

From after last

Creates a substring starting after the last appearance of the given character(s)

fromAfterLast

Characters

To

Use this option if you want to print a substring up to the given character index. Use negative to get the index starting from the end of the string.

to

-999 - 999 (Number)

To first

Creates a substring ending before the first appearance of the given character(s)

toFirst

Characters

To after first

Creates a substring ending after the first appearance of the given character(s)

toAfterFirst

Characters

To last

Creates a substring ending before the last appearance of the given character(s)

toLast

Characters

To after last

Creates a substring ending after the last appearance of the given character(s)

toAfterLast

Characters

Equals

Returns true if given string is equal to the parameter value, otherwise false

equals

Characters

Starts with

Returns true if given string starts with the parameter value, otherwise false

startsWith

Characters

Ends with

Returns true if given string ends with the parameter value, otherwise false

endsWith

Characters

Contains

Returns true if given string contains the parameter value, otherwise false

contains

Characters

Replace

Replaces the given character sequence with the value from the with parameter

replace

Characters

With

Replaces the character sequence from the replace parameter with this value

with

Characters

Examples

Usages of the string renderer to format the variable fullName with value Daniel

Usage

Output

${fullName;string(uppercase)}

DANIEL

${fullName;string(lowercase)}

daniel

Usages of the string renderer to format the variable description with value Note: This is a description that may contain a very long text

Usage

Output

${description;string(max=20)}

Note: This is a descriptio

${description;string(max=20;ellipsis)}

Note: This is a descriptio...

${description;string(from=1;to=8)}

ote: Thi

${description;string(from=-4)}

text

${description;string(fromFirstAfter= ;toFirstBefore= descr)}

This is a

Boolean

If the variable contains a boolean value (true or false), you can render it using symbols like checkboxes

Symbol

Select the symbol to be used to display if the given value is true or false

symbol

mark
checkbox
yes/no
face
male
female
heart
flag
circle
star

True text

Specify the text to be printed if the give value is true

true

Characters

False text

Specify the text to be printed if the give value is false

false

Characters

Examples

Usages of the boolean renderer to format the variable tosAccepted with value true

Usage

Output

${tosAccepted;boolean(symbol=yes/no)}

Yes

${tosAccepted;boolean(true=Accepted;false=Declined)}

Accepted

${tosAccepted;boolean(symbol=mark)}

Usages of the boolean renderer to format the variable male with value false

Usage

Output

${male;boolean(true=Mr.;false=Mrs.)}

Mrs.

${tosAccepted;boolean(symbol=male)}

Number

If the variable contains a number, you can parse and format it using locale specific patterns:

Output pattern

Specifies the output number format. Use integer, percent or a custom pattern

op

Characters

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input pattern

Specifies the input number format. Use integer, percent or a custom pattern

ip

Characters

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Add

Add parameter value to the given number

add

(Number)

Subtract

Subtract parameter value from the given number

sub

(Number)

Multiply

Multiply given number by the parameter value

mul

(Number)

Divide

Divide given number by the parameter value

div

(Number)

Equals

Returns true if given number is equal to the parameter value, otherwise false

equals

(Number)

Greater than

Returns true if given number is greater than the parameter value, otherwise false

gt

(Number)

Greater than or equals

Returns true if given number is greater than or equals the parameter value, otherwise false

gte

(Number)

Less than

Returns true if given number is less than the parameter value, otherwise false

lt

(Number)

Less than or equal

Returns true if given number is less than or equals the parameter value, otherwise false

lte

(Number)

Examples

Usages of the number renderer to format the variable result with value 1234567890.12345

Usage

Output

${result;number(ol=en)}}

1,234,567,890.123

${result;number(ol=fr)}

1 234 567 890,123

${result;number(op=#.00;ol=de)}

1234567890,12

Usages of the number renderer to format the variable value with value 10

Usage

Output

${value;number(sub=7)}

3

${value;number(mul=10;add=5)}

105

${value;number(gt=5)}

true

${value;number(mul=5;lt=40)}

false

Currency

If the variable contains a number, you can parse and format it as a currency:

Output pattern

Specifies the output currency code. Use USD, EUR or any other valid currency code

op

Characters

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input pattern

Specifies the pattern to convert a given string into a number. The pattern is locale sensitive and will parse the given string using the input language and country if they are available

ip

Characters

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Add

Add parameter value to the given number

add

(Number)

Subtract

Subtract parameter value from the given number

sub

(Number)

Multiply

Multiply given number by the parameter value

mul

(Number)

Divide

Divide given number by the parameter value

div

(Number)

Equals

Returns true if given number is equal to the parameter value, otherwise false

equals

(Number)

Greater than

Returns true if given number is greater than the parameter value, otherwise false

gt

(Number)

Greater than or equals

Returns true if given number is greater than or equals the parameter value, otherwise false

gte

(Number)

Less than

Returns true if given number is less than the parameter value, otherwise false

lt

(Number)

Less than or equal

Returns true if given number is less than or equals the parameter value, otherwise false

lte

(Number)

Examples

Usages of the currency renderer to format the variable amount with value 1234567890.12345

Usage

Output

${amount;currency(ol=de;oc=DE;op=EUR)}

1.234.567.890,12 €

${amount;currency(ol=de;oc=CH;op=EUR)}

EUR 1'234'567'890.12

${amount;currency(ol=en;oc=US;op=USD)}

1.234.567.890,12 USD

Date

If the variable contains a date, you can parse and format it using locale specific patterns:

Output pattern

Specifies the output date format. Use short, medium, long, full or a custom pattern

op

Characters

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Output timezone

Specifies the output timezone

otz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Input pattern

Specifies the input date format. Use short, medium, long, full or a custom pattern

ip

Characters

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input timezone

Specifies the input timezone

itz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Add days

Specify the number of days to be added to or substracted from the given date

addDay

1 - 365 (Number)

Add weeks

Specify the number of weeks to be added to or substracted from the given date

addWeek

1 - 56 (Number)

Add months

Specify the number of months to be added to or substracted from the given date

addMonth

1 - 12 (Number)

Add years

Specify the number of years to be added to or substracted from the given date

addYear

1 - 999 (Number)

Set day

Sets the day to the given day in month

day

1 - 31 (Number)

Set month

Sets the month of the date

month

1 - 12 (Number)

Set year

Sets the year of the date

year

-9999 - 9999 (Number)

Equals

Returns true if given date is equal to the parameter value, otherwise false

equals

Date

Before

Returns true if given date is before to the parameter value, otherwise false

before

Date

After

Returns true if given date is after to the parameter value, otherwise false

after

Date

Examples

Usages of the date renderer to format the variable appointment with value 2016/04/16

Usage

Output

${appointment;date(op=short)}

4/16/16

${appointment;date(op=long;ol=fr)}

16 avril 2016

${appointment;date(op=long;ol=en)}

April 16, 2016

${appointment;date(op=MMMM;ol=it)}

aprile

${appointment;date(op=yyyy/MM/dd)}

2016/04/16

Time

If the variable contains a timestamp, you can parse and format it as a time using locale specific patterns:

Output pattern

Specifies the output date format. Use short, medium, long, full or a custom pattern

op

Characters

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Output timezone

Specifies the output timezone

otz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Input pattern

Specifies the input date format. Use short, medium, long, full or a custom pattern

ip

Characters

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input timezone

Specifies the input timezone

itz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Add minutes

Specify the number of minutes to be added to or substracted from the given time

addMinute

1 - 9999 (Number)

Add hours

Specify the number of hours to be added to or substracted from the given time

addHour

1 - 9999 (Number)

Equals

Returns true if given time is equal to the parameter value, otherwise false

equals

Characters

Before

Returns true if given time is before to the parameter value, otherwise false

before

Characters

After

Returns true if given time is after to the parameter value, otherwise false

after

Characters

Examples

Usages of the time renderer to format the variable now with value 2:23:12 PM

Usage

Output

${now;time(op=short)}

2:23 PM

${now;time(op=medium)}

2:23:12 PM

${now;time(op=full;ol=fr)}

14 h 23 UTC

${now;time(op=hh:mm:ss)}

02:23:12

Date and time

If the variable contains a timestamp, you can parse and format it as date and time using locale specific patterns:

Output pattern

Specifies the output date format. Use short, medium, long, full or a custom pattern

op

Characters

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Output timezone

Specifies the output timezone

otz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Input pattern

Specifies the input date format. Use short, medium, long, full or a custom pattern

ip

Characters

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input timezone

Specifies the input timezone

itz

Specifies the output timezone, either an abbreviation such as PST, a full name such as America/Los_Angeles, or a custom ID such as GMT-8:00

Add minutes

Specify the number of minutes to be added to or substracted from the given time

addMinute

1 - 9999 (Number)

Add hours

Specify the number of hours to be added to or substracted from the given time

addHour

1 - 9999 (Number)

Add days

Specify the number of days to be added to or substracted from the given date

addDay

1 - 365 (Number)

Add weeks

Specify the number of weeks to be added to or substracted from the given date

addWeek

1 - 56 (Number)

Add months

Specify the number of months to be added to or substracted from the given date

addMonth

1 - 12 (Number)

Add years

Specify the number of years to be added to or substracted from the given date

addYear

1 - 999 (Number)

Equals

Returns true if given date and time is equal to the parameter value, otherwise false

equals

Characters

Before

Returns true if given date and time is before to the parameter value, otherwise false

before

Characters

After

Returns true if given date and time is after to the parameter value, otherwise false

after

Characters

Examples

Usages of the datetime renderer to format the variable now with value 4/16/13 2:26:48 PM

Usage

Output

${now;datetime(op=short)}

4/16/13 2:26 PM

${now;datetime(op=medium)}

2:23:12 PM

${now;datetime(op=long)}

April 16, 2014 2:26:48 PM UTC

${now;datetime(op=full;ol=en)}

Tuesday, April 16, 2014 2:26:48 PM UTC

${now;datetime(op=yyyy, MMM dd. hh:mm:ss)}

2014, Apr 16. 02:28:13

Locale

If the variable contains a locale, country or language, you can parse and format it using locale specific patterns:

Output pattern

Specifies which parts of the locale to be rendered and in which format

op

locale
country
countryCode
language
languageCode

Output locale

Specifies the output language and region

ol

oc

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Input pattern

Specifies how to parse the given variable content

ip

locale
country
countryCode
language
languageCode

Input locale

Specifies the input language and region

il

ic

Specify language as two lowercase letters (e.g. de or en) and country as two uppercase letters (eg. FR or US)

Examples

Usages of the locale renderer to format the variable lang with value en-US

Usage

Output

${lang;locale}

English (United States)

${lang;locale(op=language)}

English

${lang;locale(op=country)}

United States

${lang;locale(ol=fr)}

anglais (Etats-Unis)

${lang;locale(op=language;ol=fr)}

anglais

${lang;locale(op=country;ol=de;oc=DE)}

Vereinigte Staaten von Amerika

${lang;locale(op=country;ol=fr;oc=FR)}

Etats-Unis

Usages of the locale renderer to format the variable country with value France

Usage

Output

${country;locale(ip=country;il=en;op=country;ol=de}

Frankreich

${country;locale(ip=country;il=en;op=countryCode}

FR

If the variable contains a URL, you can render it as a clickable link:

Displayed text

Specifies the text that will be displayed in the generated document instead of the URL. If not set, the URL will be displayed as text

text

Characters

Target frame

When rendering HTML output you can specify the target frame of the link. Use _blank, _self or target frame name

target

Characters

Link color

Specify the link color when rendering HTML output

color

Text decoration

Specify the text decoration when rendering HTML output

text-decoration

none
underline

Email

If the variable contains an email address, you can render it as a clickable link:

Displayed text

Specifies the text that will be displayed in the generated document. If not set, the email will be displayed as text

text

Characters

Subject

Enter the subject if you want to prepopulate the subject field

subject

Characters

Body

Enter the body if you want to prepopulate the body field

body

Characters

Link color

Specify the link color when rendering HTML output

color

Text decoration

Specify the text decoration when rendering HTML output

text-decoration

none
underline

Image

If the variable contains a URL pointing to an image, you can render it as an image

Width

Specifies the width of the image in cm, pt etc.

width

Characters

Height

Specifies the height of the image in cm, pt etc.

height

Characters

Aspect ratio

Use this option to maintain the aspect ratio of the original image

aspect-ratio

ignore
maintain

Resize

Resizes the image to reduce the resulting document size

resize

Characters

Border radius

When generating HTML output, this option allows you to generate rounded borders

border-radius

Characters

Color mode

When generating PDF document this option converts the image to a greyscale, monochromatic or watermark image

color-mode

standard
greyscale
mono
watermark

Mirror image

When generating PDF document this option mirrors the image vertically, horizontally along both axis

mirror

none
horizontal
vertical
horizontal vertical

Luminance

When generating PDF document this option adjusts the luminance of image

luminance

0 - 100 (Percent)

Contrast

When generating PDF document this option adjusts the contrast of image

contrast

0 - 100 (Percent)

Image opacity

0% = image is totally transparent, 100% image is opaque

image-opacity

0 - 100 (Percent)

Gamma correction

When generating PDF document this option applies gamma correction to the image

gamma

0 - 100 (Percent)

Red channel

When generating PDF document this option adjusts the red channel

red

0 - 100 (Percent)

Blue channel

When generating PDF document this option adjusts the blue channel

blue

0 - 100 (Percent)

Green channel

When generating PDF document this option adjusts the green channel

green

0 - 100 (Percent)

Map

If the variable contains a postal address, you can render it as a map

Map type

Select the type of map that will be rendered

maptype

roadmap
satellite
hybrid
terrain

Zoom level

Specified the zoom level. 0 will show the whole planet, 21 is the highest zoom level

zoom

Resolution

Specifies the resolution of the generated image in px

res

Characters

Marker

Add a marker to the map with additional options (color: |label: |size: )

markers

Characters

Width

Specifies the width of the image in cm, pt etc.

width

Characters

Height

Specifies the height of the image in cm, pt etc.

height

Characters

Aspect ratio

Use this option to maintain the aspect ratio of the original map

aspect-ratio

ignore
maintain

Resize

Resizes the image to reduce the resulting document size

resize

Characters

Border radius

When generating HTML output, this option allows you to generate rounded borders

border-radius

Characters

Color mode

When generating PDF document this option converts the image to a greyscale, monochromatic or watermark image

color-mode

standard
greyscale
mono
watermark

Mirror image

When generating PDF document this option mirrors the image vertically, horizontally along both axis

mirror

none
horizontal
vertical
horizontal vertical

Luminance

When generating PDF document this option adjusts the luminance of image

luminance

0 - 100 (Percent)

Contrast

When generating PDF document this option adjusts the contrast of image

contrast

0 - 100 (Percent)

Image opacity

0% = image is totally transparent, 100% image is opaque

image-opacity

0 - 100 (Percent)

Gamma correction

When generating PDF document this option applies gamma correction to the image

gamma

0 - 100 (Percent)

Red channel

When generating PDF document this option adjusts the red channel

red

0 - 100 (Percent)

Blue channel

When generating PDF document this option adjusts the blue channel

blue

0 - 100 (Percent)

Green channel

When generating PDF document this option adjusts the green channel

green

0 - 100 (Percent)

Form

If the variable contains a form definition, you can render it as a form

Action URL

Enter a fixed URL or a variable prefixed with a dollar sign (without curly braces)

action

Characters

Legend

Enter an optional header for your form

legend

Characters

Method

Select the desired method to send your form data

method

POST
GET

Buttons

Add text for submit buttons, separated by comma. First button will be blue, UPPERCASE buttons will be red, others default. The selected button will be available in the button variable

buttons

Characters

Layout

Horizontal will put the labels on the left of the input fields, vertcial will put them on top

layout

horizontal
vertical

Font family

Specify the desired font to be used when rendering the form

font-family

Characters

Object

If the variable contains an object, you can render it as JSON or XML

Input Format

Select if your object comes in XML, JSON format or as an Object

if

object
json
xml

Path

Query data in the parsed object using JSON Path syntax

path

Characters

Output Format

Specify if you want to render your object in XML, JSON or plain string format.

of

json
xml
string

Binary

If the variable contains binary content like generated documents etc. you can render it as a string, base64 or as a hashcode

Input Format

Specify if your binary content comes as bytes, string or base64 encoded

if

bytes
string
base64

Input Character Set

If your content comes as a string you can specify the character set

ic

Characters

Output Format

Specify if you want to render your binary content as String, Base64 or as a Hashcode

of

string
base64
hash

Output Character Set

Specify the character set if you want to render your binary content as a string

oc

Characters

Social

If you are rendering HTML output and the variable contains an URL you can render share buttons for social networks

Platform

Select the social network to share the URL

platform

google+
facebook
twitter
linkedin

URL

By default the URL will be takes from the variable to be rendered. If you want to share a different URL, you can pass it as url parameter.

url

Characters

Title

You can specify the title of the post

title

Characters

Target

Specify the target frame for your link

target

Characters

Hashtag

If you create a share button for Twitter you can specify the hashtag

hashtag

Characters

Width

The width of the generated image

width

Characters

Padding

The padding of the generated image

padding

Characters

HTML

If the variable contains HTML code, you modify or extract values from it

Fragment

Add this option if your variable only contains an HTML snippet

fragment

true

false

Inline Styles

Add this option if you want to inline the styles

inlineStyles

true

false

Remove Styles

Add this option if you want to remove the styles defined in your HTML page

removeStyle

true

false

Select

Select elements by entering a CSS like selector syntax. Separate by comma if you want to select multiple elements

select

Characters

Retrieve

Sepcify the format for the retrieved result. Separate by comma if you are selecting multiple elements

retrieve

text
outerHtml
html
id
tagName

Remove attributes

Specify the attributes to be removed from the selected elements

removeAttr

Characters

Remove tags

Specify the tags to be removed from the selected elements

removeTag

Characters

Convert

If your HTML comes from a Google Doc you can convert it into a different format

convert

bootstrap3

Color

If the variable contains color value, you can manipulate the color in many ways

Saturation

Set the saturations of the color

saturation

0 - 100 (Percent)

Adjust saturation

Increase or decrease the saturations of the color

addSaturation

-100 - 100 (Number)

Lightness

Sets the lightness of the color

lightness

0 - 100 (Percent)

Adjust lightness

Increase or decrease the lightness of the color

addLightness

-100 - 100 (Number)

Hue

Sets the hue of the color

hue

0 - 360 (Number)

Adjust hue

Increase or decrease the hue of the color

addHue

0 - 360 (Number)

Palette

Derive a color from the given color (e.g. the complementary color)

palette

complement
light
lighter
darker
dark
text

Output Format

Specify if you want to render the color in RGB or RGBA format.

of

rgb
rgba

Examples

Usages of the color renderer to format the variable brandColor with value #dc0021

Usage

Output

${brandColor;color(palette=dark)}

#6E0010

${brandColor;color(palette=text)}

#FFFFFF

Learn more

The following guides will cover the aspects of the templating language.

Questions and Feedback

If you have any comments on this page, feel free to add suggestions right to the Google document that we are using to create this site.

If you are not yet member of the Ultradox community on Google+, please join now to get updates from our end or to provide feedback, bug reports or discuss with other users.

Last Updated: 4/22/22