MasterSpread
This document is about how to set up and use a MasterSpread object.
Table of contents
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->add($masterSpread);
If you want to set your own unique identifier, set up the MasterSpread like that: new MasterSpread('UniqueName');
Since IDML-Creator version 4.0
, you can use the Factory to create and register the MasterSpread:
$masterSpread = $factory->createMasterSpread();
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.