Preference

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

Table of contents

First steps

Get the Preference from the Factory. It is registered in the Content object automatically:

<?php

use BitAndBlack\IdmlCreator\Factory;

$factory = new Factory();

$preference = $factory->getPreference();

Defining the bleed

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

<?php

use BitAndBlack\IdmlCreator\Content\Enum\Unit;

/** @var \BitAndBlack\IdmlCreator\Content\Preference $preference the preference, created in "First steps" */
$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.

<?php

use BitAndBlack\IdmlCreator\Content\Enum\Unit;

/** @var \BitAndBlack\IdmlCreator\Content\Preference $preference the preference, created in "First steps" */
$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.

<?php

/** @var \BitAndBlack\IdmlCreator\Content\Preference $preference the preference, created in "First steps" */
$preference->setSinglePage(true);