Some basic information you need to know.

Table of contents

About properties, setters and getters

Every class has more or less properties, and every property has its own getter and setter function. For example, the property fillColor inside a paragraph style can be accessed with setFillColor() and getFillColor().

Most of them are set to null by default and will be ignored when creating the IDML file. These are optional parameters which aren't important for your document. If a property is not null, it will be used. This means also that every getter may return null, no matter if the property is a string, int, float or bool. The setter on the other hand is not allowed to set null.


To make sure that string values are always set correctly, there are a lot of Enums. Enums have mostly the same name as the setters to which they belong. For example when defining a color model: $color->setModel(Model::SPOT).

Unique Identifiers

All objects can be handled without giving them a unique identifier manually. IDML-Creator will handle this by its own. Most of the time, the unique identifier will be invisible and only needed for internal uses. But in some cases, the identifier gets visible:

All Styles and Colors will be visible in the Adobe InDesign UI. We recommend giving them readable and understandable names. For example, a ParagraphStyle's name will be per default something like ParagraphStyle5c65c915e26a0. It will become a lot easier to work with this style if you give it a name like Copy or Footnote.

Numbers and their Unit

Adobe InDesign and IDML-Creator run in points, not pixels, millimeters or something else. If you prefer to use numbers in millimeters, you can add the Unit Enum as last parameter in every method where you can set numbers. For example:


use IDML\Content\Enum\Unit;

$image->setSize(100, 200, Unit::MILLIMETERS);
/** or */
$image->setSize(100, 200, Unit::POINTS);

Default is POINTS so if you want to use points, you can also write


$image->setSize(100, 200);