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

First steps

Create a Preference object. Add the Preference to the Content object then:


use IDML\Content\Preference;

$preference = new Preference();


Defining the bleed

The document bleed can be defined width setDocumentBleed. The second parameter is the unit and in Points per default.


use IDML\Content\Enum\Unit;

$preference->setDocumentBleed(3, Unit::MILLIMETERS());

The document format

The basic size of your document can be defined by calling setDocumentFormat. Regardless of that every Page may have its own format.


use IDML\Content\Enum\Unit;

$preference->setDocumentFormat(210, 297, Unit::MILLIMETERS());

Single or facing pages

An InDesign document may contain single pages or facing pages. Facing pages will cause the document to have a binding in the middle of each Spread.