MasterSpread

This document is about how to set up and use a MasterSpread object.

First steps

Set up a MasterSpread object and add it to the Content object like that:

<?php 

use IDML\Content\Spread\MasterSpread;

$masterSpread = new MasterSpread();

$content->addMasterSpread($masterSpread);

If you want to set your own unique identifier, set up the MasterSpread like that: new MasterSpread('UniqueName');

Every MasterSpread can hold multiple pages.

Tell pages to use a MasterSpread

If a Page should use a MasterSpread, add the MasterSpread to the Page:

<?php 

$page->setAppliedMaster($masterSpread);

Be careful here! A Page may inherit the objects like TextFrames or Rectangles, but you need to define the width, columns and bleed anyway by your own.