This document is about the basic wokflow of setting up and creating an IDML document.
Table of contents
Set up your document like that:
<?php $content = new IDML\Content();
The most objects need to be registered in the content class. This looks like that:
<?php $content ->addParagraphStyle($myParagraphStyle) ->addCharacterStyle($myCharacterStyle) ->addColor($myColor) ;
When your document is ready and every piece of content has been created, create a new writer object and give it your content:
<?php $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: