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, e.g. when selectively adding inserts in the Inserter options.

A number of variables can be used as both File name variables and Content variables:

  • If the output is grouped and separated, Content variables (except for the owner and name properties) 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.

  • The template and file variables.

Note: 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.

The template and file variables can also be used in additional content (text and barcode).

Note: You can name the output file or folder through the Workflow configuration.
This is done by setting a Job Info variable in the Workflow configuration (see Job Info variables in the Workflow Online Help) and then referencing it in the Print options fields via the variable @automation.JobInfoX@ (where "X" is the number of the Job Info variable).

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

${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 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 Preset (or 'Untitled' if no Job 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 Preset without any extension.
Expands to Untitled if no Job 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 (including the condition).

  • In the Conditional field, e.g. when selectively adding inserts in the Inserter options (except the owner and name properties).

If the output is grouped and separated, Content variables (except for the owner and name properties) 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.

Note: 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).

Tip: If you separate a job into multiple jobs, segments, document sets or documents, you can include the file name - which will be different per part - in the additional text on banner pages using the name property. This property is only available at the actual separation level. (See Separation options and Additional Text Settings.)

Caution: 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.banner}

True when banner page has been selected

${page.cover}

True when cover page has been selected

${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.banner}

True when banner sheet has been selected

${sheet.count.pages} Total number of pages on the sheet.
${sheet.count.coverPages} Total number of cover pages on the sheet.
${sheet.cover}

True when cover sheet has been selected

${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 Meta Data options page in the Advanced Print Wizard or Job 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 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.

The following two variables are only available when the print job is separated at the document level. (See Separation.)

${document.owner}

When printing to a Windows Printer or LPR Queue, this variable contains the job owner name specified in the Job Owner Name field on the Print options page.

When printing to a directory, this variable contains an empty string.

${document.name}

When printing to a Windows Printer or LPR Queue, this variable contains the job name specified in the Job Name field on the Print options page.

When printing to a directory, this variable contains the Job Output Mask without the extension.

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 Meta Data options page in the Advanced Print Wizard or Job 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 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.count.coverPages}

Total number of cover pages in the document set.

${set.count.coverSheets}

Total number of cover sheets in the document set.

${set.count.coverDocuments}

Total number of cover 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.

The following two variables are only available when the print job is separated at the document set level. (See Separation.)

${set.owner}

When printing to a Windows Printer or LPR Queue, this variable contains the job owner name specified in the Job Owner Name field on the Print options page.

When printing to a directory, this variable contains an empty string.

${set.name}

When printing to a Windows Printer or LPR Queue, this variable contains the job name specified in the Job Name field on the Print options page.

When printing to a directory, this variable contains the Job Output Mask without the extension.

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 Meta Data options page in the Advanced Print Wizard or Job 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 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.count.coverPages}

Total number of cover pages in the segment.

${segment.count.coverSheets}

Total number of cover sheets in the segment.

${segment.count.coverDocuments}

Total number of cover documents in the segment.

${segment.count.coverSets}

Total number of cover sets in the segment.

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

The following two variables are only available when the print job is separated at the segment level. (See Separation.)

${segment.owner}

When printing to a Windows Printer or LPR Queue, this variable contains the job owner name specified in the Job Owner Name field on the Print options page.

When printing to a directory, this variable contains an empty string.

${segment.name}

When printing to a Windows Printer or LPR Queue, this variable contains the job name specified in the Job Name field on the Print options page.

When printing to a directory, this variable contains the Job Output Mask without the extension.

Job

Note: This Job object is not the same as the Job object described in the Output file variables.

The following two variables are only available when separation is either not used or set to the job level. (See Separation.)

${job.owner}

When printing to Windows Printer or LPR Queue, this variable contains the job owner name specified in the Job Owner Name field on the Print options page.

When printing to a directory, this variable contains an empty string.

${job.name}

When printing to Windows Printer or LPR Queue, this variable contains the job name specified in the Job Name field on the Print options page.

When printing to a directory, this variable contains the Job Output Mask without the extension.

Template

${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 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.

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.

For patterns and pattern characters see Date and time patterns and Number patterns.