Print output variables

In Print output, File name variables can be used to create dynamic output file names, while Content variables can be used in additional content and in the Conditional field when selectively adding inserts in the Inserter Options.

When using a variable in a condition, do not wrap it in ${ }. This notation is only necessary in the context of a text (like file names or additional page content).

File name variables

File name variables are available in a few places in the Print Options:

  • In the Job Output Mask and Job Output Folder fields when using the Directory option.
  • In the Job Name field when using the Windows Printer option.

You can name the output file or folder through the WorkFlow.

This is done by setting a JobInfo field in the WorkFlow and then referencing it in the Print Options fields via the variable @automation.JobInfoX@ (where "X" is the number of the JobInfo field).

If the output is to be separated into multiple files, some Output content variables can also be used as Output file variables, depending on the level of separation (see Content variables).

Template

The variables ${template}, ${template.base} and ${template.name} are only available when printing directly from Designer.
${template}

${template} is a shorthand for ${template.base}_${template.nr,0000}.${template.ext}.

It expands to a name based on the template name. A four digit sequence number is added at the end of the base name. The file extension is determined by the selected output format.

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} 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 when Separation has been selected in the Output Creation preset.

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 format (in lower case).

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.

File

${file}

${​file} is a shorthand for ${file.base}_${file.nr,0000}.${file.ext}. It expands to an internally generated file name with a four digit sequence number at the end. The file extension is determined by the selected output format.

The 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.

Example
When printing to PDF, ${file} could expand to merged.5852941188491153960_0001.pdf.

${file.base} Expands to a unique, internally generated file name, without a trailing dot or extension.
${file.ext}

The extension that corresponds to the chosen output format, for example pdf or ps.
Note that ${file.ext} does not include a leading dot.

${file.nr}

An automatic sequence number belonging to the current output file. It is automatically incremented for each output file that gets created within the same job.

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

${file.pageCount}

This variable was introduced for use in Printer Definitions for PostScript printers.
As it entails page buffering and could easily lead to Out of Memory errors with big jobs, usage of this variable in an Output Preset or in the Print Wizard is discouraged; it should be regarded as deprecated.

Job

${job}

${job} is a shorthand for ${job.base}_${job.nr,0000}.${job.ext}. It expands to a name based on the name of the applied Job Creation preset (or 'Untitled' if no Job Creation preset was used). A four digit sequence number is added at the end of the base name. The file extension is determined by the selected output format.

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.

${job.base} or ${job.name} Returns the name of the applied Job Creation preset without any extension.
Expands to Untitled if no Job Creation preset was used.
${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 format, for example pdf or ps.
Note that ${job.ext} does not include a leading dot.

Content variables

The variables listed below can be used in text, barcodes, and OMR and Image data in the Additional Content page, and in the Conditional field when selectively adding inserts in the Inserter Options.

If the output is grouped and separated, Content variables on the separation level and above are also available as File name variables. For example, if the output is grouped on the job segment and document set level, and is to be separated on the Document Set level, the set and segment variables can also be used in the Job Output Mask field.

Use count variables with caution. They entail higher memory usage in Weaver (the engine that creates Print output). When, for example, segment.count.pages is used in additional text, the Weaver engine has to buffer all pages until it knows how many pages the segment counts in order to include that total in the additional text on each page. With big jobs this could easily lead to Out of Memory errors.

System

${system.time} Displays the current system data and/or time. Can be formatted using the Formatting date and number values , as seen below.

Page

${page.back} True when the page is on the back of the sheet.
${page.front} Boolean indicating whether the page is on the front of the sheet.
${page.height} The page's height (in points).
${page.landscape} True when the page's orientation is landscape.
${page.portrait} True when the page's orientation is portrait.
${page.nr} or ${page.sequence.document) Page number in the document.
${page.sequence.sheet} Page number on the sheet.
${page.sequence.set} Page number within the document set.
${page.sequence.segment} Page number within the job segment.
${page.sequence.job} Page number within the job.
${page.width} The page's width (in points).

Sheet

${sheet.count.pages} Total number of pages on the sheet.
${sheet.duplex} True when printing on the sheet is duplex.
${sheet.height} The sheet's height (in points).
${sheet.pageDevice} Array specifying the sheet's Type (e.g. Plain), Weight (e.g. 83), Color (e.g. yellow), Width (in points), Height (in points) and Tumble (e.g. false).
${sheet.nr} or ${sheet.sequence.document} Sheet number within the document.
${sheet.sectionName}

Name of the Template Section that the Sheet belongs to.

${sheet.sequence.set} Sheet number within the document set.
${sheet.sequence.segment} Sheet number within the job segment.
${sheet.sequence.job} Sheet number within the job.
${sheet.simplex} True when printing on the sheet is simplex (one-sided).
${sheet.width} The sheet's width (in points).

Document

${document.metadata.propertyname} or ${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 or Job Creation preset.

Note: this variable is only available if Separation based on Document has been selected on the Separation options page in the Advanced Print Wizard or Output Creation preset.

${document.count.pages} Total number of pages in the document.
${document.count.sheets}

Total number of sheets in the document.

${document.nr} or ${document.sequence.set} Document number within the document set.
${document.sequence.segment} Document number within the job segment.
${document.sequence.job} Document number within the job.

Set

${set.metadata.propertyname} or ${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 or Job Creation preset.

Note: this variable is only available if Separation based on Document Set has been selected on the Separation options page in the Advanced Print Wizard or Output Creation preset.

${set.count.pages} Total number of pages in the document set.

${set.count.sheets}

Total number of sheets in the document set.

${set.count.documents} Total number of documents in the document set.
${set.nr} or ${set.sequence.segment} Document set number within the job segment.
${set.sequence.job} Document set number within the job.

Segment

${segment.metadata.propertyname} or ${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 Segement Tags tab of the Metadata options page in the Advanced Print Wizard or Job Creation preset.

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

${segment.count.pages} Total number of pages in the job segment.
${segment.count.sheets}

Total number of sheets in the job segment.

${segment.count.documents}

Total number of documents in the job segment.

${segment.count.sets}

Total number of document sets in the job segment.

${segment.nr} or ${segment.sequence.job} Job segment number within the job.

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", fr} ​19 décembre 2017
​${expression,,locale} ​Apply a default format with the specified country locale ${system.time,,fr}> 19 décembre 2017 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.