本文整理汇总了PHP中Cezpdf::line方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::line方法的具体用法?PHP Cezpdf::line怎么用?PHP Cezpdf::line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::line方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
function berechnung_anzeigen($leerstand_arr, $vermietete_arr, $monat, $jahr)
{
echo '<pre>';
// print_r($vermietete_arr);
$anzahl_vermietete = count($vermietete_arr);
$mv = new mietvertrag();
$m = new mietkonto();
$haeuser = array();
$gsollmiete_vermietet = 0;
for ($a = 0; $a < $anzahl_vermietete; $a++) {
$einheit_id = $vermietete_arr[$a]['EINHEIT_ID'];
$haus_str = $vermietete_arr[$a]['HAUS_STRASSE'];
$haus_nr = $vermietete_arr[$a]['HAUS_NUMMER'];
$haus_str_nr = $haus_str . ' ' . $haus_nr;
if (!in_array($haus_str_nr, $haeuser)) {
$haeuser[] = $haus_str_nr;
}
$mv->get_mietvertrag_infos_aktuell($einheit_id);
$summe_f_monatlich = $m->summe_forderung_monatlich($mv->mietvertrag_id, $monat, $jahr);
$gsollmiete_vermietet = $gsollmiete_vermietet + $summe_f_monatlich;
}
$anzahl_leer = count($leerstand_arr);
$gsollmiete_leer = 0;
for ($b = 0; $b < $anzahl_leer; $b++) {
$einheit_id = $leerstand_arr[$b]['EINHEIT_ID'];
$haus_str = $leerstand_arr[$b]['HAUS_STRASSE'];
$haus_nr = $leerstand_arr[$b]['HAUS_NUMMER'];
$haus_str_nr = $haus_str . ' ' . $haus_nr;
if (!in_array($haus_str_nr, $haeuser)) {
$haeuser[] = $haus_str_nr;
}
$sollmiete_leer = $this->get_sollmiete_leerstand($einheit_id);
$gsollmiete_leer = $gsollmiete_leer + $sollmiete_leer;
}
// print_r($haeuser);
$g_summe = $gsollmiete_vermietet + $gsollmiete_leer;
$g_summe_a = nummer_punkt2komma($g_summe);
$gsollmiete_vermietet_a = nummer_punkt2komma($gsollmiete_vermietet);
$gsollmiete_leer_a = nummer_punkt2komma($gsollmiete_leer);
$v_geb = $g_summe / 100 * 5;
$brutto_vgeb = $v_geb * 1.19;
$mwst_eur = $v_geb / 100 * 19;
$mwst_eur = nummer_punkt2komma($mwst_eur);
$brutto_vgeb_a = nummer_punkt2komma($brutto_vgeb);
$v_geb_a = nummer_punkt2komma($v_geb);
if (!isset($_REQUEST['pdf'])) {
echo "{$gsollmiete_vermietet_a} € GESAMT SOLL VERMIETET<br>";
echo "{$gsollmiete_leer_a} € GESAMT SOLL LEER<br>";
echo " {$g_summe_a} € GESAMT SOLL<br>";
echo " {$v_geb_a} € NETTO VERWALTERGEBÜHR 5%<br>";
echo " <b>{$brutto_vgeb_a} € INKL. 19% MWST VERWALTERGEBÜHR 5%</b><hr>";
} else {
/* PDF AUSGABE */
ob_clean();
// ausgabepuffer leeren
header("Content-type: application/pdf");
// wird von MSIE ignoriert
//include_once ('pdfclass/class.ezpdf.php');
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(42, 743, 6, "BERLUS HAUSVERWALTUNG - Fontanestr. 1 - 14193 Berlin");
$pdf->line(42, 750, 550, 750);
$monatsname = monat2name($monat);
$pdf->addText(42, 720, 12, "Berechnungsbogen für die Verwaltergebühr {$monatsname} {$jahr}");
$pdf->addText(42, 650, 10, "Gesamtsoll aus vermieteten Einheiten");
$pdf->addText(300, 650, 10, "{$gsollmiete_vermietet_a} €");
$pdf->addText(42, 635, 10, "Gesamtsoll aus leerstehenden Einheiten");
$pdf->addText(300, 635, 10, "{$gsollmiete_leer_a} €");
$pdf->setLineStyle(0.5);
$pdf->line(42, 630, 350, 630);
$pdf->addText(42, 620, 10, "<b>Gesamtsoll");
$pdf->addText(300, 620, 10, "{$g_summe_a} €</b>");
$pdf->addText(42, 595, 10, "5% Verwaltergebühr");
$pdf->addText(300, 595, 10, "{$v_geb_a} €");
$pdf->addText(42, 585, 10, "+ 19% MWSt");
$pdf->addText(300, 585, 10, "{$mwst_eur} €");
$pdf->setLineStyle(0.5);
$pdf->line(42, 580, 350, 580);
$pdf->addText(42, 570, 10, "<b>Verwaltergebühr brutto");
$pdf->addText(300, 570, 10, "{$brutto_vgeb_a} €</b>");
/* Häuser */
$pdf->addText(42, 480, 10, "In diese Berechnung wurden folgende Häuser einbezogen:");
$text_xpos = 460;
for ($c = 0; $c < count($haeuser); $c++) {
$haus = $haeuser[$c];
$pdf->addText(42, $text_xpos, 10, "<b>{$haus}</b>");
$text_xpos = $text_xpos - 10;
if ($text_xpos == 100) {
$pdf->ezNewPage();
$text_xpos = 650;
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
//.........这里部分代码省略.........
示例2: Cezpdf
function pdf_header($partner_id)
{
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(42, 743, 6, "BERLUS HAUSVERWALTUNG - Fontanestr. 1 - 14193 Berlin");
$pdf->line(42, 750, 550, 750);
$pdf->selectFont($berlus_schrift);
$pdf->ezSetCmMargins(1, 1, 1, 1);
$pdf->setLineStyle(0.5);
$pdf->line(42, 50, 550, 50);
$pdf->addText(170, 42, 6, "BERLUS HAUSVERWALTUNG | Fontanestr. 1 | 14193 Berlin | Inhaber Wolfgang Wehrheim");
$pdf->addText(150, 35, 6, "Bankverbindung: Dresdner Bank Berlin | BLZ: 100 800 00 | Konto-Nr.: 05 804 000 00 | Steuernummer: 24/582/61188");
return $pdf;
}
示例3: array
$pdf->setFontFamily('Helvetica', $tmp);
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetCmMargins(1.5, 1, 2, 3);
$pdf->addJpegFromFile("../img/libro.jpg", 50, 750, 60);
$result = mysql_query("select matricula,\n\tconcat(nombre,' ',apellido_paterno,' ',apellido_materno) as nombre,\n\tconcat(calle,' ',numero,' ',colonia,'') as direccion,ciudad,estado,telefono,celular,sueldo,tipo\n\t\t\t\t\t\tfrom empleados \n\t\t\t\t\t\twhere status = 'ACTIVO' ");
while ($datatmp = mysql_fetch_array($result)) {
$data[] = array_merge($datatmp, array('matricula'));
}
$options = array('shadeHeadingCol' => array(0.6, 0.6, 0.5), 'shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'center', 'width' => 550, 'fontSize' => 8, 'xPos' => 'center');
$titles = array('matricula' => '<b>ID</b>', 'nombre' => '<b>NOMBRE</b>', 'direccion' => '<b>DIRECCIÓN</b>', 'ciudad' => '<b>CIUDAD</b>', 'estado' => '<b>ESTADO</b>', 'telefono' => '<b>TELÉFONO</b>', 'celular' => '<b>CELULAR</b>', 'sueldo' => '<b>SUELDO</b>', 'tipo' => '<b>TIPO</b>');
$pdf->ezText("\n\n\n\n\n", 10);
$pdf->ezTable($data, $titles, '', $options);
//cabecera del pdf (objeto para todas las páginas)
$all = $pdf->openObject();
$pdf->saveState();
$pdf->line($pdf->ez['leftMargin'], $pdf->ez['bottomMargin'] + 10, $pdf->ez['pageWidth'] - $pdf->ez['rightMargin'], $pdf->ez['bottomMargin'] + 10);
//the bottom line
$pdf->addText(200, 790, 12, "<b>Distribuciones y Representaciones Arvizu </b>\n");
$pdf->addText(230, 770, 12, "<i>!Leer Aumenta el Saber! </i>\n");
$pdf->addText(240, 740, 12, "<b>Listado Empleados </b>\n");
$pdf->ezText("\n\n\n", 10);
$pdf->addText(50, 30, 8, "<b>Fecha: </b>\n" . date("d/m/Y"));
$pdf->ezStartPageNumbers($pdf->ez['pageWidth'] - ($pdf->ez['rightMargin'] - 10), $pdf->ez['bottomMargin'], 8, 'PAGINA', '{PAGENUM} de {TOTALPAGENUM}', 1);
$pdf->addText(50, 30, 10);
//bottom text
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
$pdf->ezSetCmMargins(4, 3, 3, 3);
ob_end_clean();
$pdf->ezStream();
示例4: date
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
// company name and details pulled from the my store address and phone number
// in admin configuration mystore
$y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
$y -= 10;
// logo image set to right of the above .. change first number to move sideways
//$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
// extra info boxs to be used by staff
$pdf->setStrokeColor(0, 0, 0);
$pdf->setLineStyle(0.5);
$pdf->Rectangle(300, 745, 250, 70);
$pdf->addText(310, 785, GENERAL_FONT_SIZE, TEXT_PACKED_BY);
$pdf->addText(310, 760, GENERAL_FONT_SIZE, TEXT_VERIFIED_BY);
// line between header order number and order date
$pdf->setLineStyle(0.5);
$pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
$pdf->ezSetY($y);
$dup_y = $y;
// order number
$y = $pdf->ezText("<b>" . TEXT_ORDER_NUMBER . " </b>" . $orders['orders_prefix'] . $orders['orders_id'] . "\n\n", SUB_HEADING_FONT_SIZE);
// order date
if ($_POST['show_order_date']) {
$pdf->ezSetY($dup_y);
$pdf->ezText("<b>" . TEXT_ORDER_DATE . " </b>" . date(TEXT_ORDER_FORMAT, strtotime($order->info['date_purchased'])) . "\n\n", SUB_HEADING_FONT_SIZE, array('justification' => 'right'));
}
// sold to info in left rectangle
$pdf->addText(LEFT_MARGIN, $y, SUB_HEADING_FONT_SIZE, "<b>" . ENTRY_SOLD_TO . "</b>");
$pos = $y;
$indent = LEFT_MARGIN + TEXT_BLOCK_INDENT;
$pdf->addText($indent, $pos -= GENERAL_LEADING, GENERAL_FONT_SIZE, $order->billing['name']);
if ($order->billing['company'] && $order->billing['company'] != 'NULL') {
示例5: Cezpdf
ini_set('memory_limit', '500M');
ini_set('max_execution_time', 600);
ini_set('limit', -1);
include 'class.ezpdf.php';
$pdf = new Cezpdf('LETTER', 'portrait');
# t, b, l, r
$pdf->ezSetMargins(50, 70, 50, 50);
#w = 612 h = 792
$pdf->setColor(0.16, 0.38, 0.61);
$pdf->selectFont('fonts/Helvetica.afm');
$img = ImageCreatefromjpeg('../img/logo.jpg');
$pdf->addImage($img, 50, 697, 47, 50);
$pdf->addText(110, 722, 24, '<b>ENTREGAS PUNTUALES</b>');
$pdf->setColor(0.79, 0.67, 0.11);
$pdf->addText(110, 702, 16, '<b>Soporte de Factura ' . $_GET[folio] . '</b>');
$pdf->line(50, 690, 560, 690);
$pdf->setColor(0.25, 0.25, 0.25);
$pdf->ezText("\n\n\n\n{$f->fechaactual}", 12, array('justification' => 'right'));
#detallado superior
$s = "SELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,gv.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasventanilla gv ON fd.folio=gv.id\n\t\tINNER JOIN catalogocliente cc ON gv.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'\n\t\tUNION\n\t\tSELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,ge.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasempresariales ge ON fd.folio=ge.id\n\t\tINNER JOIN catalogocliente cc ON ge.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'";
$rx = mysql_query($s, $l) or die($s);
$registros = mysql_num_rows($rx);
if ($registros > 0) {
$pdf->setColor(0.79, 0.67, 0.11);
$pdf->ezText("<b>DETALLADO DE FACTURA, GUIAS</b>\n", 12, array('justification' => 'left'));
$pdf->setColor(0.25, 0.25, 0.25);
$s = "SELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,gv.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasventanilla gv ON fd.folio=gv.id\n\t\tINNER JOIN catalogocliente cc ON gv.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'\n\t\tUNION\n\t\tSELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,ge.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasempresariales ge ON fd.folio=ge.id\n\t\tINNER JOIN catalogocliente cc ON ge.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'";
$r = mysql_query($s, $l) or die($s);
$col = array('0' => "Folio", '1' => 'Remitente', '2' => '#Paqs', '3' => 'Fecha', '4' => 'Flete', '5' => 'Desc', '6' => 'Exced', '7' => 'EAD', '8' => 'Recol', '9' => 'Seguro', '10' => 'Combus', '11' => 'Otros', '12' => 'Subtotal', '13' => 'Iva', '14' => 'Iva Ret', '15' => 'Total');
$opt = array('0' => array('justification' => 'left'), '1' => array('justification' => 'center'), '2' => array('justification' => 'center'), '3' => array('justification' => 'right'), '4' => array('justification' => 'right'), '5' => array('justification' => 'right'), '6' => array('justification' => 'right'), '7' => array('justification' => 'right'), '8' => array('justification' => 'right'), '9' => array('justification' => 'right'), '10' => array('justification' => 'right'), '11' => array('justification' => 'right'), '12' => array('justification' => 'right'), '13' => array('justification' => 'right'), '14' => array('justification' => 'right'), '15' => array('justification' => 'right'));
$est = array('fontSize' => 5, 'showHeadings' => 1, 'lineCol' => array(0, 0, 0), 'cols' => $opt, 'width' => 520);
示例6: GradebookDataGenerator
$alleval = $cats[0]->get_evaluations($stud_id, true);
$alllink = $cats[0]->get_links($stud_id, true);
if (isset($_GET['exportpdf'])) {
$datagen = new GradebookDataGenerator($allcat, $alleval, $alllink);
$header_names = array(get_lang('Name'), get_lang('Description'), get_lang('Weight'), get_lang('Date'), get_lang('Results'));
$data_array = $datagen->get_data(GradebookDataGenerator::GDG_SORT_NAME, 0, null, true);
$newarray = array();
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 1);
}
$pdf = new Cezpdf();
$pdf->selectFont(api_get_path(LIBRARY_PATH) . 'ezpdf/fonts/Courier.afm');
$pdf->ezSetMargins(30, 30, 50, 30);
$pdf->ezSetY(810);
$pdf->ezText(get_lang('FlatView') . ' (' . api_convert_and_format_date(null, DATE_FORMAT_SHORT) . ' ' . api_convert_and_format_date(null, TIME_NO_SEC_FORMAT) . ')', 12, array('justification' => 'center'));
$pdf->line(50, 790, 550, 790);
$pdf->line(50, 40, 550, 40);
$pdf->ezSetY(750);
$pdf->ezTable($newarray, $header_names, '', array('showHeadings' => 1, 'shaded' => 1, 'showLines' => 1, 'rowGap' => 3, 'width' => 500));
$pdf->ezStream();
exit;
}
} else {
//Student view
//in any other case (no search, no pdf), print the available gradebooks
// Important note: loading a category will actually load the *contents* of
// this category. This means that, to show the categories of a course,
// we have to show the root category and show its subcategories that
// are inside this course. This is done at the time of calling
// $cats[0]->get_subcategories(), not at the time of doing Category::load()
// $category comes from GET['selectcat']
示例7: imprimirEstadoCuentaCliente
//.........这里部分代码省略.........
$sucursal = SucursalDAO::getByPK($_SESSION['sucursal']);
if (!$sucursal) {
die("Sucursal invalida");
}
include_once 'librerias/ezpdf/class.pdf.php';
include_once 'librerias/ezpdf/class.ezpdf.php';
$pdf = new Cezpdf();
$pdf->selectFont('../server/librerias/ezpdf/fonts/Helvetica.afm');
//margenes de un centimetro para toda la pagina
$pdf->ezSetMargins(1, 1, 1, 1);
/*
* LOGO
*/
if (!($logo = PosConfigDAO::getByPK('url_logo'))) {
Logger::log("Verifique la configuracion del pos_config, no se encontro el camṕo 'url_logo'");
die("Verifique la configuracion del POS, no se encontro el url del logo");
}
//addJpegFromFile(imgFileName,x,y,w,[h])
//detectamos el tipo de imagen del logo
if (substr($logo->getValue(), -3) == "jpg" || substr($logo->getValue(), -3) == "JPG" || substr($logo->getValue(), -4) == "jpeg" || substr($logo->getValue(), -4) == "JPEG") {
$pdf->addJpegFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} elseif (substr($logo->getValue(), -3) == "png" || substr($logo->getValue(), -3) == "PNG") {
$pdf->addPngFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} else {
Logger::log("Verifique la configuracion del pos_config, la extension de la imagen del logo no es compatible");
die("La extension de la imagen usada para el logo del negocio no es valida.");
}
/* * ************************
* ENCABEZADO
* ************************* */
$e = "<b>" . self::readableText($emisor->nombre) . "</b>\n";
$e .= formatAddress($emisor);
$e .= "RFC: " . $emisor->rfc . "\n\n";
//datos de la sucursal
$e .= "<b>Lugar de expedicion</b>\n";
$e .= self::readableText($sucursal->getDescripcion()) . "\n";
$e .= formatAddress($sucursal);
$datos = array(array("emisor" => $e));
$pdf->ezSetY(puntos_cm(28.6));
$opciones_tabla = array();
$opciones_tabla['showLines'] = 0;
$opciones_tabla['showHeadings'] = 0;
$opciones_tabla['shaded'] = 0;
$opciones_tabla['fontSize'] = 8;
$opciones_tabla['xOrientation'] = 'right';
$opciones_tabla['xPos'] = puntos_cm(7.3);
$opciones_tabla['width'] = puntos_cm(11);
$opciones_tabla['textCol'] = array(0, 0, 0);
$opciones_tabla['titleFontSize'] = 12;
$opciones_tabla['rowGap'] = 3;
$opciones_tabla['colGap'] = 3;
$pdf->ezTable($datos, "", "", $opciones_tabla);
$cajero = UsuarioDAO::getByPK($_SESSION['userid'])->getNombre();
$datos = array(array("col" => "<b>Cajero</b>"), array("col" => self::readableText($cajero)), array("col" => "<b>Cliente</b>"), array("col" => self::readableText($cliente->getRazonSocial())), array("col" => "<b>Limite de Credito</b>"), array("col" => FormatMoney($estado_cuenta->limite_credito, DONT_USE_HTML)), array("col" => "<b>Saldo</b>"), array("col" => FormatMoney($estado_cuenta->saldo, DONT_USE_HTML)));
$pdf->ezSetY(puntos_cm(28.8));
$opciones_tabla['xPos'] = puntos_cm(12.2);
$opciones_tabla['width'] = puntos_cm(6);
$opciones_tabla['showLines'] = 0;
$opciones_tabla['shaded'] = 2;
$opciones_tabla['shadeCol'] = array(1, 1, 1);
//$opciones_tabla['shadeCol2'] = array(0.054901961, 0.756862745, 0.196078431);
$opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375);
$pdf->ezTable($datos, "", "", $opciones_tabla);
//roundRect($pdf, puntos_cm(12.2), puntos_cm(28.8), puntos_cm(6), puntos_cm(4.25));
/**
* ESTADO DE CUENTA
*/
$elementos = array(array('id_venta' => 'Venta', 'fecha' => 'Fecha', 'sucursal' => 'Sucursal', 'cajero' => 'Cajero', 'tipo_venta' => 'Tipo', 'tipo_pago' => 'Pago', 'total' => 'Total', 'pagado' => 'Pagado', 'saldo' => 'Saldo'));
foreach ($estado_cuenta->array_ventas as $venta) {
$array_venta = array();
$array_venta['id_venta'] = $venta['id_venta'];
$array_venta['fecha'] = $venta['fecha'];
$array_venta['sucursal'] = self::readableText($venta['sucursal']);
$array_venta['cajero'] = self::readableText($venta['cajero']);
$array_venta['cancelada'] = self::readableText($venta['cancelada']);
$array_venta['tipo_venta'] = self::readableText($venta['tipo_venta']);
$array_venta['tipo_pago'] = self::readableText($venta['tipo_pago']);
$array_venta['total'] = FormatMoney($venta['total'], DONT_USE_HTML);
$array_venta['pagado'] = FormatMoney($venta['pagado'], DONT_USE_HTML);
$array_venta['saldo'] = FormatMoney($venta['saldo'], DONT_USE_HTML);
array_push($elementos, $array_venta);
}
$pdf->ezText("", 8, array('justification' => 'center'));
$pdf->ezSetY(puntos_cm(24));
$opciones_tabla['xPos'] = puntos_cm(2);
$opciones_tabla['width'] = puntos_cm(16.2);
$pdf->ezTable($elementos, "", "Estado de Cuenta", $opciones_tabla);
//roundRect($pdf, puntos_cm(2), puntos_cm(24.3), puntos_cm(16.2), puntos_cm(3.2));
/* * ************************
* notas de abajo
* ************************* */
$pdf->setLineStyle(1);
$pdf->setStrokeColor(0.3359375, 0.578125, 0.89453125);
$pdf->line(puntos_cm(2), puntos_cm(1.3), puntos_cm(18.2), puntos_cm(1.3));
$pdf->addText(puntos_cm(2), puntos_cm(1.0), 7, "Fecha de impresion: " . date("d/m/y") . " " . date("H:i:s"));
//addJpegFromFile(imgFileName,x,y,w,[h])
//$pdf->addJpegFromFile("../www/media/logo_simbolo.jpg", puntos_cm(15.9), puntos_cm(.25), 25);
$pdf->addText(puntos_cm(16.7), puntos_cm(0.6), 8, "caffeina.mx");
$pdf->ezStream();
}
示例8: array
$pdf->ezText($swimmername, 40, array('justification' => 'center'));
// $pdf->ezText($clubname, 16, array('justification' => 'center'));
$pdf->ezText('', 20, array('justification' => 'center'));
$pdf->ezText(_('har deltaget i'), 20, array('justification' => 'center'));
$pdf->ezText('', 20, array('justification' => 'center'));
$pdf->ezText($aryCompo['name'] . ' - ' . $date, 30, array('justification' => 'center'));
$pdf->ezText('', 20, array('justification' => 'center'));
$pdf->ezText(_('med følgende resultat:'), 20, array('justification' => 'center'));
$pdf->ezText('', 20, array('justification' => 'center'));
foreach ($results as $r) {
$pdf->ezText($r['Resultat'], 20, array('justification' => 'center'));
}
$pdf->ezSetMargins(0, 0, 28.3, 75);
$pdf->ezSetY(80);
$pdf->setLineStyle(1);
$pdf->line(300, 80, 530, 80);
$pdf->ezText(_('Stævneleder') . ' ' . $aryCompo['leader'], 15, array('justification' => 'right'));
$pdf->closeObject();
$pdf->addObject($text);
}
$swimmername = $swimmer['sname'];
$clubname = $swimmer['cname'];
$results = array();
$count = 0;
$currentswimmer = $swimmer['sid'];
}
if ($swimmer['distance'] == 25) {
if ($result = $db->getSwimmerBestTime($id, $currentswimmer, 25)) {
if ($result['result'] > 0) {
$min = floor($result['result'] / 60);
$sek = floor($result['result']) % 60;
示例9: BuildPDFReport
function BuildPDFReport($userid)
{
$GLOBALS["SartON"] = time();
$q = new mysql();
$sql = "SELECT * FROM quarantine_report_users WHERE userid='{$userid}' and `type`=1 and `enabled`=1";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if ($ligne["enabled"] == 0) {
return;
}
$params = unserialize(base64_decode($ligne["parameters"]));
$days = $params["days"];
$subject = $params["subject"];
$subject = str_replace("{", "", $subject);
$subject = str_replace("}", "", $subject);
$session = md5($user->password);
if ($days < 1) {
$days = 2;
}
$user = new user($userid);
while (list($num, $ligne) = each($user->HASH_ALL_MAILS)) {
$recipient_sql[] = "mailto='{$ligne}'";
}
$date = date('Y-m-d');
$recipients = implode(" OR ", $recipient_sql);
$sql = "SELECT mailfrom,zDate,MessageID,DATE_FORMAT(zdate,'%W %D %H:%i') as tdate,subject FROM quarantine\n\tWHERE (zDate>DATE_ADD('{$date}', INTERVAL -{$days} DAY)) AND ({$recipients}) ORDER BY zDate DESC;";
if ($GLOBALS["VERBOSE"]) {
echo "{$sql}\n";
}
$datepdf = date('Y-m-d');
$results = $q->QUERY_SQL($sql, "artica_backup");
$num_rows = mysql_num_rows($results);
if (!$q->ok) {
send_email_events("Build SMTP quarantine report failed for {$uid}", "{$sql}\n{$q->mysql_error}", "postfix");
return null;
}
if ($num_rows == 0) {
return;
}
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetMargins(50, 70, 50, 50);
$all = $pdf->openObject();
$pdf->saveState();
//$pdf->setStrokeColor(0,0,0,1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(50, 34, 6, $date);
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
$mainFont = dirname(__FILE__) . "/ressources/fonts/Helvetica.afm";
$codeFont = dirname(__FILE__) . "/ressources/fonts/Courier.afm";
$pdf->selectFont($mainFont);
$pdf->ezText("{$user->DisplayName}\n", 30, array('justification' => 'centre'));
$pdf->ezText("{$subject}\n", 20, array('justification' => 'centre'));
$pdf->ezText("{$date} ({$num_rows} message(s))", 18, array('justification' => 'centre'));
$pdf->ezStartPageNumbers(100, 30, 12, "left", "Page {PAGENUM}/{TOTALPAGENUM}");
$pdf->ezNewPage();
$options = array('showLines' => 2, 'showHeadings' => 0, 'shaded' => 2, 'shadeCol' => array(1, 1, 1), 'shadeCol2' => array(0.8, 0.8, 0.8), 'fontSize' => 11, 'textCol' => array(0, 0, 0), 'textCol2' => array(1, 1, 1), 'titleFontSize' => 16, 'titleGap' => 8, 'rowGap' => 5, 'colGap' => 10, 'lineCol' => array(1, 1, 1), 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'maxWidth' => 500);
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$mail_subject = $ligne["subject"];
$from = trim($ligne["mailfrom"]);
$zDate = $ligne["tdate"];
$MessageID = $ligne["MessageID"];
if ($from == null) {
$from = "unknown";
}
$domain = "unknown";
if (preg_match("#(.+?)@(.+)#", $from, $re)) {
$domain = $re[2];
}
$mail_subject = str_replace("{", "", $mail_subject);
$mail_subject = str_replace("}", "", $mail_subject);
$uri = "<c:alink:{{$params["URI"]}/user.quarantine.query.php?uid={$user->uid}&session={$session}&mail={$MessageID}>{$mail_subject}</c:alink>";
$data[] = array($zDate, $from, $uri);
}
$pdf->ezTable($data, $cols, $subject, $options);
$pdfcode = $pdf->output();
$fname = "/tmp/" . date('Ymdhi') . "-{$user->mail}-quarantines.pdf";
if ($GLOBALS["VERBOSE"]) {
echo "{$pdf->messages}\nbuilding {$fname}\n";
}
@unlink($fname);
if ($GLOBALS["VERBOSE"]) {
echo "Building {$fname}\n";
}
$fp = fopen($fname, 'w');
fwrite($fp, $pdfcode);
fclose($fp);
if (preg_match("#(.+?)@(.+)#", $user->mail, $re)) {
$domain = $re[2];
}
$PostmasterAdress = "no-reply-quarantine@{$domain}";
$ini = new Bs_IniHandler("/etc/artica-postfix/smtpnotif.conf");
if ($ini->_params["SMTP"]["smtp_sender"] != null) {
$PostmasterAdress = $ini->_params["SMTP"]["smtp_sender"];
}
if (file_exists('/etc/artica-postfix/settings/Daemons/PostfixPostmaster')) {
$PostmasterAdress = trim(@file_get_contents('/etc/artica-postfix/settings/Daemons/PostfixPostmaster'));
}
$unix = new unix();
//.........这里部分代码省略.........
示例10: Smarty
include "function/class.ezpdf.php";
include "function/fungsi_rupiah.php";
include "function/fungsi_indotgl.php";
$smarty = new Smarty();
$module = $_GET['module'];
$user_id = $_COOKIE['user_id'];
$pdf = new Cezpdf();
$pdf->ezSetCmMargins(3, 3, 3, 3);
$pdf->selectFont('fonts/Times-Roman.afm');
$all = $pdf->openObject();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->addJpegFromFile('img/logo.jpg', 20, 800, 69);
$pdf->addText(220, 820, 16, '<b>Laporan Penjualan</b>');
$pdf->addText(245, 800, 14, '<b>ASFA JAYA</b>');
$pdf->addText(75, 780, 8, 'Jl. Ki Hajar Dewantara No. 132 Arjawinangun, Cirebon, Telp. (0231) 358630, Hp. 08562121141, Email: takehikoboyz@gmail.com');
$pdf->line(10, 775, 578, 775);
$pdf->line(10, 50, 578, 50);
$pdf->addText(535, 764, 8);
$pdf->addText(30, 34, 8, 'Dicetak tgl:' . date('d-m-Y') . ", " . date('G:i:s', time()));
$pdf->closeObject();
$pdf->addObject($all, 'all');
$start_date = $_GET['start_date'];
$end_date = $_GET['end_date'];
$date_indo = tgl_indo($start_date);
$date_in = tgl_indo($end_date);
$sql_report = mysql_query("SELECT * FROM aj_sales_transaction a, aj_products b, aj_categories c WHERE a.sales_date BETWEEN '{$start_date}' AND '{$end_date}' AND a.product_id=b.product_id AND b.category_id=c.category_id ORDER BY a.sales_date,a.sales_time ASC");
$i = 1;
while ($data_report = mysql_fetch_array($sql_report)) {
$sales_date = tgl_indo($data_report[sales_date]);
$sales_price = format_rupiah($data_report[sales_price]);
$po_price = format_rupiah($data_report[po_price]);
示例11: Cezpdf
function hv_pdf_kopf()
{
//include_once ('pdfclass/class.ezpdf.php');
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(86, 743, 6, "BERLUS HAUSVERWALTUNG * Fontanestr. 1 * 14193 Berlin * Inhaber Wolfgang Wehrheim * Telefon: 89784477 * Fax: 89784479 * Email: info@berlus.de");
$pdf->line(42, 750, 550, 750);
}
示例12: Cezpdf
Released under the GNU General Public License
*/
// set paper type and size
if ($pageloop == "0") {
$pdf = new Cezpdf(A4, portrait);
} else {
$pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
$y = 10;
$i = 0;
do {
$i++;
$y = $y + 20;
$pdf->setLineStyle(1);
$pdf->line(0, $y, 600, $y);
$pdf->addText(0, $y, 8, "{$y}");
$pdf->ezSetY($y);
$dup_y = $y;
} while ($i < 40);
$x = 10;
$i = 0;
do {
$i++;
$x = $x + 20;
$pdf->setLineStyle(1);
$pdf->line($x, 0, $x, 900);
$pdf->addText($x, 0, 8, "{$x}");
$pdf->ezSetY($x);
$dup_x = $x;
} while ($i < 30);
示例13: timeSheet
function get_printable_timeSheet_file($timeSheetID, $timeSheetPrintMode, $printDesc, $format)
{
global $TPL;
$TPL["timeSheetID"] = $timeSheetID;
$TPL["timeSheetPrintMode"] = $timeSheetPrintMode;
$TPL["printDesc"] = $printDesc;
$TPL["format"] = $format;
$db = new db_alloc();
if ($timeSheetID) {
$timeSheet = new timeSheet();
$timeSheet->set_id($timeSheetID);
$timeSheet->select();
$timeSheet->set_tpl_values();
$person = $timeSheet->get_foreign_object("person");
$TPL["timeSheet_personName"] = $person->get_name();
$timeSheet->set_tpl_values("timeSheet_");
// Display the project name.
$project = new project();
$project->set_id($timeSheet->get_value("projectID"));
$project->select();
$TPL["timeSheet_projectName"] = $project->get_value("projectName", DST_HTML_DISPLAY);
// Get client name
$client = $project->get_foreign_object("client");
$client->set_tpl_values();
$TPL["clientName"] = $client->get_value("clientName", DST_HTML_DISPLAY);
$TPL["companyName"] = config::get_config_item("companyName");
$TPL["companyNos1"] = config::get_config_item("companyACN");
$TPL["companyNos2"] = config::get_config_item("companyABN");
unset($br);
$phone = config::get_config_item("companyContactPhone");
$fax = config::get_config_item("companyContactFax");
$phone and $TPL["phone"] = "Ph: " . $phone;
$fax and $TPL["fax"] = "Fax: " . $fax;
$timeSheet->load_pay_info();
$db->query(prepare("SELECT max(dateTimeSheetItem) AS maxDate\n ,min(dateTimeSheetItem) AS minDate\n ,count(timeSheetItemID) as count\n FROM timeSheetItem \n WHERE timeSheetID=%d ", $timeSheetID));
$db->next_record();
$timeSheet->set_id($timeSheetID);
$timeSheet->select() || alloc_error("Unable to select time sheet, trying to use id: " . $timeSheetID);
$TPL["period"] = format_date(DATE_FORMAT, $db->f("minDate")) . " to " . format_date(DATE_FORMAT, $db->f("maxDate"));
$TPL["img"] = config::get_config_item("companyImage");
$TPL["companyContactAddress"] = config::get_config_item("companyContactAddress");
$TPL["companyContactAddress2"] = config::get_config_item("companyContactAddress2");
$TPL["companyContactAddress3"] = config::get_config_item("companyContactAddress3");
$email = config::get_config_item("companyContactEmail");
$email and $TPL["companyContactEmail"] = "Email: " . $email;
$web = config::get_config_item("companyContactHomePage");
$web and $TPL["companyContactHomePage"] = "Web: " . $web;
$TPL["footer"] = config::get_config_item("timeSheetPrintFooter");
$TPL["taxName"] = config::get_config_item("taxName");
$default_header = "Time Sheet";
$default_id_label = "Time Sheet ID";
$default_contractor_label = "Contractor";
$default_total_label = "TOTAL AMOUNT PAYABLE";
if ($timeSheetPrintMode == "money") {
$default_header = "Tax Invoice";
$default_id_label = "Invoice Number";
}
if ($timeSheetPrintMode == "estimate") {
$default_header = "Estimate";
$default_id_label = "Estimate Number";
$default_contractor_label = "Issued By";
$default_total_label = "TOTAL AMOUNT ESTIMATED";
}
if ($format != "html") {
// Build PDF document
$font1 = ALLOC_MOD_DIR . "util/fonts/Helvetica.afm";
$font2 = ALLOC_MOD_DIR . "util/fonts/Helvetica-Oblique.afm";
$pdf_table_options = array("showLines" => 0, "shaded" => 0, "showHeadings" => 0, "xPos" => "left", "xOrientation" => "right", "fontSize" => 10, "rowGap" => 0, "fontSize" => 10);
$cols = array("one" => "", "two" => "", "three" => "", "four" => "");
$cols3 = array("one" => "", "two" => "");
$cols_settings["one"] = array("justification" => "right");
$cols_settings["three"] = array("justification" => "right");
$pdf_table_options2 = array("showLines" => 0, "shaded" => 0, "showHeadings" => 0, "width" => 400, "fontSize" => 10, "xPos" => "center", "xOrientation" => "center", "cols" => $cols_settings);
$cols_settings2["gst"] = array("justification" => "right");
$cols_settings2["money"] = array("justification" => "right");
$pdf_table_options3 = array("showLines" => 2, "shaded" => 0, "width" => 400, "xPos" => "center", "fontSize" => 10, "cols" => $cols_settings2, "lineCol" => array(0.8, 0.8, 0.8), "splitRows" => 1, "protectRows" => 0);
$cols_settings["two"] = array("justification" => "right", "width" => 80);
$pdf_table_options4 = array("showLines" => 2, "shaded" => 0, "width" => 400, "showHeadings" => 0, "fontSize" => 10, "xPos" => "center", "cols" => $cols_settings, "lineCol" => array(0.8, 0.8, 0.8));
$pdf = new Cezpdf();
$pdf->ezSetMargins(90, 90, 90, 90);
$pdf->selectFont($font1);
$pdf->ezStartPageNumbers(436, 80, 10, 'right', 'Page {PAGENUM} of {TOTALPAGENUM}');
$pdf->ezStartPageNumbers(200, 80, 10, 'left', '<b>' . $default_id_label . ': </b>' . $TPL["timeSheetID"]);
$pdf->ezSetY(775);
$TPL["companyName"] and $contact_info[] = array($TPL["companyName"]);
$TPL["companyContactAddress"] and $contact_info[] = array($TPL["companyContactAddress"]);
$TPL["companyContactAddress2"] and $contact_info[] = array($TPL["companyContactAddress2"]);
$TPL["companyContactAddress3"] and $contact_info[] = array($TPL["companyContactAddress3"]);
$TPL["companyContactEmail"] and $contact_info[] = array($TPL["companyContactEmail"]);
$TPL["companyContactHomePage"] and $contact_info[] = array($TPL["companyContactHomePage"]);
$TPL["phone"] and $contact_info[] = array($TPL["phone"]);
$TPL["fax"] and $contact_info[] = array($TPL["fax"]);
$pdf->selectFont($font2);
$y = $pdf->ezTable($contact_info, false, "", $pdf_table_options);
$pdf->selectFont($font1);
$line_y = $y - 10;
$pdf->setLineStyle(1, "round");
$pdf->line(90, $line_y, 510, $line_y);
$pdf->ezSetY(782);
$image_jpg = ALLOC_LOGO;
//.........这里部分代码省略.........
示例14: array
function b_header(Cezpdf &$pdf, $partner_typ, $partner_id, $orientation = 'portrait', $font_file, $f_size, $logo_file = '')
{
$diff = array(196 => 'Adieresis', 228 => 'adieresis', 214 => 'Odieresis', 246 => 'odieresis', 220 => 'Udieresis', 252 => 'udieresis', 223 => 'germandbls');
$pdf->selectFont('Helvetica', array('encoding' => 'WinAnsiEncoding', 'differences' => $diff));
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
if ($orientation == 'portrait') {
$pdf->ezSetMargins(135, 70, 50, 50);
if (!isset($_REQUEST['no_logo'])) {
if ($logo_file == '') {
$logo_file = BERLUS_PATH . "/print_css/{$partner_typ}/{$partner_id}" . "_logo.png";
}
if (file_exists("{$logo_file}")) {
$pdf->addPngFromFile("{$logo_file}", 200, 730, 200, 80);
$pdf->line(43, 725, 545, 725);
$pdf->line(42, 50, 550, 50);
}
} else {
$logo_file = BERLUS_PATH . "/print_css/{$partner_typ}/{$partner_id}" . "_logo.png";
}
$pdf->setLineStyle(0.5);
$this->footer_info($partner_typ, $partner_id);
$pdf->addText(43, 718, $f_size, "{$this->header_zeile}");
$pdf->ezStartPageNumbers(545, 715, $f_size, '', 'Seite {PAGENUM} von {TOTALPAGENUM}', 1);
$pdf->setLineStyle(0.5);
if (!isset($_REQUEST['no_logo'])) {
$pdf->addText($pdf->ez['pageWidth'] / 2, 42, $f_size, "{$this->zeile1}", 0, 'center');
$pdf->addText($pdf->ez['pageWidth'] / 2, 35, $f_size, "{$this->zeile2}", 0, 'center');
}
} else {
$pdf->ezSetMargins(120, 40, 30, 30);
$logo_file = BERLUS_PATH . "/print_css/{$partner_typ}/{$partner_id}" . "_logo.png";
if (file_exists("{$logo_file}")) {
$pdf->addPngFromFile("{$logo_file}", 320, 505, 200, 80);
} else {
$pdf->addText(370, 505, $f_size, "Vorschau / Druckansicht ");
}
$pdf->setLineStyle(0.5);
$this->footer_info($partner_typ, $partner_id);
$pdf->line(43, 500, 785, 500);
$pdf->addText(43, 493, $f_size, "{$this->header_zeile}");
$pdf->ezStartPageNumbers(783, 493, $f_size, '', 'Seite {PAGENUM} von {TOTALPAGENUM}', 1);
$pdf->setLineStyle(0.5);
$pdf->line(42, 30, 785, 30);
$pdf->addText($pdf->ez['pageWidth'] / 2, 23, $f_size, "{$this->zeile1}", 0, 'center');
$pdf->addText($pdf->ez['pageWidth'] / 2, 16, $f_size, "{$this->zeile2}", 0, 'center');
}
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
}
示例15: Cezpdf
*/
$pdf->stream();
} else {
include_once $pathvars["libraries"] . "xtra.pdf.php";
include_once $pathvars["libraries"] . "xtra.ezpdf.php";
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica.afm');
$pdf->openHere("Fit");
// Image
#ezImage(image,[padding],[width],[resize],[justification],[array border]);
#$pdf->addPngFromFile($pathvars["fileroot"]."/images/net/wappen.png",20,780,70);
#$pdf->addPngFromFile($pathvars["fileroot"]."/images/net/auge.png",500,780,70);
$pdf->addPngFromFile($pathvars["fileroot"] . "/images/net/kleines-wappen.png", 30, 780, 46);
$pdf->addPngFromFile($pathvars["fileroot"] . "/images/net/auge.png", 300, 780, 70);
// eine linie
$pdf->line(20, 770, 560, 770);
$pdf->addText(120, 790, '20', '<b>Vermessungsamt</b>');
$pdf->addText(380, 790, '20', '<i>Friedberg</i>');
// seiten nummern
$pdf->ezStartPageNumbers(300, 20, 12, '', '', 1);
// hier geht es los
$pdf->ezSetDy(-60);
// spaltenweise ausgabe an
$pdf->ezColumnsStart(array("num" => 2, "gap" => 20));
// wichtig: damit der die ausgabe am spaltenbeginn steht
#$pdf->ezSetDy(10);
// Textblock
#$pdf->ezText($text,10,array( "justification" => "full" )); // "leading"=>20, "spacing"=>1
// Tabellen
$data = array(array('num' => 1, 'name' => 'gandalf', 'type' => 'wizard'), array('num' => 2, 'name' => 'bilbo', 'type' => 'hobbit', 'url' => 'http://www.ros.co. nz/pdf/'), array('num' => 3, 'name' => 'frodo', 'type' => 'hobbit'), array('num' => 4, 'name' => 'saruman', 'type' => 'bad dude', 'url' => 'http://sourceforge.net/projects/pdf-php'), array('num' => 5, 'name' => 'sauron', 'type' => 'really bad dude'));
for ($i = 0; $i <= 20; $i++) {