This document is about how to set up and use a TextFrame object.

First steps

Set up a TextFrame object and add it to the Content object like that:


use IDML\Content\TextFrame\TextFrame;

$textFrame = new TextFrame();


If you want to set your own unique identifier, set up the TextFrame like that: new TextFrame('UniqueName');

Size and Position

Add a size and a position like that:


    ->setSize(100, 200)
    ->setPosition(10, 10)

Add Unit::MILLIMETERS() as third parameter of each method if you prefer numbers in millimeters.

Adding text

Text is called Story and also stored in the Story object. You need to create one and add it then.