This document is about the basic wokflow of setting up and creating an IDML document.

Table of contents


Set up your document like that:


use IDML\Content;

$content = new Content();

The most objects need to be registered in the content class. This looks like that:



When your document is ready and every piece of content has been created, create a new writer object and give it your content:


use IDML\File\Tree;
use IDML\Writer;

$writer = new Writer(
    new Tree()

This will create your content with absolute paths, absolute numbers and all the things you defined before.

You can create an IDML out of that now: