public static function generatePage(JasperXMLParser $parser)
 {
     $page = new Page($parser);
     $leftMargin = (int) (string) $parser->get('leftMargin');
     $topMargin = (int) (string) $parser->get('topMargin');
     $rightMargin = (int) (string) $parser->get('rightMargin');
     $page->SetMargins($leftMargin, $topMargin, $rightMargin);
     $page->SetFont('Arial', '', 13);
     $page->setPageX($leftMargin);
     $page->setPageY($topMargin);
     return $page;
 }
 protected function generateDetail($index = 0)
 {
     $detailNode = $this->configuration->get('xmlObject')->detail;
     $detailBand = $detailNode->band;
     foreach ($detailBand->staticText as $staticText) {
         $this->appendStaticText($staticText);
     }
     foreach ($detailBand->textField as $textField) {
         $this->appendTextField($textField, $index);
     }
     foreach ($detailBand->line as $line) {
         $this->appendLine($line);
     }
     foreach ($detailBand->image as $image) {
         $this->appendImage($image);
     }
     $this->page->setUsed((int) (string) $detailNode->band->attributes()['height']);
 }