sheetConfig

Sheet configuration settings are the Master Page, Media and Duplex printing options of first/middle/last/single or all sheets in a Print section. The sheetConfig object holds these options and can be used to set (or rather, override) them via a Control Script (see Control Scripts and Control Script API). This is especially useful when you need identical sections with different sheet configuration settings.

The sheetConfig object can be retrieved via the section object (see section); see the example below.

Fields

The fields of the sheetConfig object correspond to settings in the Sheet Configuration dialog; see Sheet Configuration dialog.

Field Type Description
duplex Boolean

Enables or disables duplex (two-sided) printing.

facingPages Boolean (Only with duplex printing.) When facingPages is set to true, the margins of the section switch alternately, so that pages are printed as if in a magazine or book.
mediaRotation Number Rotates the Media by 0, 90, 180, or -90 degrees.
omitEmptyBackside Boolean (Only with duplex printing.) Resets a page to Simplex if it has an empty back side. This may reduce volume printing costs.
positions Positions (see Position) Used to modify the Master Page and Media and to allow content on sheets in different positions; for example:
var section1 = merge.template.contexts.PRINT.sections[0];
section1.sheetConfig.positions.all.media = "Media 1";

For an overview of the available settings in each position see Position.
tumble Boolean (Only with duplex printing.) When tumble is set to true, pages are printed like in a calendar. (On Portrait output, this would be equivalent to short-edge duplex.)

Example

This script retrieves a section and changes its sheet configuration settings.

let section = merge.template.contexts.PRINT.sections["Section 1"];

section.sheetConfig.duplex = true;

section.sheetConfig.omitEmptyBackside = true;

section.sheetConfig.facingPages = true;

section.sheetConfig.mediaRotation = 0;