In Planet Press design I had a job that ran mixed plex. Based on a value in a field I would turn the duplex on or off. How can I do that in connect designer?
You can do that via control script. See the following page in the online documentation. At the bottom of that page you can find an example.
sheetConfig (uplandsoftware.com)
Hope that helps.
EDIT:
You do not need the whole example script. Below you can find an example to your question. Of course you have to use your section name (instead of MySection
) and your condition logic (record field name and content).
let section = merge.template.contexts.PRINT.sections["MySection"];
if(record.fields.EXAMPLEFIELD.toLowerCase() == 'duplex'){
section.sheetConfig.duplex = true;
}
else {
section.sheetConfig.duplex = false;
}
So I have added the following control script
let section = merge.template.contexts.PRINT.sections[“Page 1”];
if(record.fields.Field32.toLowerCase() == “even”){
section.sheetConfig.duplex = true;
}
else {
section.sheetConfig.duplex = false;
}
but when I send the job to workflow the postscript file doesn’t contain any duplex calls.
I tried it with PostScript on my site and it works fine. Are you using the imposition output option with “Sides” option “Simplex”? In that case you cannot control the duplex mode individual.
Otherwise I don`t know why it does not work on your site. Maybe the record field never has the value “even”? To check your condition you can try writting to the log (message pane).
let section = merge.template.contexts.PRINT.sections[“Page 1”];
if(record.fields.Field32.toLowerCase() == “even”){
logger.info("duplex is true");
section.sheetConfig.duplex = true;
}
else {
logger.info("duplex is false");
section.sheetConfig.duplex = false;
}
Okay I can now make it work, but the back pages are blank where I want them to be the next record.
For instance
Sheet 1 record 1 & 2 duplex
Sheet 2 record 3 simplex
Sheet 3 record 4 & 5 duplex
Sheet 4 record 6 & & duplex
and so on.
I must be setting something up wrong somewhere.