Location: PHPKode > projects > pdfDOM > pdfdom-0.5/tests/positionmode.php
<?php
$root_path = "../";
define('FPDF_FONTPATH', $root_path."fpdf/font/");
include($root_path . "fpdf/fpdf.php");
include($root_path ."classes/class.coordinateobject.php");
include($root_path ."classes/class.container.php");
include($root_path ."classes/class.page.php");
include($root_path ."classes/class.textcontainer.php");
include($root_path ."classes/class.table.php");

$root = new pdPage();

$container1 = new pdContainer();
$container1->setBorder(1);
$container1->coordinates->setXYWH(10,10,20,20);
$root->addContainer($container1);

$container2 = new pdContainer();
$container2->setBorder(1);
$container2->coordinates->setXYWH(10,10,20,20);
$container2->setRelativeToContainer($container1);


$root->addContainer($container2);

$root->preRender();
$root->sizeCalc();
$root->render();

$_pdfDom_PDF->setDisplayMode("fullpage");
$_pdfDom_PDF->output();	
?>
Return current item: pdfDOM