<?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();
$j = 0;
for ($k = 0; $k < 7; $k++)
{
for ($i = 0; $i < 5; $i++)
{
$container1[$j] = new pdContainer();
$container1[$j]->setBorder(1);
$container1[$j]->coordinates->setXYWH(($i * 40)+10,($k*40)+10,20,20);
$container1[$j]->setBackground(rand(0,255),rand(0,255),rand(0,255));
$root->addContainer($container1[$j]);
$j++;
$container1[$j] = new pdContainer();
$container1[$j]->setBorder(1);
$container1[$j]->coordinates->setXYWH(10,10,20,20);
$container1[$j]->setRelativeToContainer($container1[$j-1]);
if ($bg)
{
$container1[$j]->setBackgroundMode(pdContainerBackgroundHollow);
}
$bg = !$bg;
$root->addContainer($container1[$j]);
$j++;
}
}
$root->preRender();
$root->sizeCalc();
$root->render();
$_pdfDom_PDF->setDisplayMode("fullpage");
$_pdfDom_PDF->output();
?>