Configuring Post Composition Operations
The Post Composition Operations feature allows you to apply operations on print files after they are composed. For example, you can apply post composition operations to compress the output, or to copy it to a network shared folder. Post composition operations can be chained, allowing multiple operations to be carried out.
When admin users log into the uProduce dashboard, they can click the Settings tab on the toolbar to get the list of settings on the left, and then click the Post Composition Operation settings. This is where you create new post composition operations, edit the settings of existing operations, or clone existing operations to create new operations based on the original.
Note that by default, non-admin users will be able to see, but not create, edit or clone post composition operations. However, it is possible for the admin user to change the AllowNonAdminManageAccountLevelEntities system setting to true to allow all dashboard users to create, clone and edit account-level entities such as post composition operations.
Create Post Composition Operations
-
On the Post Composition Operations setting page, click the New button.
-
Name: Enter a descriptive name for the operation, so that when users are processing jobs and selecting post composition operations, the function of the operation will be clear.
For example, an Impose Output File operation could be named "8x5_sheet_with_6-up_labels" to clearly define what it is used for.
-
Type: Select the type of operation you want to perform:
-
Compress Output Files: Select how to compress the print output file.
-
Copy Output Files to Network Path: Define a network path as the destination for your production output.
-
Copy Output Files to FTP(S) Location: Select an FTP path as the target destination for your production output. For example, ftp://server:21/folder.
-
Copy Output Files to AWS S3: Select AWS S3 as the target destination for your production output.
-
Delete Output Files: Remove the output files from the uProduce server after they are copied to another location.
-
Copy Output Files to SFTP Location: Select an SFTP path as the target destination for your production output. For example, sftp://server:22/remote/path/to/directory.
-
Create Job Definition (JDF) File: Create a JDF file using an eXtensible Stylesheet Language Transformation to format the XML JDF file.
-
Impose Output File: Define a new imposition template.
-
Page Overlay Elements: Overlay text, graphics and barcodes (such as printer marks, page information or job tracking barcodes) on the pages of a composed document.
-
Rename Output Files: Rename each output file using a name expression that can include placeholders for job values such as the Job ID or the current date.
-
Output Snapshot: Save a copy of the current output so it can be brought back later in the chain, or swapped with the current output.
-
Split Output by Recipients: Break a single output PDF into separate files, either one file per recipient (PDF/VT only) or one file per fixed page count.
-
Partition Output: Split a PDF/VT output into a fixed number of batches (partitions) of recipients, for example to send a single production run to the printer as several smaller files.
-
Duplicate Output Pages: Repeat the output content — the whole document, groups of pages, or each recipient — by a constant number of copies or by a per-recipient value.
-
-
Settings: Depending on the operation selected, the available settings will change so you can configure the operation. The settings for each operation type are described below.
-
Available in Accounts: By default, a post composition operation is available in all uProduce accounts, including any accounts created in the future. Expand this setting and select Specific accounts to display the list of accounts on your server, then select the accounts where this operation should be available.
This setting is part of every operation type, whichever Type you selected above.
Note: If you are not an administrator, you can choose All Accounts only when your user has access to all accounts, or when the AllowNonAdminSetAllAccountsPermissions system setting is true. Otherwise, choose Specific accounts: the operation cannot be saved with All Accounts selected.
Compress Output Files
This operation packs all the files produced by the job into a single ZIP file, which replaces the individual output files.
-
Compression Level: Select how much the files are compressed inside the ZIP file:
-
Optimal: Compresses the files as much as possible. This produces the smallest ZIP file, but takes the longest.
-
Fastest: Compresses the files less, but finishes faster. Use this option when production speed matters more than file size.
-
NoCompression: Packs the files into the ZIP file without compressing them. This is the fastest option, and is useful when the output is already in a compressed format, such as PDF or JPEG: compressing such files again saves little space but still takes processing time. You still get a single ZIP file that is easier to copy, transfer, or download.
-
Copy Output Files to Network Path
-
Network Path: The network path to copy the files to. For example: "C:\path\" or \\server\share\path
-
Sub Folder: You can select to automatically create a subfolder in the network path and name it via the uProduce Job ID, or the current date time. If you select to create a subfolder, you will be able to customize the folder name using the format field and standard string formatting features. For example, for the Job ID, you can enter any static text string together with 0 or # placeholders for the Job ID. (0 will force a zero to display even if it is not required. # will display only if there is a number relevant.) If the Job ID is 1234 and Format is Job-000000000 the sub folder created will be Job-000001234.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which output files are copied. Leave the field empty to copy all files.
-
Network Path Requires Authentication: If needed, you can select this box to display fields to enter the required username and password for the shared folder.
Copy Output Files to FTP(S) Location
-
Ftp Url: The FTP path to copy the files to. For example, ftp://server:21/folder.
-
Sub Folder: You can select to automatically create a subfolder in the FTP location and name it via the uProduce Job ID, or the current date time. If you select to create a subfolder, you will be able to customize the folder name using the format field and standard string formatting features. For example, for the Job ID, you can enter any static text string together with 0 or # placeholders for the Job ID. (0 will force a zero to display even if it is not required. # will display only if there is a number relevant.) If the Job ID is 1234 and Format is Job-000000000 the sub folder created will be Job-000001234.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which output files are copied. Leave the field empty to copy all files.
-
Use Passive: Select to use Passive FTP mode. Otherwise, Active will be used by default.
-
Enable Ssl: Select to enable FTP with SSL (also called FTPS). Note that this is not SFTP.
-
Ftp Requires Authentication: This option is selected by default so you can enter the FTP username and password of a user who has write permission. You can clear the checkbox if authentication is not required.
Copy Output Files to AWS S3
-
Access Key: The access key for your S3 Bucket.
-
Secret Key: The secret key for your S3 Bucket.
-
Region: Select your AWS region from the list.
-
Bucket Name: Enter your S3 Bucket name
-
Bucket Base Folder: Enter the folder path where you want the output files copied.
-
Sub Folder: You can select to automatically create a subfolder in the network path and name it via the uProduce Job ID, or the current date time. If you select to create a subfolder, you will be able to customize the folder name using the format field and standard string formatting features. For example, for the Job ID, you can enter any static text string together with 0 or # placeholders for the Job ID. (0 will force a zero to display even if it is not required. # will display only if there is a number relevant.) If the Job ID is 1234 and Format is Job-000000000 the sub folder created will be Job-000001234.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which output files are copied. Leave the field empty to copy all files.
Delete Output Files
This option is designed to save disk space by removing the output files from the uProduce server after they are copied to another location. If you delete files from the uProduce server, they will not be available to download from the dashboard’s Job Center.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which output files are deleted. Leave the field empty to delete all files.
Copy Files to SFTP Location
-
SFTP Uri: The SFTP path to copy the files to. For example, sftp://server:22/remote/path/to/directory.
-
Sub Folder: You can select to automatically create a subfolder in the SFTP location and name it via the uProduce Job ID, or the current date time. If you select to create a subfolder, you will be able to customize the folder name using the format field and standard string formatting features. For example, for the Job ID, you can enter any static text string together with 0 or # placeholders for the Job ID. (0 will force a zero to display even if it is not required. # will display only if there is a number relevant.) If the Job ID is 1234 and Format is Job-000000000 the sub folder created will be Job-000001234.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which output files are copied. Leave the field empty to copy all files.
-
Username: The name of a user with write permissions to the SFTP location.
-
Password/Private Key File: The post composition operation can authenticate to the SFTP server with either a password or private key file. First, use the dropdown list to select the authentication option you want to use, then enter the password or select and upload the private key file.
Create Job Definition File (JDF)
The operation creates a JDF file for every print output file in the job, not only for the first one. Each JDF is written next to the file it describes, with the same name and a .jdf extension. This means it can follow an operation that produces several files — for example, you can partition a PDF/VT run into batches and generate a JDF for each batch.
The operation recognizes .pdf, .ps, .vps, .ppml, .vipp and .vdx as print output files. If the job output contains none of these, the operation fails.
-
JDF XSLT: The post composition operation for JDF uses an eXtensible Stylesheet Language Transformation to format the XML JDF file. The XSLT can be typed or pasted into the area provided.
To help you quickly get a sample XSLT to edit, XMPie provides a link to “load example xslt” which will insert a default XSLT template that will format the JDF with the same structure that the legacy JDF feature creates.
To create the JDF from the XSLT, the uProduce server creates an XML file with details of the job being processed. The XSLT template includes placeholders that can transform the values in the XML. For example, {./@Name} in the XSLT template will be replaced with the document name from the Name attribute of the JobDetails XML node.
Write an XSLT that produces a JDF per file
So that each JDF can describe its own file, the job XML includes a CurrentFile node holding the details of the file currently being processed. It has the following attributes:
-
FileIndex: The position of the file in the print output, starting at 1. Use it to give each JDF a unique part ID.
-
FileName, SubFolder: The name of the file and the output subfolder it sits in.
-
BytesCount, CreationDate, ModificationDate: The size of the file and its timestamps.
For example, {CurrentFile/@FileName} in the XSLT template will be replaced with the name of the file the JDF is being created for. The job XML also includes an Output node listing every file in the job output, with a TotalBytesCount attribute.
Note: An XSLT written for an earlier version does not reference CurrentFile, so it would produce an identical JDF for every file. The operation detects this and keeps a single JDF, so existing operations continue to behave as they did. To get a JDF per file, add a CurrentFile reference to your XSLT.
Impose Output File
The Impose Output File operation arranges the pages of the composed output on a larger printer's sheet, according to an imposition template that you define here.
The operation applies to PDF output only: PDF, PDF/VT-1, PDF/VT-3 and Legacy PDF. The formats it accepts are listed as Valid Print Formats at the top of the operation page.
The operation imposes every PDF file in the job output, not only the first one. This means it can follow an operation that produces several files — for example, you can partition a PDF/VT run into batches and then impose each batch on its own sheet layout.
The Impose Output File operation screen consists of two areas:
-
On the left are settings to define the imposition template.
-
On the right is a preview area to help visualize the imposition layout of the selected settings.
Sheet
-
Type: Select the finished sheet size from the Type dropdown list. To add custom sheet sizes, go to Settings > Sheet Sizes. Or, select "Custom" type to define a once-off or single-use sheet Width and Height. The sheet size is shown in the preview area by the white area on the gray pasteboard.
-
Width: When a Sheet Type is defined, the Width and Height are read-only. To set a custom once-off or single-use sheet size, select "Custom" from the Type dropdown list, and set the required Width and Height values. Note that the measurement units can be changed by using Settings > User Preferences.
-
Height: As above.
-
Left Margin, Top Margin, Right Margin, Bottom Margin: Set the non-printable area around the outside of the sheet. Each edge is a separate field. The margin is shown in the preview area by a thin gray line.
Imposition
-
Layout: Select the required imposition layout.
-
N-up – Pages are placed sequentially across each sheet until it's full, then continue on the next sheet. Think of it as filling one sheet at a time, e.g. left to right, top to bottom.
-
Cut stack – Pages fill each position one sheet at a time, going through the entire stack before moving to the next position. After printing, cut and stack the piles — pages come out in sequential order.
Note: In the preview area, k represents the number of sheets of the stack.
-
-
Dutch Cut: Switching this toggle to Yes sets up a second imposition grid that can be used to maximize the available sheet space and avoid material wastage. When Dutch Cut is on, the Dutch Cut Region Pages settings appear so you can configure the second grid.
-
Page flow style: Defines the path direction when reaching the end of a row or column:
-
Linear - Returns to the starting edge and continues in the same direction. Rows (or columns) always flow the same way. Example:
1 , 2 , 3 , 4
5 , 6 , 7 , 8
9,10,11,12 -
Zigzag - Reverses direction at the end of each row or column, creating a snake-like path. Example:
1 , 2 , 3 , 4
8 , 7 , 6 , 5
9,10,11,12
-
-
Page flow: Defines where placement begins and in which direction. Set by choosing a starting corner and an initial direction (horizontal or vertical). For example, Top Left → Right starts at the top-left corner and places pages horizontally first.
-
Rotate Pages 90°: Switch this toggle to Yes to rotate all pages 90° on the sheet.
-
Duplex: Changes the sequence of the recipient pages on the even sheets so that they match the odd side when printed duplex or double-sided.
-
None (Single-sided printing)
-
Flip left-to-right
-
Flip top-to-bottom
-
Pages
-
Max Page Width: The largest page width this imposition template is designed to take. If a page in the output is wider than this, the operation fails with a "page too wide" error, and the job reports the error in the Job Center.
The value is compared against the page's trim box — the finished page area — not the full page size, so bleed outside the trim box does not count towards it. Leave the field at 0 to skip the check.
-
Max Page Height: As above, for the page height. A page that is too tall fails the operation with a "page too tall" error.
-
Rows: Enter the number of rows of pages that you want to print on the sheet.
-
Columns: Enter the number of columns of pages that you want to print on the sheet.
-
Flip Page(s): This setting allows you to rotate pages 180° according to a cyclic or repeating pattern. Use 1 to rotate a page, or 0 to not rotate a page. For example:
-
"01" will rotate every second page.
-
"1100" will rotate pages 1,2,5,6,9,10…
-
-
Row Gap(s): Enter the value(s) you want in between rows using a cyclic or repeating pattern. (Use a space separator between values in the pattern.) For example:
-
"5" will put 5 of your measurement units in between each row.
-
"5 0" will put 5 of your measurement units in between the first and second rows, 0 space between the second and third rows, and repeat the pattern for the following rows.
-
-
Column Gap(s): Enter the value(s) you want in between columns using a cyclic or repeating pattern. (Use a space separator between values in the pattern.) For samples, see Row Gap(s) above.
-
Horizontal Alignment: Positions the imposition grid horizontally on the sheet: Center (the default), Left or Right.
-
Horizontal Offset: Enter a positive or negative value to shift the imposition grid to the left or right.
-
Vertical Alignment: Positions the imposition grid vertically on the sheet: Center (the default), Top or Bottom.
-
Vertical Offset: Enter a positive or negative value to shift the imposition grid up or down.
Dutch Cut Region Pages
-
Location: Sets the location of the second imposition grid to the right or bottom of the sheet.
-
Note that either Column or Row gaps are controlled by the pages section depending on the Location setting.
-
Rows, Columns, Flip Page(s), Row Gap(s), Column Gap(s): These work the same way as the matching settings in the Pages section above, but apply to the second grid.
-
Alignment (Horizontal): Positions the second grid horizontally. In addition to Center, Left and Right, this setting offers two options that the main grid does not:
-
Left Edges – lines the pages of the second grid up with the left edges of the pages in the main grid.
-
Right Edges – lines them up with the right edges of the pages in the main grid.
-
-
Offset (Horizontal): Enter a positive or negative value to shift the second grid left or right from its alignment position.
Printer Marks
-
Crop Marks: Adds fine horizontal and vertical rules that define where the sheet should be trimmed.
-
Top Offset, Bottom Offset, Left Offset, Right Offset: Specify how far from each edge of the sheet the crop marks are drawn. Each edge has its own field, so you can move the marks in from one edge without affecting the others. The fields become available when Crop Marks is selected.
Preview Information
Imposition templates can be used with any print document on the uProduce server. So, when you are creating the template, it is useful to see how the template will work with different input document sizes. To assist with this, you can define the preview page size. The preview page size is only used to show the result of the current settings when used with a document of the preview page size.
Each setting in this section is a checkbox that enables its value. The settings affect the preview only; they do not change the output.
-
Page Width, Page Height: Select these to preview the template against a page of a particular size.
-
Page Bleed: Select this to show a bleed area around each previewed page, then set the Top, Bottom, Left and Right bleed values.
-
Page Crop Marks with Offset: Select this to show crop marks around each previewed page, and enter the offset at which they are drawn.
Page Overlay Elements
The Page Overlay Elements operation places text, graphics and barcodes (such as registration marks, color bars, page information, or job tracking barcodes) on top of the pages of a composed document. It is useful as a prepress step to add marks to an existing PDF, or to complement the Impose Output File operation.
Page Overlay Elements is not a replacement for dynamic content. Text elements are limited to a single line in a fixed font (Courier), and do not support font selection. The text is drawn in registration black with an outline in the paper color, so that it stays readable over dark artwork.
The operation applies to Print and Proof composition, and to PDF output only: PDF, PDF/VT-1, PDF/VT-3 and Legacy PDF. These are listed as Valid Composition Types and Valid Print Formats at the top of the operation page.
Every PDF file in the job output is overlaid, not only the first one. The elements are added to the pages of the existing file, so its structure is preserved — including the recipient boundaries, metadata and output intents of a PDF/VT file.
The Page Overlay Elements screen consists of two areas:
-
On the left are settings to define the overlay elements and the page preview.
-
On the right is a preview area to help visualize the placement of the elements on the page.
When Page Overlay Elements is chained with Impose Output File in a job ticket, the order of the operations determines where the elements are placed. Running Page Overlay Elements after Impose Output File adds the elements to the imposed sheet (typical for marks such as registration marks or a color bar on the sheet). Running Page Overlay Elements before Impose Output File adds the elements to each page of the document, so they appear on every imposed page on the sheet.
Page Preview
The Page Preview settings control how the preview area on the right appears, to help you visualize the placement of the overlay elements. These settings affect the preview only; they do not affect the output.
-
Type: Select the page size for the preview. The list includes standard sheet sizes, any custom sheet sizes defined in Settings > Sheet Sizes, as well as "Custom" and "Sample File". Select "Custom" to enter any Width and Height. Select "Sample File" to use the page size of a PDF listed in the Graphic Resources section.
-
Sample File: Select one of the PDFs listed in the Graphic Resources section to use its page size for the preview. The PDF is also drawn behind the preview page, so you can position elements against real artwork. Selecting a file here sets Type to "Sample File" automatically.
-
Width: When a standard sheet size or "Sample File" Type is selected, the Width is read-only. When "Custom" is selected, enter the required Width. Note that the measurement units can be changed by using Settings > User Preferences.
-
Height: As above.
-
Left Guide, Top Guide, Right Guide, Bottom Guide: Optional visual markers to help you visualize margins, bleed, or other areas when placing overlay elements. The guides are displayed in the preview area at the specified distance from each edge. They are for visibility only and do not affect the position of overlay elements or the output.
Elements
Click the Add Element button to add an overlay element. Each element can be expanded to show its settings, or collapsed to save space. Use the arrow icons to reorder elements, and the trash icon to delete an element.
Elements are drawn in the order they appear in the list (Z order), both in the preview and in the output. If elements overlap, elements lower in the list are drawn on top of those above them. Hovering an element row in the list highlights the element in the preview area.
The gray area around the page in the preview is the pasteboard. An element that extends past the edge of the page is outlined in red, and an element that runs off the pasteboard is drawn as a solid red block. An element positioned entirely outside the pasteboard is not drawn at all.
Each element has the following common settings, grouped into sections:
-
Type: Select the element type:
-
Text - A single line of text.
-
Barcode - A barcode generated from a JavaScript data expression.
-
Graphic - A PDF from the Graphic Resources list.
-
-
Apply to Pages (Visibility): Select the pages of the document on which the element is displayed:
-
All Pages
-
Odd Pages
-
Even Pages
-
First Page Only
-
Last Page Only
-
Custom - Shows an Expression field, where you enter a JavaScript expression that decides, page by page, whether the element is displayed. The element is displayed on a page when the expression returns a "truthy" value. Only false, 0, an empty string (""), null, undefined and NaN hide the element; any other value displays it — including the string "false". See Custom JavaScript Expressions.
The page-based options (Odd, Even, First, Last) count the pages of each output file separately.
-
-
Size (Width, Height): The size of the element. For Text elements, the height sets the font size, and the width sets the box that the text is aligned within — the text is not wrapped or trimmed to fit, so allow enough width for the longest value. For Barcode elements, the barcode is scaled proportionally to fit within the box and centered in it, so that it stays scannable; it is not stretched to fill the box. For Graphic elements, the size is taken from the original graphic and cannot be edited.
The minimum width and height are 6 pt for Text elements and 36 pt for Barcode elements. A smaller value is raised to the minimum.
-
Position: Sets the placement and rotation of the element on the page.
-
Horizontal Alignment: Aligns the element horizontally (Left, Center, Right) relative to the page.
-
Horizontal Offset: Enter a positive or negative value to shift the element left or right from the alignment position.
-
Vertical Alignment: Aligns the element vertically (Top, Center, Bottom) relative to the page.
-
Vertical Offset: Enter a positive or negative value to shift the element up or down from the alignment position.
-
Rotation: Rotates the element. Options are 0°, 90°, 180°, and 270°.
-
In addition to the common settings, each element type has its own section:
-
Text Data: For Text elements, the Data dropdown selects what to display:
-
Page i of n
-
Page i
-
Page Index
-
Date & Time
-
Document Name
-
Document Name & Page Index
-
Custom - Shows an Expression field, where you enter a JavaScript expression that returns the text to print on each page. The returned value is converted to text, so a number such as 3 prints as "3". To print nothing on a page, return an empty string (""). Returning null or undefined, or not returning a value at all, fails the job. See Custom JavaScript Expressions.
-
-
Barcode: For Barcode elements:
-
Type: Select the barcode symbology, such as QRCode, DataMatrix, Code128, EAN13, PDF417, USPSIntelligentMail or 4state_Mailmark. The default is QRCode. The preview area shows a sample image of the selected barcode type, not the data that will be encoded.
-
Data Expression: A JavaScript expression that returns the data to encode in the barcode on each page. The expression must return data on every page on which the barcode is displayed: returning an empty string, null or undefined fails the job. To omit the barcode from some pages, use a Custom visibility expression. The job also fails if the data cannot be encoded in the selected barcode type, for example, letters in an EAN13 barcode. See Custom JavaScript Expressions.
-
Properties: Optional barcode settings, entered as Key=Value pairs separated by semicolons. These are the same properties as the uCreate barcode properties. An invalid property fails the job. Do not change the output type (OutputType) property: the barcode must be generated as PDF, and any other output type fails the job.
Spot colors are not supported for overlay barcodes. Barcodes are printed in black.
-
-
Graphic: For Graphic elements, the Source dropdown selects the graphic to display from the list of resources in the Graphic Resources section. When a source is selected, the graphic is placed at its original size and the Width and Height fields are disabled. Every Graphic element needs a source: the operation cannot be saved while one is left unselected.
Custom JavaScript Expressions
JavaScript expressions let you decide, page by page, whether an element is displayed and what it prints or encodes. You can enter an expression in three places:
-
Apply to Pages (Visibility): When Visibility is set to Custom, the expression decides whether the element is displayed on the page.
-
Text Data (Data): When Data is set to Custom, the expression returns the text to print.
-
Barcode (Data Expression): The expression returns the data to encode in the barcode.
What you enter is the body of a JavaScript function, so it must include a return statement. The expression reads a global object, state, which holds information about the operation's output files, the current file and record, and the job. The expression runs separately for every page. For example, the following text expression prints "Page 3 of 10 - Spring Mailing":
return 'Page ' + state.currentFile.pageIndex + ' of ' + state.currentFile.pageCount + ' - ' + state.job.Campaign.Name;
The state object contains the following fields. All page, file and record numbers start from 1.
|
Field |
Description |
|---|---|
|
Output files (all of the output files processed by the operation) |
|
|
state.operationFiles.currentIndex |
The number of the current output file among the files the operation processes. |
|
state.operationFiles.count |
The number of output files the operation processes. |
|
Current file |
|
|
state.currentFile.name |
The name of the current output file, including its extension (for example, Output_01.pdf). |
|
state.currentFile.pageIndex |
The page number within the current output file. |
|
state.currentFile.pageCount |
The number of pages in the current output file. |
|
state.currentFile.recordIndex |
The number of the record that the page belongs to, within the current output file. PDF/VT output only. |
|
state.currentFile.recordCount |
The number of records in the current output file. PDF/VT output only. |
|
Record (PDF/VT output only; state.record is null for other output) |
|
|
state.record.pageIndex |
The page number within the current record's pages. Restarts at 1 for each record. |
|
state.record.pageCount |
The number of pages in the current record. |
|
Job |
|
|
state.job |
The job's details, as the uProduce REST API returns them. Field names are capitalized, as in the job's JSON. Commonly used fields: |
|
Functions and your own values |
|
|
state.getDpmData(path) |
Reads a value from the PDF/VT document part metadata (DPM) of the current record, and returns it as text. The path uses the same syntax as the {DPM:path} token. Returns null if the value is not found, or if the output is not PDF/VT. |
|
state.user |
An empty object for your own values. Values you store in it are kept across pages and output files, and are shared by all of the expressions in the operation. |
A record is the set of pages produced for one recipient. The record fields (currentFile.recordIndex, currentFile.recordCount and state.record) and state.getDpmData() read the record structure of a PDF/VT file, so they work only for PDF/VT-1 and PDF/VT-3 output. For any other output, the record fields and state.record itself are null, and getDpmData() returns null.
The record fields count within the current output file. For example, if a Split Output by Recipients or Partition Output operation runs earlier in the chain, currentFile.recordIndex restarts at 1 in each file. If the record structure of a PDF/VT file cannot be read, a warning naming the file is shown in the Job Center, and the record fields for that file are null.
The fields of state.job are the same job information that is available to output file names. To see every field for a particular kind of job, download the job's JSON from the Job Center; note that state.job does not include the job's output or messages. See Other job properties. For the getDpmData() path syntax and the available paths, see PDF/VT document part metadata (DPM). Write the path without the braces and the DPM: prefix — for example, state.getDpmData('Contact/Person/FirstName').
If the job details cannot be read when the operation starts, state.job is null and a warning is shown in the Job Center. Only an expression that reads state.job then fails.
When a field that can be null is joined into text, JavaScript prints the word "null". For example, return 'Copy ' + state.currentFile.recordIndex; prints "Copy null" on non-PDF/VT output. If a value might be missing, check it first:
return state.currentFile.recordIndex === null ? 'Proof copy' : 'Copy ' + state.currentFile.recordIndex + ' of ' + state.currentFile.recordCount;
Examples:
-
Display an element on every page except the first page of each output file (visibility):
return state.currentFile.pageIndex > 1; -
Display an element only on the first page of each record, for PDF/VT output (visibility):
return state.record !== null && state.record.pageIndex === 1; -
Display an element only on the last page of the last output file (visibility):
return state.operationFiles.currentIndex === state.operationFiles.count && state.currentFile.pageIndex === state.currentFile.pageCount; -
Number the pages within each record, for PDF/VT output (text). On a 4-page record, this prints 1 / 4, 2 / 4, 3 / 4 and 4 / 4, and then restarts for the next record:
return state.record.pageIndex + ' / ' + state.record.pageCount; -
Print the campaign name and the job submission date (text):
return state.job.Campaign.Name + ' ' + new Date(state.job.SubmitDate).toLocaleDateString('en-GB'); -
Encode the recipient's ID from the document part metadata, for PDF/VT output (barcode data):
return state.getDpmData('ExternalID'); -
Number the pages continuously across all output files, using state.user to keep a running count (text, with Visibility set to All Pages):
state.user.page = (state.user.page || 0) + 1; return state.user.page;
The job fails if an expression contains a syntax error, if it throws an error while running, if a single run of the expression takes longer than 1 second, or if it returns a value that is not allowed (for example, a text expression that returns null). A syntax error fails the job before any page is processed. The error message in the Job Center identifies the element by its number in the Elements list (counting from 1, top to bottom) and gives the line number within the expression, where line 1 is the first line you typed. When the job fails, the original output files are left unchanged.
Note: Text elements reliably print only unaccented Latin characters (A–Z, digits and common punctuation). Accented letters and other scripts, such as Hebrew, Cyrillic or Chinese, may be replaced or printed incorrectly.
Graphic Resources
The Graphic Resources section manages the PDFs available as sources for Graphic elements. Click Add Graphic to upload a PDF. Only PDF files are supported.
Five built-in resources are provided and are marked as built-in: two color bars (ColorBarsCMYK.pdf and ColorBarsRegistrationBlack.pdf) and three registration marks drawn with different line weights (RegistrationMark_0125.pdf, RegistrationMark_0250.pdf and RegistrationMark_0500.pdf, for lines of 0.125, 0.25 and 0.5 points).
A built-in resource cannot be deleted, but it can be overridden by uploading a PDF with the same name; the override replaces the built-in resource until it is deleted, after which the built-in resource is restored.
Graphic resources are saved per post composition operation, except for built-in resources which are shared across all operations.
Rename Output Files
The Rename Output Files operation renames each output file using a name expression. The expression is plain text that can include placeholders, written between curly braces, that are replaced at run time with values from the job — such as the Job ID, the Job Name, or the current date.
The operation is most useful as part of a chained post composition workflow. For example, when a job is imposed several times into different layouts, the rename can give each imposed file a meaningful name before the next operation in the chain runs.
-
Output File Name: Enter the expression that defines the new file name. The default value is {InputFileName}, which is the placeholder for the file's current name (without the extension — the extension is preserved automatically).
Use the Insert Field dropdown to insert a placeholder at the cursor position, or type any placeholder directly into the field. See Output Naming Tokens for the full list of placeholders and the syntax.
The original file extension is preserved automatically. Characters that are not valid in a file name are replaced with an underscore. If two files in the output would end up with the same name, a numeric suffix is added so each file is unique.
Output Snapshot
The Output Snapshot operation saves a copy of the current output so that later operations in the same job can bring it back. A typical use is to save the original composed output before imposing it, so the chain can return to the original — for example, to impose it a second time with a different layout.
More than one snapshot can be saved during a single job. By default, the Restore, Merge, Swap, and Drop actions apply to the most recent snapshot. An earlier snapshot can be targeted by giving it a tag when it is saved.
-
Action: Select what the operation should do:
-
Save – Saves a copy of the current output as a new snapshot. The current output is left untouched.
-
Restore – Replaces the current output with the snapshot. Files in the output folder are removed first, then replaced with the snapshot files. The snapshot itself is removed.
-
Merge – Adds the snapshot files to the current output without removing existing files. The snapshot is then removed. If a file or folder in the snapshot has the same name as one already in the output, the operation fails — use a Rename Output Files operation before Merge to give the files different names.
-
Swap – Exchanges the current output with the snapshot. The current output becomes the snapshot, and the snapshot becomes the current output.
-
Drop – Discards the snapshot without affecting the current output.
-
-
Tag: Optional name for the snapshot. With the Save action, the Tag names the snapshot being created. With the other actions, the Tag selects which snapshot to target — if several snapshots share the same tag, the most recent one is used. When the field is empty, Save creates an unnamed snapshot, and the other actions apply to the most recent snapshot regardless of tag.
-
File Filter: Optional wildcard pattern (for example, *.pdf) that limits which files are saved into the snapshot. Used by the Save action only. Leave the field empty (or enter * or *.*) to save all files.
Split Output by Recipients
The Split Output by Recipients operation breaks a single output PDF into several smaller PDFs. It is useful when a job is produced as one continuous PDF for printing but also needs to be archived or delivered as separate files — for example, one PDF per recipient for backup or for an online statement portal. The original PDF is replaced by the split files.
-
Split Mode: Choose how the file is split:
-
By Recipients – Each recipient becomes a separate output file. This mode requires PDF/VT input, because the recipient boundaries are identified from the PDF/VT document part (DPart) structure. The output files preserve the PDF/VT structure, including the document part metadata (DPM).
-
By Pages per Recipient – The file is split sequentially by a fixed page count. Every N pages becomes a new output file. This mode works on any PDF or PDF/VT output and is useful when each recipient has the same number of pages and the document is not PDF/VT.
-
-
Pages Per Recipient: Appears only when Split Mode is set to "By Pages per Recipient". Enter the number of pages each output file should contain. The value must be between 1 and 100. The default is 1.
-
File Name: Enter the expression that defines the name of each split file. The default value is {InputFileName}_{Index:000000}, where {Index} is the 1-based sequence number of the output file (padded with leading zeros to six digits).
Use the Insert Field dropdown to insert a placeholder at the cursor position, or type any placeholder directly into the field. The dropdown includes a DPM Field entry that inserts a {DPM:} placeholder for reading a value from the PDF/VT document part metadata. See Output Naming Tokens for the full list of placeholders and the syntax.
Characters that are not valid in a file name are replaced with an underscore.
Partition Output
The Partition Output operation splits a single PDF/VT output into a fixed number of batches (partitions), each containing a contiguous range of recipients. Unlike Split Output by Recipients — which produces one file per recipient — this operation produces one file per batch. It is useful when a job needs to be sent to the printer in smaller pieces, for example, splitting a 10,000-recipient run into two files of 5,000 recipients each. The original PDF is replaced by the partition files.
-
Method: Choose how the partitions are sized:
-
Number of Partitions – Splits the input into a fixed number of files, distributing the recipients as evenly as possible. If the recipient count does not divide evenly, the first partitions each receive one extra recipient.
-
Recipients per Partition – Splits the input by a fixed recipient count per file. The last file may contain fewer recipients if the total does not divide evenly.
-
-
Number of Partitions / Recipients per Partition: The label of this field changes to match the selected Method. For Number of Partitions, enter how many output files to produce; the minimum is 2 and the default is 2. For Recipients per Partition, enter how many recipients each output file should contain; the default is 200.
-
File Name: Enter the expression that defines the name of each partition file. The default value is {InputFileName}_{Index:000000}, where {Index} is the partition number (padded with leading zeros to six digits).
Use the Insert Field dropdown to insert a placeholder at the cursor position, or type any placeholder directly into the field. The dropdown includes a DPM Field entry that inserts a {DPM:} placeholder for reading a value from the PDF/VT document part metadata. See Output Naming Tokens for the full list of placeholders and the syntax.
Because a partition file contains many recipients but produces a single file name, a {DPM:…} placeholder in a partition file name resolves to the value of the first recipient in the partition.
Characters that are not valid in a file name are replaced with an underscore.
Duplicate Output Pages
The Duplicate Output Pages operation creates additional copies of the content in the output PDF. The duplication can be applied to the whole document, to groups of pages, or — for PDF/VT input — to each recipient. The original PDF is replaced by the duplicated output.
This operation is most useful in chained workflows where the number of copies needs to be applied as part of the production. For example, a job submitted with a per-order copy count (such as from a uStore order) can be duplicated here, then sent through the rest of the chain — for example, into an imposition operation that produces an imposed file with the right number of copies.
-
Mode: Choose what to duplicate:
-
Document – The whole document is repeated as a block. The output contains the input pages once, then again, for the requested number of copies.
-
Pages – Pages are repeated in groups of a fixed size. With a group size of 1, each page is duplicated in place; with a group size of 2, each pair of pages is duplicated in place; and so on. See Group Size below.
-
Recipients – Each recipient is duplicated in place: all copies of one recipient appear together before the next recipient begins. This mode requires PDF/VT input. Use it when each recipient should receive multiple consecutive copies of their content.
-
-
Group Size: Appears only when Mode is set to "Pages". Enter the number of pages that form one group. The total page count of the input must divide evenly by the group size. For PDF/VT input, the group size must also match each recipient's page count, so this mode is only suitable for PDF/VT files where every recipient has the same number of pages. The default is 1.
-
Copies: The number of copies to produce. The default is 2. Type a value directly, or use the Insert Field dropdown to fill the field with a preset value. Unlike the file-name fields in other operations, this field accepts a single value rather than an expression. The value can take any of three forms:
-
A constant number.
-
A job property path — for example, Ticket.Job.Metadata.Values.Copies, which is one of the options in the Insert Field dropdown. The path is written without braces.
-
A DPM path in the form {DPM:path} — reads the copy count separately for each recipient from the document part metadata, allowing different recipients to receive different numbers of copies. Requires PDF/VT input, and requires Mode to be set to "Recipients" or "Pages"; in "Document" mode the operation fails with the error "DPM copies requires Recipients or Pages mode". If the value is 0 for a recipient, that recipient is omitted from the output. If it is missing, not a number, or negative, the operation stops and the job fails.
See Output Naming Tokens for the full list of placeholders and the syntax.
-
Editing an existing Post Composition Operation
To change an operation, click the Edit link next to it in the Post Composition Operation list. Saving the operation overwrites the previous settings.
Any job ticket that uses this operation will use the new settings from now on. If several job tickets share the operation, editing it changes production for all of them.
Cloning an existing Post Composition Operations
The Post Composition Operation list includes a Clone link next to each operation.
Clicking the Clone link opens the dialog to create a new Post Composition Operation, but instead of loading the default settings, the clone operation copies the settings from the source operation that you cloned.
This is particularly helpful for the Impose Output File operation where there are many settings.
When you clone an operation, the name of the source operation is also copied. You must change the name of the new operation to reflect the purpose of the new operation. You will not be able to save the operation with the same name.
It is important to clearly name your Post Composition Operations so that when dashboard users are processing jobs, they can easily identify which operation they need to select to perform the desired task.
For example, an Impose Output File operation could be named "8x5_sheet_with_6-up_labels" to clearly define what it is used for.