Location: PHPKode > scripts > PHP GUI API > examples/document.php
<?php

$document = new Document;
$document->setAlign(new Align("Center"));

$text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et lectus sapien. Phasellus sed erat augue. Nunc cursus, nulla at convallis semper, felis diam vulputate tellus, eu vestibulum libero nisi ac magna. Proin auctor erat in risus mollis tincidunt elementum mauris pulvinar. Curabitur sem ipsum, sagittis vel euismod a, tincidunt non neque. In condimentum bibendum orci, ac bibendum velit semper id. Sed pretium nisi vitae diam dapibus nec fringilla elit congue. Phasellus ac augue ac lectus tincidunt cursus at a purus. Integer aliquet, purus quis venenatis suscipit, magna tortor molestie magna, at tincidunt orci justo ut velit. Vivamus id fermentum tellus. Duis sollicitudin, libero a porttitor bibendum, nibh arcu pharetra arcu, sit amet semper velit neque eu sapien. Aenean lorem diam, auctor eu mattis eu, placerat at nulla. Cras lorem orci, ultrices eget semper sit amet, convallis a neque.";
$division = new Division(new Comment($text));

$image = "http://www.allvectors.com/wp-content/uploads/2010/02/yellow_sunny.jpg";
$division->setBackground(new Image($image));
$division->setMargin(new Margin("left", "2cm"));
$division->setMCol(new MCol(3));
$division->getMCol()->setGap(40);

$document->add($division);
echo $document->render();
?>
Return current item: PHP GUI API