function setY($value) { if ($value > 0 && $value > $this->h - 30) { $this->addPage(); } else { parent::setY($value); } }
$f_april = $row['f_april']; $f_april_date = $row['f_april_date']; $f_may = $row['f_may']; $f_may_date = $row['f_may_date']; $dob = $row['dob']; $pimg = "../" . $row['img_path']; $email = $row['email']; $_SESSION['email'] = $email; $_SESSION['name'] = $firstname; $pdf = new FPDF(); $image12 = "done2.png"; // Add a page to that object $pdf->AddPage(); $pdf->setleftmargin(10); $pdf->setX(10); $pdf->setY(10); // Add some text $pdf->SetFont('Arial', 'B', 10); $text = "hello"; // width, height, text, no border, next line - below & left margin, alignement // shree rang in centre $pdf->Cell(200, 10, '|| Shree Rang ||', 0, 1, "C"); //create rectangle and registration form $pdf->SetFillColor(0, 0, 0); $pdf->Rect(0, 20, 210, 10, 'F'); $pdf->SetTextColor(255, 255, 255); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(200, 10, 'REGISTRATION FORM - 2016', 0, 1, "C"); // space below registration form $pdf->Cell(210, 5, '', 0, 1, "C"); //set font and height
$pdf = new FPDF("P"); // L = mode paysage $pdf->AddPage(); $pdf->SetAutoPageBreak(true, 0); //////////////////////////////////////////////////////////// // HEADER $pdf->Image("http://www.coinkeychain.com/wp-content/uploads/2013/12/header-pdf.jpg", 0, 0, 210, 35); $startY = 45; // POLICE $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'BU', '14'); //////////////////// // POSITION DE DEPART // $pdf->Ln(10); // Saut de ligne $pdf->setX(10); $pdf->setY($startY); //////////////////// // TITRE $pdf->SetFontSize('14'); $pdf->Cell(0, 0, $product->post_title, '', 0, 'C'); //////////////////// $images = rwmb_meta('PRODUCT_first_image', 'type=image&size=large', $idProduct); foreach ($images as $image) { $pdf->setX(10); $pdf->Image($image['url'], 10, $startY + 5, 75, 75); } // DESCRIPTION ////////////////// $product->post_content = str_replace("<strong>", "", $product->post_content); $product->post_content = str_replace("</strong>", "", $product->post_content); $pdf->SetXY(90, $startY + 10);
$this->Ln(12); //salto de linea } function Footer() { $this->SetY(-10); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 12); $pdf->SetFillColor(152, 253, 147); $pdf->setY(50); $pdf->setY(60); // $pdf->Cell(180,10,"Folio de Venta ".$FolioVta,2,1,'R'); // Parte de arriba fehca de emision y clave de confirmacion // $pdf->Cell(110,10,utf8_decode("Fecha de Emisión: ").$FdeE,2,0,'L',true); // $pdf->Cell(80,10,utf8_decode("Clave de Confirmación : ").$clave,2,1,'L',true); // $pdf->setY(80); // $pdf->Cell(150,10,"Hotel :".$matricula.utf8_decode(" Dirección : ").$nombre,2,2,'L'); // $pdf->Cell(80,10,utf8_decode("Dirección : ").$nombre.utf8_decode(" Teléfono:").$paterno,2,2,'L'); // // $pdf->Cell(80,10,"Telefono: ".$paterno,1,1,'L'); // $pdf->Cell(80,10,"Titular :".$Titular." 2do Pasajero :".$acompanante,2,1,'L'); // // $pdf->Cell(80,10,"2do Pasajero :".$acompanante,2,1,'L'); // $pdf->Cell(80,10,"Adultos :".$adultos." Menores :".$menores,2,1,'L'); // // $pdf->Cell(80,10,"Menores :".$menores,2,1,'L'); // $pdf->Cell(180,10,"Fecha de Llegada : ".$fechaLLegada." Check Inn: ".$tiempoINN,2,1,'L',true); // // $pdf->Cell(80,10,"Check Inn: ".$tiempoINN,2,1,'L');
$total_fees = $f_reg; if ($f_may == 0) { if ($f_april == 0) { $total_fees = $f_reg; } else { $total_fees = $f_april; } } else { $total_fees = $f_may; } $pdf = new FPDF('P', 'mm', array(210, 210)); // Add a page to that object $pdf->AddPage(); $pdf->setleftmargin(10); $pdf->setX(20); $pdf->setY(10); $pdf->SetFillColor(0, 0, 0); $pdf->Cell(190, 140, '', 1, 0, "C"); $pdf->setX(20); $pdf->setY(15); $pdf->SetFillColor(0, 0, 0); $image1 = 'logo.png'; // Add some text $pdf->SetFont('Arial', '', 20); // width, height, text, no border, next line - below & left margin, alignement // shree rang in centre $pdf->Cell(175, 10, ' Explora Academy of Design', 0, 0, "C"); $pdf->Cell(15, 10, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 10), 0, 1, 'R', false); $pdf->SetFillColor(0, 0, 0); $pdf->Rect(20, 26, 175, 1, 'F'); $pdf->Cell(10, 8, '', 0, 1, "C");
// Variable zur Aufsumierung der Umsätze anlegen $umsatz_ges = 0.0; foreach ($umsaetze['gesamtumsatz'] as $key => $val) { $pdf->Cell(20, 6, sprintf('%s %%', number_format($key, 2, ',', '')), 0, 0, 'R'); $pdf->Cell(15, 6, $val['fluege'], 0, 0, 'C'); $pdf->Cell(27, 6, sprintf('%s EUR', number_format($val['summe'], 2, ',', '')), 0, 0, 'R'); // Umsatz aufsumieren $umsatz_ges += $val['summe']; // Zeilenumbruch einfügen $pdf->Ln(); } // vertikale Y-Position ermitteln $y = $pdf->getY(); // Linie(n) zeichnen $pdf->Line(60, $y, 90, $y); $pdf->Line(60, $y + 0.6, 90, $y + 0.6); // neues X- und Y-Position festlegen $pdf->setY($y + 1); $pdf->setX(60); // Aufsumierten Gesamtumsatz anzeigen $pdf->Cell(27, 6, sprintf('%s EUR', number_format($umsatz_ges, 2, ',', '')), 0, 0, 'R'); // Position auf der X- und Y-Achse $pdf->SetXY(20, 280); // Schriftart und -farbe ändern $pdf->SetTextColor(128, 128, 128); $pdf->SetFont('Times', '', 8); // Ausgabe des Fusszeilentext $pdf->Cell(0, 10, 'Seite ' . $pdf->PageNo() . ' von {nb}', 0, 0, 'C'); // ******************************************************** SEITE ******************************************************** // // PDF-Dokument ausgeben $pdf->Output(sprintf('monatsumsaetze-%s-%s.pdf', $_GET['jahr'], $_GET['monat']), 'I');
function genCarpentras2() { global $options; # paramètres $mg = 3; // Marge de gauche => initial 17 $mh = 13; // Marge du haut => initial 9 $md = 0; // Marge de droite $mb = 11; // Marge du bas $largeur_etiquette = 70; // largeur_etiquette => initial 60 $espace_etiquettes = 0; // => initial 7 $nb_ligne_etiquettes = 11; $nb_etiquette_ligne = 3; $hauteur_etiquette = 25; // Préparation du document PDF. $pdf = new FPDF('P', 'mm', 'A4'); $pdf->Open(); $pdf->SetLeftMargin($mg); $pdf->SetTopMargin($mh); $pdf->SetAutoPageBreak(1, 0); $pdf->AddPage(); // Gestion des fonts $pdf->AddFont('code39', '', 'IDAutomation_Code_39.php'); $pdf->SetFont('times', '', 12); // Préparation des informations. $nom = strtoupper($this->patient->getNom()); $prenom = strtoupper($this->patient->getPrenom()); $date = new clDate($this->patient->getDateNaissance()); $dateN = $date->getDate("d/m/Y"); if ($this->patient->getSexe() == "F") { $sexe = "F"; $e = "e"; } elseif ($this->patient->getSexe() == "M") { $sexe = "M"; $e = ""; } else { $sexe = "Ind."; $e = ""; } $date->setDate($this->patient->getDateAdmission()); $led = $date->getDate("d/m/Y"); $ipp = $this->patient->getILP(); $nsej = $this->patient->getNSej(); $uf = $this->patient->getUF(); for ($i = 0; $i < $nb_ligne_etiquettes; $i++) { for ($j = 0; $j < $nb_etiquette_ligne; $j++) { $l = $j * $largeur_etiquette + $mg; $h = $i * $hauteur_etiquette + $mh; $le = $largeur_etiquette - $mg; $pdf->setY($h); $pdf->setX($l); $pdf->setFont('times', '', 9); $pdf->Cell($le, 4, "Dossier : ", 0, 0, L); $pdf->setY($h); $pdf->setX($l + 17); $pdf->setFont('times', 'b', 9); $pdf->cell($le - 10, 4, $nsej, 0, 0, L); //$pdf->setFont('times', '', 9 ) ; $pdf->setY($h); $pdf->setX($l); $pdf->cell($le - 10, 4, "U", 0, 0, R); $pdf->setY($h + 4); $pdf->setX($l); $pdf->setFont('times', '', 9); $pdf->cell($le, 4, $nom . " " . $prenom, 0, 0, L); $pdf->setY($h + 9); $pdf->setX($l); $pdf->cell($le, 4, "Né{$e} le : {$dateN}", 0, 0, L); $pdf->setY($h + 9); $pdf->setX($l); $pdf->cell($le - 10, 4, "Sexe : {$sexe}", 0, 0, R); $pdf->setY($h + 13); $pdf->setX($l); $pdf->cell($le, 4, "Le : {$led}", 0, 0, L); $pdf->setY($h + 13); $pdf->setX($l); $pdf->cell($le - 10, 4, "UF : {$uf}", 0, 0, R); $pdf->setY($h + 17); $pdf->setX($l); $pdf->cell($le - 10, 4, "NIP : {$ipp}", 0, 0, L); } } $pdf->Output(); }
/** * Генерирует PDF-документ на основании XML-файла. * * @param string $file Файл для обработки * @param mixed $replacements массив для подстановки значений * @return FPDF сформированный документ PDF или FALSE в случае неудачи */ public static function xml2pdf($file, $replacements = false) { // Новая обработка PDF require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/odt2pdf.php'; $tpl = basename($file, ".xml") . ".odt"; $t = new odt2pdf($tpl); $t->convert($replacements); return $t; /** * @deprecated */ if (!file_exists($file)) { return false; } require_once dirname(__FILE__) . '/fpdf/fpdf.php'; define('FPDF_FONTPATH', dirname(__FILE__) . '/fpdf/font/'); if (is_array($replacements)) { foreach ($replacements as &$val) { $val = htmlspecialchars_decode($val, ENT_QUOTES); } } $replacements['$tab'] = ' '; $xml = new DOMDocument('1.0', 'windows-1251'); $xml->load($file); $pdf = new FPDF(); // Загружаем шрифты $pdf->AddFont('ArialMT', '', 'c9bb7ceca00657d007d343f4e34b71a8_arial.php'); $pdf->AddFont('Arial-BoldMT', '', '9cb9fc616ba50d7ecc7b816984f2ffda_arialbd.php'); $pdf->AddFont('TimesNewRomanPSMT', '', '5f37f1915715e014ee2254b95c0b6cab_times.php'); $pdf->AddFont('TimesNewRomanPS-BoldMT', '', 'e07f6c05a47ebec50a80f29789c7f1f6_timesbd.php'); /* Загружаем XML-документ и читаем из него основные параметры лоя итогового PDF-документа */ $root = $xml->documentElement; $title = $root->getAttribute('title') ? iconv('windows-1251', 'utf-8', $root->getAttribute('title')) : ''; // заголовок документа $author = $root->getAttribute('author'); // автор $margin_left = $root->getAttribute('margin-left') ? $root->getAttribute('margin-left') : 20; // отступ слева $margin_right = $root->getAttribute('margin-right') ? $root->getAttribute('margin-right') : 20; // отступ справа $margin_top = $root->getAttribute('margin-top') ? $root->getAttribute('margin-top') : 20; // отступ сверху $font_name = $root->getAttribute('font-name') ? $root->getAttribute('font-name') : 'ArialMT'; // дефолтный шрифт (имя) $font_size = (int) $root->getAttribute('font-size') ? (int) $root->getAttribute('font-size') : 10; // дефолтный шрифт (размер) $text_width = (int) $root->getAttribute('width') ? (int) $root->getAttribute('width') : 170; // ширина печатной области документа $paragraph_indent = (int) $root->getAttribute('paragraph-indent') ? (int) $root->getAttribute('paragraph-indent') : 0; // отступ между параграфами $printable = $pdf->h - $margin_top - 20; $pdf->SetTitle($title, true); $pdf->SetAuthor($author); $pdf->SetLeftMargin($margin_left); $pdf->SetRightMargin($margin_right); $pdf->SetTopMargin($margin_top); $pdf->AddPage(); $pdf->SetFont($font_name, '', $font_size); $pdf->SetX($margin_left); $locates = array(); // разбор XML-документа $xpath = new DOMXPath($xml); $scale = $xpath->query('/document/page/*'); if ($scale->length) { $footer = $xpath->query('//footer'); $footer = $footer->length ? $footer->item(0) : NULL; $no_brake = $xpath->query('//nobreak'); $no_brake = $no_brake->length ? TRUE : FALSE; // если есть теги <nobreak>, то расставляем разрывы страниц руками if ($no_brake) { $pdf->SetAutoPageBreak(false); } $last_y = 0; $pages = array(); foreach ($scale as $node) { $last_y = intval($pdf->y); if ($node->tagName == 'nobreak' && $node->getAttribute('start')) { $max_h = $last_y; $loc_offset = 0; foreach ($xpath->query('//cell|locate[(following::nobreak)]') as $i => $nd) { if ($nd->tagName == 'nobreak' && $node->getAttribute('end')) { break; } $_h = $nd->getAttribute('height'); if ($i > 0 && !$loc_offset) { $_h = 0; } $max_h += intval($_h); $loc_offset = $nd->getAttribute('x_offset'); } $max_h += $last_y; if ($max_h > $printable) { if ($footer) { $pdf->SetY(-20); $pdf->SetFont($font_name, '', 9); $pdf->Cell(0, 10, self::prepareNodeText($footer), 0, 0, 'C'); $pages[] = $pdf->PageNo(); } $pdf->AddPage(); } } if ($no_brake && $pdf->y > $printable) { if ($footer && !in_array($pdf->PageNo(), $pages)) { $pdf->SetY(-20); $pdf->SetFont($font_name, '', 9); $pdf->Cell(0, 10, self::prepareNodeText($footer), 0, 0, 'C'); $pages[] = $pdf->PageNo(); } $pdf->AddPage(); } if (!(int) $node->getAttribute('keep-pos')) { $pdf->SetX($margin_left); } // сброс позиции по X-оси если <node keep-pos="0" или не задан if ((int) $node->getAttribute('offset-left')) { $pdf->SetX((int) $node->getAttribute('offset-left') + $margin_left); } if ($node->tagName == 'text') { // вывод строки if ($node->getAttribute('font-name')) { $font_name = $node->getAttribute('font-name'); } if ((int) $node->getAttribute('font-size')) { $font_size = (int) $node->getAttribute('font-size'); } $align = $node->getAttribute('align') ? strtoupper($node->getAttribute('align')) : 'C'; $width = (int) $node->getAttribute('width') ? (int) $node->getAttribute('width') : $text_width; $height = (int) $node->getAttribute('height') ? (int) $node->getAttribute('height') : 5; $border = $node->getAttribute('border') ? strtoupper($node->getAttribute('border')) : 0; $text = self::prepareNodeText($node, $replacements); if (!($color = $node->getAttribute('color'))) { $color = '000000'; } $pdf->SetTextColor(hexdec(substr($color, 0, 2)), hexdec(substr($color, 2, 2)), hexdec(substr($color, 4, 2))); $pdf->SetFont($font_name, '', $font_size); $skip_empty = (int) $node->getAttribute('skip-empty') ? (int) $node->getAttribute('skip-empty') : 0; if ((int) $skip_empty) { if (!trim($text)) { continue; } } $pdf->Cell($width, $height, trim($text), $border, 1, $align); } elseif ($node->tagName == 'paragraph') { // выводит многострочный текстовый блок, можно указывать тип выравнивания текста (L, J, R, C) if (($show_if = $node->getAttribute('show-if')) && !$replacements[$show_if]) { continue; } if ($node->getAttribute('font-name')) { $font_name = $node->getAttribute('font-name'); } if ((int) $node->getAttribute('font-size')) { $font_size = (int) $node->getAttribute('font-size'); } $align = $node->getAttribute('align') ? strtoupper($node->getAttribute('align')) : 'J'; $width = (int) $node->getAttribute('width') ? (int) $node->getAttribute('width') : $text_width; $height = (int) $node->getAttribute('height') ? (int) $node->getAttribute('height') : 5; $border = $node->getAttribute('border') ? strtoupper($node->getAttribute('border')) : 0; $keep_text_wrap = (int) $node->getAttribute('keep-text-wrap') ? (int) $node->getAttribute('keep-text-wrap') : 0; $text = self::prepareNodeText($node, $replacements, $keep_text_wrap); if (!($color = $node->getAttribute('color'))) { $color = '000000'; } $pdf->SetTextColor(hexdec(substr($color, 0, 2)), hexdec(substr($color, 2, 2)), hexdec(substr($color, 4, 2))); $pdf->SetFont($font_name, '', $font_size); $skip_empty = (int) $node->getAttribute('skip-empty') ? (int) $node->getAttribute('skip-empty') : 0; if ((int) $skip_empty) { if (!trim($text)) { continue; } } $pdf->MultiCell($width, $height, $text, $border, $align); if ($paragraph_indent) { $pdf->Ln($paragraph_indent); } } elseif ($node->tagName == 'ln') { // перевод строки $height = (int) $node->getAttribute('height') ? (int) $node->getAttribute('height') : 5; $pdf->Ln($height); } elseif ($node->tagName == 'cell') { // рисует ячейку if ($node->getAttribute('font-name')) { $font_name = $node->getAttribute('font-name'); } if ((int) $node->getAttribute('font-size')) { $font_size = (int) $node->getAttribute('font-size'); } $align = $node->getAttribute('align') ? strtoupper($node->getAttribute('align')) : 'J'; $width = (int) $node->getAttribute('width') ? (int) $node->getAttribute('width') : $text_width; $height = (int) $node->getAttribute('height') ? (int) $node->getAttribute('height') : 5; $border = $node->getAttribute('border') != '' ? (int) $node->getAttribute('border') : 1; $keep_text_wrap = (int) $node->getAttribute('keep-text-wrap') ? (int) $node->getAttribute('keep-text-wrap') : 0; $text = self::prepareNodeText($node, $replacements, $keep_text_wrap); if (!($color = $node->getAttribute('color'))) { $color = '000000'; } $pdf->SetTextColor(hexdec(substr($color, 0, 2)), hexdec(substr($color, 2, 2)), hexdec(substr($color, 4, 2))); $pdf->SetFont($font_name, '', $font_size); $pdf->Cell($width, $height, $text, $border, 0, $align); } elseif ($node->tagName == 'locate') { // перемещает указатель в определенную позицию в документе $x = $node->getAttribute('x') ? $node->getAttribute('x') : 0; $y = $node->getAttribute('y') ? $node->getAttribute('y') : 0; $x_offset = (int) $node->getAttribute('x_offset') ? (int) $node->getAttribute('x_offset') : 0; $y_offset = (int) $node->getAttribute('y_offset') ? (int) $node->getAttribute('y_offset') : 0; if (strpos($x, '@') !== false) { $x = $locates['x'][$x] + $x_offset; } if (strpos($y, '@') !== false) { $y = $locates['y'][$y] + $y_offset; } if (!$x) { $x = $pdf->GetX() + $x_offset; } if (!$y) { $y = $pdf->GetY() + $y_offset; } $pdf->SetXY($x, $y); } elseif ($node->tagName == 'fix-locate') { // перемещает указатель в определенную позицию в документе if ($x = $node->getAttribute('x')) { $locates['x'][$x] = $pdf->GetX(); } if ($y = $node->getAttribute('y')) { $locates['y'][$y] = $pdf->GetY(); } } elseif ($node->tagName == 'line') { // рисует простую горизонтальную линию $x = (int) $node->getAttribute('x') ? (int) $node->getAttribute('x') : $margin_left; $y = (int) $node->getAttribute('y') ? (int) $node->getAttribute('y') : $margin_top; $len = (int) $node->getAttribute('len') ? (int) $node->getAttribute('len') : $text_width; if ($x) { $pdf->setX($x); } if ($y) { $pdf->setY($y); } $pdf->Cell($len, 0, '', 1); } elseif ($node->tagName == 'newpage') { //новая страница и перевод указателя на нее $pdf->AddPage(); } } } return $pdf; }
$cart13 = $data->sheets[$s]['cells'][$li][29]; $prot13 = $data->sheets[$s]['cells'][$li][30]; $cart14 = $data->sheets[$s]['cells'][$li][31]; $prot14 = $data->sheets[$s]['cells'][$li][32]; $cart15 = $data->sheets[$s]['cells'][$li][33]; $prot15 = $data->sheets[$s]['cells'][$li][34]; $cart16 = $data->sheets[$s]['cells'][$li][35]; $prot16 = $data->sheets[$s]['cells'][$li][36]; $cart17 = $data->sheets[$s]['cells'][$li][37]; $prot17 = $data->sheets[$s]['cells'][$li][38]; $cart18 = $data->sheets[$s]['cells'][$li][39]; $prot18 = $data->sheets[$s]['cells'][$li][40]; } require 'gera_imoveis_busca_' . $id_impresso . '.php'; $pdf->SetFont('times', '', 12); $pdf->setY(20.5); $pdf->Write(0.5, $sub, ''); $pdf->SetFont('times', 'B', 10); $pdf->Line(1, 25, 20, 25); $pdf->Ln(); $rodape = $responsavel_empresa; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = $responsavel_endereco . ', ' . $responsavel_cidade . '-' . $responsavel_estado . ' CEP: ' . $responsavel_cep; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $pdf->Cell('', 0.5, 'Tel/Fax: ' . $responsavel_tel . '/' . $responsavel_fax . ' E-mail:' . $responsavel_email, '', 1, 'C'); $pdf->Cell('', 0.5, 'www.cartoriopostal.com.br', '', 1, 'C'); if ($anexar and ($id_servico == '11' or $id_servico == '169' or $id_servico == '170')) { $pdf->Close(); //imprime a saida
$mesx = $matri[$q20_mes]; $pdf = new FPDF(); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage("L"); // monta cabecalho do relatório $pdf->Image('imagens/files/logo_boleto.png', 140, 3, 20); $pdf->SetFont('Times', '', 9); $pdf->Text(118, 31, $nomeinst); $pdf->Text(125, 34, $db12_extenso); $pdf->SetFont('Courier', 'B', 12); $pdf->Text(122, 38, "PLANILHA NÚMERO: " . $planilha . $situacao); $pdf->SetFont('Courier', 'B', 9); $pdf->Text(243, 38, "COMPETÊNCIA:" . $mesx . "/" . $q20_ano); $pdf->SetFont('Courier', 'B', 10); $pdf->setY(41); $pdf->setX(5); $pdf->SetFillColor(200, 200, 200); $pdf->Cell(286, 5, "DADOS DO DECLARANTE", 1, 1, "C", 1); $pdf->SetFont('Courier', '', 9); $pdf->setY(47); $pdf->setX(5); $clquery->sql_query("cgm", "z01_nome", "", " z01_numcgm = {$q20_numcgm}"); $clquery->sql_record($clquery->sql); db_fieldsmemory($clquery->result, 0); $pdf->Cell(154, 5, "NOME OU RAZÃO SOCIAL:" . $z01_nome, "LTB", 0, "L", 0); $pdf->Cell(52, 5, "INSCRIÇÃO MUNICIPAL:" . $q24_inscr, "TB", 0, "L", 0); $pdf->Cell(80, 5, "CONTATO:" . $q20_nomecontri . " FONE:" . $q20_fonecontri, "TRB", 1, "L", 0); $pdf->SetFont('Courier', 'B', 10); $pdf->Ln(10); $pdf->setX(5);
$seksagxo = array(); // $rezulto = sql_faru("select p.ID,pn.ID from partoprenantoj as p, partoprenoj as pn where p.ID=pn.partoprenantoID and alvenstato='a' and renkontigxoID='".$_SESSION["renkontigxo"]->datoj[ID]."' and partoprentipo='t'"); $rezulto = sql_faru(datumbazdemando(array("p.ID", "pn.ID"), array("partoprenantoj" => "p", "partoprenoj" => "pn"), array("alvenstato = 'a'", "partoprentipo = 't'"), "renkontigxoID")); while ($row = mysql_fetch_array($rezulto, MYSQL_NUM)) { $gesamt += 1; $partoprenanto = new Partoprenanto($row[0]); $seksagxo[$partoprenanto->datoj[sekso]][$partoprenanto->datoj[agxo]] += 1; $partopreno = new Partopreno($row[1]); $ko = new Kotizo($partopreno, $partoprenanto, $_SESSION["renkontigxo"]); $kotizo += $ko->kotizo; $pagantoj[$ko->agxkategorio][$ko->aligxkategorio][$ko->landakategorio][$partopreno->datoj[domotipo]] += 1; //echo $ko->agxkategorio." / ".$ko->aligxkategorio." / ".$ko->landakategorio." / ".$partopreno->datoj[domotipo]." <BR>"; //echo "Ko: ".$ko->kotizo; } //echo "entute: $gesamt<br>"; $pdf->setY(30); $pdf->text(20, 65, "entute: {$gesamt}"); $pdf->cell(20, 4, "domo", 1, 0, C); $pdf->cell(21, 4, "<1.10.", 1, 0, C); //bei Bedarf aus der DB holen $pdf->cell(21, 4, "<1.12.", 1, 0, C); $pdf->cell(21, 4, ">=1.12.", 1, 1, C); for ($i = 2; $i >= 0; $i--) { $pdf->cell(20, 4, $i, 1, 0, C); for ($j = 2; $j >= 0; $j--) { for ($k = A; $k <= C; $k++) { $pdf->cell(7, 4, $pagantoj[$i][$j][$k][J], 1, 0, C); } } $pdf->ln(); //echo "<BR> ";
$pdf->Line(10, 17, 83, 17); $pdf->setX(100); $pdf->MultiCell(100, 4, $header2, 0, 'C'); $pdf->Ln(5); $pdf->cell(15, 5, 'Nomor :', 0, 0, 'L', 0); $pdf->cell(11, 5, $bcf15no, 0, 0, 'L', 0); $pdf->cell(20, 5, $kd_manifest, 0, 0, 'L', 0); $pdf->Ln(5); $pdf->cell(10, 20, 'No', 1, 0, 'C', 0); $posisi_x = $pdf->GetX(); $pdf->cell(60, 10, 'BC 1.1', 1, 1, 'C', 0); $pdf->setX($posisi_x); $pdf->Cell(20, 10, 'No', 1, 0); $pdf->Cell(30, 10, 'Tanggal', 1, 0); $pdf->Cell(10, 10, 'Pos', 1, 1); $pdf->setY(42); $pdf->setX(72); $pdf->multicell(32, 10, 'Nama Sarana Pengangkut', 1, 'C'); $pdf->setY(42); $pdf->setX(104); $posisi_x = $pdf->GetX(); $pdf->cell(30, 10, 'Jumlah dan jenis', 1, 1, 'C', 0); $pdf->setX($posisi_x); $pdf->Cell(15, 10, 'Jumlah', 1, 0); $pdf->Cell(15, 10, 'Jenis', 1, 0); $pdf->setY(42); $pdf->setX(134); $pdf->multicell(32, 10, 'Nomor dan Merk Kemasan /Petikemas', 1, 'C'); $pdf->setY(42); $pdf->setX(166); $pdf->cell(42, 20, 'Uraian Barang', 1, 1, 'C');