[Solved] Is there a more efficient way to use different page formats

Hi,

I have a lot of different documents and each document has both an A3 and Letter version.
So I created 2 master pages and 2 print contexts for each format:

image

There is a Control script that determines the correct Print Context based on a value in the data mapper. So all Print Contexts are disabled by default and based on certain conditions the correct one is enabled.
The Master page contains exact dimensions for the specific format and the print context is linked to this format.
The Print Context data does not change so for both the A4 and the Letter the data is the same.

Is there a way to programmatically link a Master Page to a specific Print Context?
If not then I would like to make this a feature request as this would save an additional Print Context as I no longer have to enable one or the other but just programmatically link the correct Master Page to the single Print Context.

Thanks

Hi @dvdmeer,

Hereby I would like to inform you that you can control this by the Positions object*, for example: You can execute the following JavaScript code by a Control Script to change the to the Print Context Section Section 1 applied Master Page from Master page 1 to Master page 2:

var printSection = merge.context.sections["Section 1"];

printSection.sheetConfig.positions.all.masterFront = "Master page 2";

*See: ‘Position - PlanetPress Connect 2022.1 User Guide (link)’

1 Like

Perfect, exactly what I was looking for.

Thank you Marten

1 Like