/** *Верстка основной текстовой области в PDF */ protected function template() { $arResult = call_user_func(array(__CLASS__, 'text_' . $this->temp)); $x = $this->header(); $y = $this->footer(); $str_len = 100; $this->pdf->SetXY(100, 10); pdf1234::getpages(pdf1234::slashN($x[0], 50), 5, 100, 0); $this->pdf->Ln(); $this->pdf->SetX(100); pdf1234::getpages(pdf1234::slashN($x[1], 50), 5, 100, 0); $this->pdf->Ln(); $this->pdf->SetX(100); pdf1234::getpages(pdf1234::slashN($x[2], 50), 5, 100, 0); $this->pdf->SetXY(90, 75); //$this->pdf->Write(5, $this->name()); pdf1234::getpages(pdf1234::slashN($this->name(), floor($str_len / 2.7)), 5, 80, 0); pdf1234::getpages(pdf1234::slashN($arResult['body0'], $str_len), 5, 20); pdf1234::getpages(pdf1234::slashN($arResult['body1'], $str_len), 5, 20); $this->pdf->Ln(); pdf1234::getpages(pdf1234::slashN($arResult['footerUP0'], $str_len), 5, 20); $this->pdf->Ln(); for ($i = 1; $i <= count($arResult['count']); $i++) { $this->pdf->SetX(30); $this->pdf->Write(5, $i . '.'); $this->pdf->SetX(35); pdf1234::getpages(pdf1234::slashN($arResult['count'][$i], 85), 5, 35); $this->pdf->Ln(); } $this->pdf->SetX(20); $this->pdf->Write(5, $y[0]); $this->pdf->Ln(); }
/** *Верстка основной текстовой области в PDF */ protected function template() { if (!$this->models) { if (!is_object($this->temp)) { $arResult = call_user_func(array(__CLASS__, 'text_' . $this->temp)); } else { $arResult = $this->getTypeTemplate(); } } else { $arResult = $this->text_manyholes($this->models); } $x = $this->header(); $y = $this->footer(); $str_len = 100; $this->pdf->SetXY(100, 10); pdf1234::getpages(pdf1234::slashN($x[0], 50), 5, 100, 0); $this->pdf->Ln(); $this->pdf->SetX(100); pdf1234::getpages(pdf1234::slashN($x[1], 50), 5, 100, 0); $this->pdf->Ln(); $this->pdf->SetX(100); pdf1234::getpages(pdf1234::slashN($x[2], 50), 5, 100, 0); $this->pdf->SetXY(90, 75); //$this->pdf->Write(5, $this->name()); pdf1234::getpages(pdf1234::slashN($this->name(), floor($str_len / 2.7)), 5, 80, 0); pdf1234::getpages(pdf1234::slashN($arResult['body0'], $str_len), 5, 20); if (!isset($arResult['holes'])) { pdf1234::getpages(pdf1234::slashN($arResult['body1'], $str_len), 5, 20); } else { foreach ($arResult['holes'] as $str) { pdf1234::getpages(pdf1234::slashN($str, $str_len), 5, 20); } } $this->pdf->Ln(); pdf1234::getpages(pdf1234::slashN($arResult['footerUP0'], $str_len), 5, 20); $this->pdf->Ln(); for ($i = 1; $i <= count($arResult['count']); $i++) { $this->pdf->SetX(30); $this->pdf->Write(5, $i . '.'); $this->pdf->SetX(35); pdf1234::getpages(pdf1234::slashN($arResult['count'][$i], 85), 5, 35); $this->pdf->Ln(); } $this->pdf->SetX(20); $this->pdf->Write(5, $y[0]); $this->pdf->Ln(); }