本文整理汇总了PHP中Cezpdf::filledRectangle方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::filledRectangle方法的具体用法?PHP Cezpdf::filledRectangle怎么用?PHP Cezpdf::filledRectangle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::filledRectangle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$pos -= SECTION_DIVIDER;
$pdf->ezSetY($pos - 40);
$pos = $pdf->ezText("<b>" . ENTRY_PHONE . "</b> " . $order->customer['telephone'], GENERAL_FONT_SIZE);
$pos = $pdf->ezText("<b>" . ENTRY_EMAIL . "</b> " . $order->customer['email_address'], GENERAL_FONT_SIZE);
// divider between email and payment method
$pos -= SECTION_DIVIDER;
$pdf->ezSetY($pos);
// payment method and type
$pos = $pdf->ezText("<b>" . ENTRY_PAYMENT_METHOD . "</b> " . str_replace($vilains, $cools, $order->info['payment_method']), GENERAL_FONT_SIZE);
// shipping method - I don't use this so this code is a guess for those that do
//$pos = $pdf->ezText("<b>" . ENTRY_SHIPPING_METHOD . "</b> " . $order->info['shipping_method'],GENERAL_FONT_SIZE);
//$pdf->ezNewPage();
$pos -= SECTION_DIVIDER;
// products , model etc table layout
change_color(TABLE_HEADER_BKGD_COLOR);
$pdf->filledRectangle(LEFT_MARGIN, $pos - PRODUCT_TABLE_ROW_HEIGHT, PRODUCT_TABLE_HEADER_WIDTH, PRODUCT_TABLE_ROW_HEIGHT);
$x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN;
$pos = $pos - PRODUCT_TABLE_ROW_HEIGHT + PRODUCT_TABLE_BOTTOM_MARGIN;
change_color(GENERAL_FONT_COLOR);
$pdf->addText($x, $pos, TABLE_HEADER_FONT_SIZE, TABLE_HEADING_PRODUCTS);
$pdf->addText($x += PRODUCTS_COLUMN_SIZE, $pos, TABLE_HEADER_FONT_SIZE, TABLE_HEADING_PRODUCTS_MODEL);
$pdf->addText($x += MODEL_COLUMN_SIZE, $pos, TABLE_HEADER_FONT_SIZE, '');
$pdf->addText($x += PRICING_COLUMN_SIZES, $pos, TABLE_HEADER_FONT_SIZE, '');
$pdf->addText($x += PRICING_COLUMN_SIZES, $pos, TABLE_HEADER_FONT_SIZE, '');
$pdf->addText($x += PRICING_COLUMN_SIZES, $pos, TABLE_HEADER_FONT_SIZE, '');
$pdf->addText($x += PRICING_COLUMN_SIZES, $pos, TABLE_HEADER_FONT_SIZE, '');
$pos -= PRODUCT_TABLE_BOTTOM_MARGIN;
// Sort through the products
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
$prod_str = $order->products[$i]['qty'] . " x " . $order->products[$i]['name'];
change_color(PRODUCT_LISTING_BKGD_COLOR);
示例2: creaPDF
//.........这里部分代码省略.........
$tableData = array(array("emisor" => $emisor, "espacio" => "", "sucursal" => $sucursal));
$colOptions = array("emisor" => array('justification' => 'left', 'width' => 205), "espacio" => array('justification' => 'left', 'width' => 10), "sucursal" => array('justification' => 'left', 'width' => 120));
$options = array('showLines' => 0, 'showHeadings' => 0, 'shaded' => 0, 'shadeCol' => array(1, 1, 1), 'fontSize' => 7, 'textCol' => array(0, 0, 0), 'rowGap' => 0, 'colGap' => 0, 'xPos' => 240, 'xOrientation' => 'right', 'width' => 335, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla
$pdf->ezSetDy(-6);
$pdf->ezTable($tableData, "", "", $options);
////////// i. Datos del documento
$foliodocto = rellena("0", 6, $comprobanteNode->getAttribute('folio'));
$seriedocto = $comprobanteNode->getAttribute('serie');
if (!empty($seriedocto)) {
$foliodocto = $seriedocto . "-" . rellena("0", 6, $comprobanteNode->getAttribute('folio'));
}
$fechastr = $comprobanteNode->getAttribute('fecha');
$fechatok = explode("T", $fechastr);
$toksf = explode("-", $fechatok[0]);
$fechastr = $toksf[2] . "-" . $toksf[1] . "-" . $toksf[0] . " " . $fechatok[1];
$ncert = $comprobanteNode->getAttribute('noCertificado');
$aprob = $comprobanteNode->getAttribute('anoAprobacion') . "-" . $comprobanteNode->getAttribute('noAprobacion');
$tableData = array(array("dato" => "<b>" . $tipoDocto . "</b>"), array("dato" => "<b>" . $foliodocto . "</b>"), array("dato" => "Fecha"), array("dato" => $fechastr), array("dato" => "Certificado"), array("dato" => $ncert), array("dato" => "Año y No. Aprobación"), array("dato" => $aprob));
$colOptions = array("dato" => array('justification' => 'left', 'width' => 120));
$options = array('showLines' => 1, 'showHeadings' => 0, 'shaded' => 2, 'shadeCol' => array(1, 1, 1), 'shadeCol2' => array(0.9, 0.9, 0.9), 'fontSize' => 7, 'textCol' => array(1, 1, 1), 'rowGap' => 2, 'colGap' => 5, 'xPos' => 455, 'xOrientation' => 'right', 'width' => 120, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla datos del documento
//$pdf->ezSetDy(-12);
$pdf->ezTable($tableData, "", "", $options);
////////// i. Datos del cliente
$tableData = array(array("dato" => "<b>Cliente</b>"), array("dato" => utf8_decode($receptorNode->getAttribute('nombre'))), array("dato" => utf8_decode($receptorNode->getAttribute('rfc'))), array("dato" => utf8_decode($receptordomicilioNode->getAttribute('calle')) . " " . utf8_decode($receptordomicilioNode->getAttribute('noExterior')) . " " . utf8_decode($receptordomicilioNode->getAttribute('noInterior')) . " " . utf8_decode($receptordomicilioNode->getAttribute('colonia'))), array("dato" => utf8_decode($receptordomicilioNode->getAttribute('municipio')) . ", " . utf8_decode($receptordomicilioNode->getAttribute('estado'))), array("dato" => utf8_decode($receptordomicilioNode->getAttribute('estado'))), array("dato" => utf8_decode($receptordomicilioNode->getAttribute('codigoPostal'))));
$colOptions = array("dato" => array('justification' => 'left', 'width' => 410));
$options = array('showLines' => 1, 'showHeadings' => 0, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'fontSize' => 7, 'textCol' => array(0, 0, 0), 'rowGap' => 2, 'colGap' => 5, 'xPos' => 35, 'xOrientation' => 'right', 'width' => 410, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla datos del cliente
$pdf->ezSetDy(84);
$pdf->ezTable($tableData, "", "", $options);
$actualY = $pdf->y;
$pdf->setColor(0, 0, 0);
$pdf->filledRectangle(30, $actualY - 30, 540, 18);
$pdf->ezSetY($actualY - 15);
$pdf->setColor(1, 1, 1);
$pdf->ezText("<b>Cant</b>", 7, array('left' => 18, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Descripción</b>", 7, array('left' => 55, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Unitario</b>", 7, array('left' => 448, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Importe</b>", 7, array('left' => 513, 'justification' => 'left'));
////////// i. Partidas
$tableData = array();
$renglones = 0;
$rowData = array("cantidad" => "", "descripcion" => "", "unitario" => "", "importe" => "");
$partidaCnt = 0;
foreach ($conceptos as $conceptoNode) {
$partidaCnt++;
$renglones += 2;
$currentObj = array();
$currentObj["cantidad"] = number_format(abs(doubleval($conceptoNode->getAttribute('cantidad'))), 0);
$currentObj["descripcion"] = utf8_decode($conceptoNode->getAttribute('descripcion'));
$currentObj["unitario"] = number_format($conceptoNode->getAttribute('valorUnitario'), 2);
$currentObj["importe"] = number_format(doubleval($conceptoNode->getAttribute('importe')), 2);
array_push($tableData, $currentObj);
}
$currentObj = array();
$currentObj["cantidad"] = "";
$currentObj["descripcion"] = "";
$currentObj["unitario"] = "";
$currentObj["importe"] = "";
if ($renglones < 10) {
for ($renglones; $renglones < 10; $renglones++) {
array_push($tableData, $currentObj);
示例3: creaPDF
//.........这里部分代码省略.........
// Dibuja la tabla datos del documento
$pdf->ezSetDy(70);
$pdf->ezTable($tableData, "", "", $options);
////////// i. Datos del cliente
$noInterior = isset($receptordomicilioNode['noInterior']) ? utf8_decode($receptordomicilioNode['noInterior']) : "";
$municipio = isset($receptordomicilioNode['municipio']) ? $receptordomicilioNode['municipio'] : "";
$localidadCliente = isset($receptordomicilioNode['localidad']) ? utf8_decode($receptordomicilioNode['localidad']) : "";
$tableData1 = array(array("cliente" => "<b>Cliente</b>"), array("cliente" => utf8_decode($receptorNode['nombre'])), array("cliente" => "RFC: " . utf8_decode($receptorNode['rfc'])), array("cliente" => utf8_decode($receptordomicilioNode['calle']) . " " . utf8_decode($receptordomicilioNode['noExterior']) . " {$noInterior} "), array("cliente" => utf8_decode($receptordomicilioNode['colonia']) . " " . $localidadCliente), array("cliente" => utf8_decode($municipio) . ", " . utf8_decode($receptordomicilioNode['estado']) . " " . utf8_decode($receptordomicilioNode['codigoPostal']) . " \n" . utf8_decode($receptordomicilioNode['pais'])), array("cliente" => utf8_decode("Atención: " . $info_xtra->Receptor->contacto . " Cliente: " . $info_xtra->Receptor->noCliente)), array("cliente" => utf8_decode("Tel: " . $info_xtra->Receptor->telefono)));
$formaDePago = isset($comprobanteNode['formaDePago']) ? $comprobanteNode['formaDePago'] : "PAGO EN UNA SOLA EXHIBICION";
$metodoPago = isset($comprobanteNode['metodoDePago']) ? $comprobanteNode['metodoDePago'] : "No Identificado";
$numeroCuentaPago = isset($comprobanteNode['NumCtaPago']) ? $comprobanteNode['NumCtaPago'] : "No Identificado";
$tableData2 = array(array("expedido" => "Expedido en: " . utf8_decode($info_xtra->LugarExpedicion)), array("expedido" => "Forma de Pago: " . utf8_decode($formaDePago)), array("expedido" => "Metodo de Pago: " . utf8_decode($metodoPago)), array("expedido" => "No. de Cuenta: " . utf8_decode($numeroCuentaPago)), array("expedido" => "Condiciones de Pago: " . utf8_decode($comprobanteNode['condicionesDePago'])), array("expedido" => "Regimen Fiscal: " . utf8_decode(preg_replace("/Ii/", "II", ucwords(strtolower($regimenFiscal))))), array("expedido" => "Tipo de Cambio: " . $comprobanteNode['TipoCambio'] . " Moneda: " . $comprobanteNode['Moneda']), array("expedido" => "Elaboro: " . utf8_decode($info_xtra->Vendedor)), array("expedido" => utf8_decode("Póliza: " . $info_xtra->NumeroPoliza . " SAP No: " . $info_xtra->NumeroPedido)));
$tableData = array();
$aux = count($tableData1) >= count($tableData2) ? $tableData1 : $tableData2;
$cont = 0;
foreach ($aux as $arr) {
array_push($tableData, array("cliente" => $tableData1[$cont]["cliente"], "expedido" => $tableData2[$cont]["expedido"]));
$cont++;
}
$colNames = array("cliente" => "", "expedido" => "");
$colOptions = array("cliente" => array('justification' => 'left', 'width' => 205), "expedido" => array('justification' => 'left', 'width' => 205));
$options = array('showLines' => 1, 'showHeadings' => 0, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'fontSize' => 7, 'textCol' => array(0, 0, 0), 'rowGap' => 2, 'colGap' => 5, 'xPos' => 35, 'xOrientation' => 'right', 'width' => 410, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
$pdf->ezSetDy(125);
$pdf->ezTable($tableData, $colNames, "", $options);
//encabezado
//error_log(print_r($info_xtra,true));
$tableData = array(array("dato" => utf8_decode($info_xtra->Consumo->NotaEncabezado)));
$colOptions = array("dato" => array('justification' => 'left', 'width' => 540));
$options = array('showLines' => 1, 'showHeadings' => 0, 'shaded' => 0, 'shadeCol' => array(0.9, 0.9, 0.9), 'fontSize' => 7, 'textCol' => array(0, 0, 0), 'rowGap' => 5, 'colGap' => 5, 'xPos' => 35, 'xOrientation' => 'right', 'width' => 120, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
$pdf->ezSetDy(-10);
$pdf->ezTable($tableData, "", "", $options);
$actualY = $pdf->y;
$pdf->setColor(0, 0, 0);
$pdf->filledRectangle(30, $actualY - 30, 540, 18);
$pdf->ezSetY($actualY - 15);
$pdf->setColor(1, 1, 1);
$pdf->ezText("<b>Codigo</b>", 7, array('left' => 25, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Descripcion</b>", 7, array('left' => 180, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Cant</b>", 7, array('left' => 361, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Unidad</b>", 7, array('left' => 398, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Unitario</b>", 7, array('left' => 445, 'justification' => 'left'));
$pdf->ezSetY($actualY - 15);
$pdf->ezText("<b>Importe</b>", 7, array('left' => 497, 'justification' => 'left'));
////////// i. Partidas
$tableData = array();
$renglones = 0;
$rowData = array("codigo" => "", "cantidad" => "", "unidad" => "", "descripcion" => "", "unitario" => "", "importe" => "");
$partidaCnt = 0;
$cantidadArrayConceptos = count($conceptos);
foreach ($conceptos as $key => $conceptoNode) {
if (stristr($key, $attr) && $cantidadArrayConceptos == 2) {
$partidaCnt++;
$renglones += 2;
$currentObj = array();
$descripcion = $conceptoNode['descripcion'];
$totalPalabras = strlen($descripcion);
$totalCaracteres = 4800;
if ($totalPalabras >= $totalCaracteres) {
$pagDesc = ceil($totalPalabras / $totalCaracteres);
$aux = 1;
$array = array();
for ($i = 1; $i <= $pagDesc; $i++) {
示例4: array
$pdf->ezText("\n");
}
// end for complistsubtask
}
// end if subtask
}
// close task loop
// add a grey bar and output the hours worked
$tmp = $strings["Total_Hours_Worked"] . ": " . $sum;
$pdf->transaction('start');
$ok = 0;
while (!$ok) {
$thisPageNum = $pdf->ezPageCount;
$pdf->saveState();
$pdf->setColor(0.9, 0.9, 0.9);
$pdf->filledRectangle($pdf->ez['leftMargin'], $pdf->y - $pdf->getFontHeight(12) + $pdf->getFontDecender(12), $pdf->ez['pageWidth'] - $pdf->ez['leftMargin'] - $pdf->ez['rightMargin'], $pdf->getFontHeight(12));
$pdf->restoreState();
$pdf->ezText($tmp, 12, array('justification' => 'left'));
if ($pdf->ezPageCount == $thisPageNum) {
$pdf->transaction('commit');
$ok = 1;
} else {
// then we have moved onto a new page, bad bad, as the background rectangle will be on the old one
$pdf->transaction('rewind');
$pdf->ezNewPage();
}
}
// begin include gantt graph in pdf
$pdf->ezText("\n\n");
$graphPDF = ganttPDF($reportName, $listTasks);
$pdf->ezImage($graphPDF, -5, 510, "", "left");
示例5: kontenrahmen
function ihr_pdf_einzeln(Cezpdf &$pdf, $p_id)
{
$this->get_hga_profil_infos($p_id);
$this->p_ihr_gk_id;
$kk = new kontenrahmen();
$kontenrahmen_id = $kk->get_kontenrahmen('Geldkonto', $this->p_ihr_gk_id);
$bb = new buchen();
$kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$this->p_jahr}");
if (!$kontostand11) {
$kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-01-01");
}
$kontostand11_a = nummer_punkt2komma_t($kontostand11);
$ze = 0;
$tab_arr[$ze]['TEXT'] = "I. Anfangsbestand 01.01.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "{$kontostand11_a} € ";
$tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
$ze++;
$soll_summe_wp = $this->get_soll_betrag_wp(6040, $this->p_wplan_id);
$soll_summe_wp_a = nummer_punkt2komma_t($soll_summe_wp);
$tab_arr[$ze]['TEXT'] = "II. Soll-Zuführung zur Rücklage laut WP";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$soll_summe_wp_a} € ";
$ze++;
$iii_arr[] = $this->III_tab_anzeigen_pdf($p_id);
if (is_array($iii_arr)) {
$iii_arr = $iii_arr[0];
for ($a = 0; $a < sizeof($iii_arr); $a++) {
$text3 = $iii_arr[$a]['TEXT'];
$ist3 = $iii_arr[$a]['IST'];
$tab_arr[$ze]['TEXT'] = $text3;
$tab_arr[$ze]['IST'] = $ist3;
$ze++;
}
}
$soll_endbestand = $kontostand11 + $soll_summe_wp;
$soll_endbestand_a = nummer_punkt2komma_t($soll_endbestand);
$tab_arr[$ze]['TEXT'] = "IV. Soll-Endbestand 31.12.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$soll_endbestand_a} € ";
$n_jahr = $this->p_jahr + 1;
$kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$n_jahr}");
if (!$kontostand11) {
$kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-12-31");
}
$kontostand11_a = nummer_punkt2komma_t($kontostand11);
$ze++;
$tab_arr[$ze]['TEXT'] = "V. Endbestand 31.12.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
$this->footer_zahlungshinweis = $bpdf->zahlungshinweis;
$pdf->setColor(0.6, 0.6, 0.6);
$pdf->filledRectangle(50, 690, 500, 15);
$pdf->setColor(0, 0, 0);
$pdf->ezSety(720);
// $pdf->ezSetY(650);
$datum = date("d.m.Y");
$p = new partners();
$p->get_partner_info($_SESSION['partner_id']);
$pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
$pdf->ezSetY(705);
$o = new objekt();
$o->get_objekt_infos($this->p_objekt_id);
$pdf->ezText(" <b>Entwicklung der Instandhaltungsrücklage {$this->p_jahr} | OBJEKT: {$o->objekt_kurzname}</b>", 10, array('justification' => 'full'));
$pdf->ezSetDy(-15);
$pdf->ezStopPageNumbers();
// seitennummerirung beenden
$p = new partners();
$p->get_partner_info($_SESSION['partner_id']);
$cols = array('TEXT' => "", 'IST' => "IST-BETRAG");
$pdf->ezTable($tab_arr, $cols, "", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 1, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TEXT' => array('justification' => 'left'), 'SOLL' => array('justification' => 'right', 'width' => 100), 'IST' => array('justification' => 'right', 'width' => 100))));
$this->get_hga_profil_infos($p_id);
$d = new detail();
$anteile_g = $d->finde_detail_inhalt('OBJEKT', $this->p_objekt_id, 'Gesamtanteile');
$einheiten_arr = $this->einheiten_weg_tabelle_arr($this->p_objekt_id);
$anz_einheiten = count($einheiten_arr);
$anz_konten = count($tab_arr);
$gkkk = new geldkonto_info();
$gkkk->geld_konto_details($this->p_ihr_gk_id);
$datum_heute = date("d.m.Y");
$kontostand_aktuell = nummer_punkt2komma_t($bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "{$datum_heute}"));
for ($a = 0; $a < $anz_einheiten; $a++) {
$pdf->ezNewPage();
$e_kn = $einheiten_arr[$a]['EINHEIT_KURZNAME'];
$einheit_id = $einheiten_arr[$a]['EINHEIT_ID'];
$einheit_anteile = $d->finde_detail_inhalt('EINHEIT', $einheit_id, 'WEG-Anteile');
$pdf->setColor(0.6, 0.6, 0.6);
$pdf->filledRectangle(50, 690, 500, 15);
$pdf->setColor(0, 0, 0);
$pdf->ezSety(720);
$pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
$pdf->ezSetDy(-2);
$pdf->ezText("<b> Anteil in der Instandhaltungsrücklage für {$e_kn} | OBJEKT: {$o->objekt_kurzname} {$this->p_jahr}</b>", 10, array('justification' => 'full'));
$pdf->ezSetDy(-10);
$pdf->ezText("<b>Geldkontobezeichnung:</b> {$gkkk->geldkonto_bez}", 9);
$pdf->ezText("<b>Geldinstitut:</b> {$gkkk->kredit_institut}", 9);
$pdf->ezText("<b>IBAN:</b> {$gkkk->IBAN1}", 9);
$pdf->ezText("<b>BIC:</b> {$gkkk->BIC}", 9);
for ($b = 0; $b < $anz_konten; $b++) {
$tab_arr_e[$b]['TEXT'] = $tab_arr[$b]['TEXT'];
$tab_arr_e[$b]['IST'] = $tab_arr[$b]['IST'];
//.........这里部分代码省略.........