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

Table of contents


Set up your document like that:


$content = new IDML\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:


$writer = new IDML\Writer($content, 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: