This document is about the basic workflow of setting up and creating an IDML document.
Table of contents
Set up your document like that:
<?php use IDML\Content; $content = new 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 use IDML\Writer\File\Tree; use IDML\Writer\Writer; $writer = new 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: