Variables available in the Output

In the Output Module, there are some variables available that offer more control over how templates are generated, or the data added to them.

Templates can be used in the following locations:

Available Variables

The following is a list of variables that can be used independently of any job options loaded.

The Template object

${template} Contains information about the template. The default use of ${template} expands to a name based on the template name. A four digit sequence number is added at the end of the basename. The file extension is determined by the selected output technology.

${template} is basically a short hand for ${template.base}_${template.nr,0000}.${template.ext}

The 0000 in ${template.nr,0000} is a format pattern that takes care of formatting the number with at least four digits and leading zero's. See Formatting date and number values , below.

Example

If the template file is C:\Data\My-Invoices-EN.OL-template which gets printed to PDF, then ${template} expands to My-Invoices-EN_0001.pdf

${template.base}

Returns the base name of the template, which is the name of the template file without its path and without the trailing file extension.

Example

If the template file is C:\Data\My-Invoices-EN.OL-template, then ${template.base} expands to My-Invoices-EN

${template.name}

​​Returns the name of the template file without the path.

Example

If the template file is C:\Data\My-Invoices-EN.OL-template, then ${template.name} expands to My-Invoices-EN.OL-template

Note, that ${template.name} this still includes the extension of the template file (.OL-template in the example above).

${template.nr}

An automatic sequence number belonging to the current output file. It is automatically incremented for each new output file that gets created. Note, that multiple output files are created, for example, when output separation has been selected for output creation.

It is possible to format the number using a pattern and locale. See Formatting date and number values , below.

${template.ext}

The extension that corresponds to the chosen output technology.

For example, for PDF output, ${template.ext} would be PDF, for PostScript output, ${template.ext} would return PS

Note, that ${template.ext} does not include a leading dot.

The File object

${file}

${​file} is basically a short hand for ${file.base}_${file.nr,0000}.${file.ext} where 0000 in ${file.nr,0000} is a format pattern that takes care of formatting the number with at least four digits including leading zero's. See Formatting date and number values , below.

Server context:​

On the Server, ${file} expands to a file name based on the job name. A four digit sequence number is added at the end of the basename. The suffix (the extension) is defined by the selected output technology.

Example

If the job name is my-invoices-reprint and is printed to PDF, then ${file} expands to my-invoices-reprint_0001.pdf

Designer context:

​In the Designer, ${file} returns a generated name based on the current template name. A four digit sequence number is added at the end of the basename. The suffix is defined by the selected output technology.

Example

If the template file is my-invoices.OL-template and is printed to PostScript, then ${file} expands to my-invoices_0001.ps

${file.base}

The name of the template without dot extension (designer context) or the name of the job without dot extenstion (server context)

Example (Designer context)

If the template file is C:\Data\my-invoices.OL-template, then ${file.base} returns my-invoices

${file.ext}

The extension that corresponds to the chosen output technology.

For example, for PDF output, ${file.ext} would be PDF, for PostScript output, ${file.ext} would return PS

Note, that ${file.ext} does not include a leading dot.

${file.name}

The name of the template (designer context) or the name of the job (server context)

Example

If the template file is C:\Data\my-invoices.OL-template, then ${file.name} returns my-invoices.OL-template

${file.nr}

An automatic sequence number belonging to the current output file. It is automatically incremented for each new output file that gets created. Note, that multiple output files are created, for example, when output separation has been selected for output creation.

It is possible to format the number using a pattern and locale. See Formatting date and number values , below.

${file.pageCount}

This variable is intended for internal use only.
It was introduced for use in Printer Definitions for PostScript printers.

Usage of this variable in an Output Preset or in the Print Wizard is discouraged and it should be regarded as deprecated.

The Job object

${job}

${job} expands to a name based on the job name. A four digit sequence number is added at the end of the basename. The file extension is determined by the selected output technology.

${job} is basically a short hand for ${job.base}_${job.nr,0000}.${job.ext}

The 0000 in ${job.nr,0000} is a format pattern that takes care of formatting the number with at least four digits including leading zero's. See Formatting date and number values , below.

Example

If the job name My-Invoices-Reprint.XY2016 gets printed to PDF, then ${job} expands to My-Invoices-Reprint_0001.pdf

${job.base}

Returns the base name of the job without any extension.

Example

If the job name is My-Invoices-Reprint.XY2016, then ${job.base} expands to My-Invoices-Reprint

${job.name}

Returns the name of the job.

Example

If the job name is My-Invoices-Reprint.XY2016, then ${job.name} expands to My-Invoices-Reprint.XY2016

${job.nr}

An automatic sequence number belonging to the current output file. It is automatically incremented for each new output file that gets created. Note, that multiple output files are created, for example, when output separation has been selected for output creation.

It is possible to format the number using a pattern and locale. See Formatting date and number values , below.

${job.ext}

The extension that corresponds to the chosen output technology.

For example, for PDF output, ${job.ext} would be PDF, for PostScript output, ${job.ext} would return PS

Note, that ${job.ext} does not include a leading dot.

${job.metadata.propertyname}

Value of a meta data property of the job.

The propertyname must have been defined as a Tag Name on the Job Tags tab of the Metadata Options page in the Advanced Print Wizard.

Note: this is only available if separation is disabled or if Separation based on Job has been selected on the Separation page in the Advanced Print Wizard.

${job.count.pages} The total number of pages in the Job.

Other available properties

These are various properties available to the Output module that are not part of a larger object:

${system.time} Displays the current system data and/or time. Can be formatted using the Formatting date and number values , as seen below.
${page.nr} Page number, within Document.
${page.sequence.job} Page number, within the Job.
${page.sequence.segment} Page index, within the Job Segment.
${page.sequence.set} Page index, within the Document Set.
${document.metadata.propertyname}

Value of a meta data property of the document.

The propertyname must have been defined as a Tag Name on the Document Tags tab of the Metadata Options page in the Advanced Print Wizard.

Note: this is only available if Separation based on Document has been selected on the Separation page in the Advanced Print Wizard.

${document.sequence.job} Document index, within the Job.
${document.sequence.set} Document index, within the Document Set.
${document.count.pages} Total pages within the Document.
${set.metadata.propertyname}

Value of a meta data property of the document set.

The propertyname must have been defined as a Tag Name on the Document Set Tags tab of the Metadata Options page in the Advanced Print Wizard.

Note: this is only available if Separation based on Document Set has been selected on the Separation page in the Advanced Print Wizard.

${set.count.pages} Total pages of the Document Set.
${set.count.documents} Number of Documents within the Document Set.
${segment.metadata.propertyname}

Value of a meta data property of the job segment.

The propertyname must have been defined as a Tag Name on the Job Segment Tags tab of the Metadata Options page in the Advanced Print Wizard.

Note: this is only available if Separation based on Job Segment or Split At Exactly n Sheets has been selected on the Separation page in the Advanced Print Wizard.

${segment.count.pages} Total pages within Job Segment.

Formatting date and number values

Date and number values can be formatted using an optional pattern and/or locale.

​Form ​Description ​Example ​Result
​${expression} ​Do not format. ${system.time} ​July 4, 2009 12:30:55 PM
​${expression,pattern} ​Apply pattern with system locale ​${system.time, yyyyMMdd-HH:mm:ss} ​20090704-12:30:55
​${expression,pattern,locale} ​Apply pattern with the specified country locale ${system.time, "dd MMMM yyyy", nl} ​4 juli 2009
​${expression,,locale} ​Apply a default format with the specified country locale ${system.time,,nl} ​4 juli 2009 12:30:55

It is possible to enclose the values of the pattern and locale in single or double quotes. This is required for including whitespace in a pattern, or when the ${expression} would otherwise be ambiguous.

At run-time, the output engine determines the type of the value yielded by the expression. If this is a number, a number pattern is expected. For date/time-like types, a date pattern is expected. When no pattern is specified, some default format is applied. For other types, it is not possible to specify a pattern or locale.

 
  • Last Topic Update: 24/01/2017 09:32
  • Last Published: 7/6/2017 : 9:49 AM