What is the fastest way to change simplex/duplex output from workflow/datamapper variable:
using two sections switching in a control script, one duplex, one simplex?
changing the merge.context.sections.SectionName.sheetConfig.duplex value?
Input file of workflow/datamapper is a pdf named 3_S_test.pdf.
Output in Designer is the PDF Ressource of Datamapper.
the first variable (automation.properties.OriginalFilename.split(“_”)[0] stands for the number of pages of each document driving the boundaries script. This works.
But how can I change simplex/duplex the fastest way by using the second variable automation.properties.OriginalFilename.split(“_”)[1] (in this case S for Simplex, D for Duplex)
Edit: The fastest way may be creating 2 workflows, one for simplex, one for duplex jobs. But I‘m still curious if there‘s an idea to keep the number of workflows low.
Depending on how many Print Sections your Template currently contain and which Sheet Configuration settings are currently applied to each Print Section, you can apply a Control Script like the following one within your Template to achieve this:
When you’re sure that automation.properties.OriginalFilename.split("_") always returns an array with at least two values then I would recommend to change your JavaScript code to the following instead: