当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::BasicTable方法代码示例

本文整理汇总了PHP中PDF::BasicTable方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::BasicTable方法的具体用法?PHP PDF::BasicTable怎么用?PHP PDF::BasicTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::BasicTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: relatorioCursoPorPolo

 function relatorioCursoPorPolo()
 {
     $pdf = new PDF("P", "pt", "A4");
     $relatorio = $this->read();
     $cabeçalhoTabela = array('Curso', 'Tipo');
     $polo = "";
     $array = array();
     foreach ($relatorio as $value) {
         if ($polo == "") {
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
         }
         if ($polo != $value->getPolo()->getId()) {
             $pdf->BasicTable($cabeçalhoTabela, $array);
             $array = array();
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         } else {
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         }
     }
     $pdf->BasicTable($cabeçalhoTabela, $array);
     $pdf->Output();
 }
开发者ID:RaelCappra,项目名称:SisTutor,代码行数:27,代码来源:CursoController.php

示例2: relatorioDisciplinasPorCurso

 function relatorioDisciplinasPorCurso($id)
 {
     $pdf = new PDF("P", "pt", "A4");
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $polo = new Polo();
     $polo->setId($id);
     $polo = $polo->getById();
     $pdf->Cell(40, 10, $polo->getNome());
     $cabeçalhoTabela = array('Disciplina', 'Nome Tutor', 'Sobrenome Tutor');
     $curso = new Curso();
     $cursos = $curso->read();
     foreach ($cursos as $curso) {
         if ($curso->getPolo()->getId() != $id) {
             continue;
         }
         $pdf->setVendedor($curso->getNome() . " - " . $curso->getTipo()['descricao']);
         $pdf->AddPage();
         $disciplinaDao = new DisciplinaDao();
         $array = $disciplinaDao->listDisciplinasTutoresByCurso($curso);
         $pdf->BasicTable($cabeçalhoTabela, $array);
     }
     $pdf->Output();
 }
开发者ID:RaelCappra,项目名称:SisTutor,代码行数:24,代码来源:DisciplinaController.php

示例3: PDF

        // Move to the right
        $this->Cell(150);
        // Title
        $this->Cell(90, 10, 'DEPARTAMENTO ALMACEN DE INSUMOS', 0, 0, 'C');
        // Line break
        $this->Ln(10);
        // Move to the right
        $this->Cell(180);
        // Title
        $this->Cell(30, 10, 'CONTROL DE EXISTENCIA', 0, 0, 'C');
        // Line break
        $this->Ln(10);
        // Move to the right
        $this->Cell(180);
        // Title
        $this->Cell(30, 10, 'PLANTA :  EL CENTINELA', 0, 0, 'C');
        // Line break
        $this->Ln(10);
    }
}
$pdf = new PDF('L');
// Column headings
$header = array('Codigo', 'Nombre', 'U/M', 'Inv. Inicial', 'Entrada Mercancia', 'Salida Mercancia', 'Inv. Final');
// Data loading
//$data = $pdf->LoadData('countries.txt');
$modelo = new Producto();
$data = $modelo->listadoMes();
$pdf->SetFont('Arial', '', 14);
$pdf->AddPage();
$pdf->BasicTable($header, $data);
$pdf->Output();
开发者ID:ricardoxd,项目名称:phpMVCEjemplo,代码行数:31,代码来源:existencia.mes.php

示例4: elseif

    }
} elseif ($_GET['code'] == 3) {
    $pdf->Cell(40, 8, utf8_decode('Médicos por banda horaria'), 0);
    $header = array('Medico', 'dia', 'desde', 'hasta');
    $c1 = 0;
    foreach ($_GET as $n) {
        $consulta = 'select id, nombre, apellido, dia, min(desde) desde, max(hasta) hasta, id_med from horario
            inner join medico on (horario.id_med = medico.idmedico) where id = ' . $n . ' group by id_med, dia';
        $result = $db->query($consulta);
        if ($result->rowCount() > 0) {
            $valor = $result->fetch(PDO::FETCH_ASSOC);
            if ($c1 >= 0) {
                $medico = $valor['nombre'] . ' ' . $valor['apellido'];
                $c2 = 0;
                $matriz[$c1][$c2] = $medico;
                $c2++;
                $matriz[$c1][$c2] = $valor['dia'];
                $c2++;
                $matriz[$c1][$c2] = $valor['desde'];
                $c2++;
                $matriz[$c1][$c2] = $valor['hasta'];
            }
            $c1++;
        }
    }
}
//$pdf->SetFont('Arial', 'B', 15);
//$pdf->Cell(40, 8, 'Medicos', 0);
$pdf->Ln(20);
$pdf->BasicTable($header, $matriz);
$pdf->Output();
开发者ID:lautaros86,项目名称:proyectoSGT,代码行数:31,代码来源:_medico_imprimir_reportes.php

示例5: claBautismo

                        break;
                    case "1":
                        $estadoIMG = "img/info_bautizado.png";
                        break;
                }
                $this->SetFont('Arial', '', 8);
                $this->Cell($w[0], 7, $this->CompletaCaracteres($data[$z]['ReferenciaInfante']), 1, 0, 'C');
                $this->Cell($w[1], 7, $loFuncion->fDameFechaEscrita(substr($data[$z]['FechaBautizo'], 0, 10)), 1, 0, 'C');
                $this->Cell($w[3], 7, $this->CompletaCaracteres($data[$z]['NombresBau'] . " " . $data[$z]['ApellidosBau']), 1, 0, 'C');
                $this->Cell($w[4], 7, $this->CompletaCaracteres($data[$z]['SexoBauDescrip']), 1, 0, 'C');
                $this->Cell($w[2], 7, $this->CompletaCaracteres($data[$z]['NombreFullRepre']), 1, 0, 'C');
                $da = $this->getY();
                $this->Cell($w[5], 7, $this->Image($estadoIMG, 171.3, $da + 0.6, 0, 0, '', '../bautismo.php?bautiRef=' . $data[$z]['ReferenciaInfante']), 1, 0, 'C');
                $this->Ln(7);
            }
        }
        $this->Ln(10);
        $this->SetFont('Arial', 'I', 8);
        $this->setX(20);
        $this->Cell(40, 10, 'Usuario: ' . $_SESSION["nombreUsuario"] . " (" . $_SESSION["rolNombre"] . ")", 0, 0, 'L');
    }
}
$objC = new claBautismo();
$objC->asFechaInicioR = $_POST["f_Inicio"];
$objC->asFechaFinR = $_POST["f_Fin"];
$arregloCl = $objC->faListarBautizos();
$header = array('Ref', ' Fecha Bautizo', ' Infante', 'Sexo', 'Representante', 'Estado');
$pdf = new PDF();
$pdf->AddPage();
$pdf->BasicTable($header, $arregloCl);
$pdf->Output();
开发者ID:rhodwulf64,项目名称:igle,代码行数:31,代码来源:listabautizo.php

示例6: while

            $this->Cell($width[$i], 10, $header[$i], 1, 0, 'C', true);
        }
        $this->Ln();
        $this->SetFont('Arial', '', '11');
        $this->SetFillColor(132, 210, 143);
        $zebreado = false;
        $total = 0.0;
        while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
            $this->Cell($width[0], 10, utf8_decode($line['nombre']), 0, 'LR', 'L', $zebreado);
            //utf8_decode -> Solucionar problemas con Ñ
            $this->Cell($width[1], 10, number_format($line['unidad']), 0, 'LR', 'C', $zebreado);
            $this->Cell($width[2], 10, $line['precio'] . EURO, 0, 'LR', 'C', $zebreado);
            $this->Cell($width[3], 10, $line['precioTotal'] . EURO, 0, 'LR', 'C', $zebreado);
            $this->Ln();
            $zebreado = !$zebreado;
            $total = $total + doubleval($line['precioTotal']);
        }
        //Linea de cierre
        $this->Cell(array_sum($width), 0, '', 'T');
        //$this->Ln();
        $this->SetX(110);
        $this->SetFont('Arial', 'B');
        $this->Cell(50, 10, 'TOTAL:', 'RB', 0, 'C', $zebreado);
        $this->Cell(40, 10, $total . EURO, 'LB', 0, 'C', $zebreado);
    }
}
$pdf = new PDF();
$pdf->AddPage();
$header = array('Articulos', 'Unidades', 'Precio Unidades', 'Total Articulo');
$pdf->BasicTable($header);
$pdf->Output('F', './pdf/pedidoNo-' . $_GET['id'] . '.pdf');
开发者ID:ajaniramon,项目名称:2DAW-Tienda,代码行数:31,代码来源:factura.php

示例7: DateTime

        $subY = $this->y;
        $this->SetXY($subX, $subY + $subOffset);
        // restore font size
        $this->SetFontSize($subFontSizeold);
    }
}
// --------------------------- Get current date
$dt = new DateTime();
$dt = $dt->format('Y-M-d');
// --------------------------- Get current date
$pdf = new PDF();
$pdf->AliasNbPages();
// Column headings
$header = array('Account Title', 'Date', 'Income', 'Expense');
$pdf->SetFont('Arial', '', 9);
$pdf->SetMargins(5, 5, 5);
$pdf->AddPage();
$pdf->subWrite(4, 'E', '', 20);
$pdf->Write(4, 'xpense');
$pdf->Ln();
$pdf->Ln();
$pdf->SetX(10);
$pdf->subWrite(4, 'M', '', 20);
$pdf->Write(4, 'anager');
$pdf->SetX(5);
$pdf->Cell(0, 4, 'Income - Expense Report', 0, 1, 'C');
$pdf->Cell(0, 4, $ReportTitle, 0, 1, 'C');
$pdf->Cell(0, 4, "As Of: " . $dt, 0, 1, 'C');
$pdf->Cell(0, 4, '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------', 0, 1, 'C');
$pdf->BasicTable($header, $decoded);
$pdf->Output();
开发者ID:JeffreyAReyes,项目名称:expensemanagerjquery,代码行数:31,代码来源:print_income_expense.php

示例8: PDF

        $this->Cell(190, 5, "Total Pagos " . $abonosTotales, 0, 0, 'R');
        $this->Ln();
        $this->Ln();
        $this->Cell(190, 5, "Total Pendiente " . ($deudaTotal - $abonosTotales), 0, 0, 'R');
        mysql_close($dbLink);
    }
}
//verificamos si introdujeron un valor para la cedula (a veces ese valor no representa una cedula sino un localizador)
//a efectos del reporte no importa lo que implica el valor de cedula, sigue siendo un query sobre ese campo
if (isset($_POST["cedula"])) {
    $pdf = new PDF();
    $sql1 = "SELECT lvpc.nro_inscripcion FROM linea_ventas_paquetes_credito lvpc" . " WHERE lvpc.ci = '" . $_POST["cedula"] . "'" . " AND lvpc.ci != '0'";
    $dbLink = getConnection();
    $consulta1 = mysql_query($sql1, $dbLink);
    $haveRecords = false;
    while (list($localizador) = mysql_fetch_array($consulta1)) {
        $haveRecords = true;
        $pdf->AddPage();
        $pdf->BasicTable($localizador);
    }
    if (!$haveRecords) {
        $pdf->AddPage();
        $pdf->SetY(80);
        $pdf->SetFont('Arial', 'B', 14);
        $pdf->MultiCell(200, 5, "Disculpe, no se encontró información para la cedula: " . $_POST["cedula"]);
    }
    $pdf->Output();
    mysql_close($dbLink);
} else {
    echo "No se tiene un valor de cedula o localizador para hacer la busqueda";
}
开发者ID:xmachadox3,项目名称:fjrsomecode,代码行数:31,代码来源:reportePDFV2.php

示例9: BasicTable

    }
    public function BasicTable($header, $content_list)
    {
        //header
        foreach ($header as $col) {
            $this->Cell(40, 5, $col, 1);
        }
        $this->Ln();
        //data
        foreach ($content_list['items'] as $parent_value) {
            foreach ($parent_value['child_label']['items'] as $child_value) {
            }
            // foreach($parent_value['child_label'] as $child_value) {
            // }
        }
    }
}
$pdf = new PDF();
//table header
$header = array('No.', 'Particular', 'Unit', 'Unit Label', 'Unit(Price)', 'Unit Price(Php)', '');
$pdf->AddPage();
$pdf->Ln(10);
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(10, 5, 'To: ');
$pdf->Ln();
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(5, 5, 'Address: ');
$pdf->Ln(10);
$pdf->Header();
$pdf->BasicTable($header, $content_list);
$pdf->Output();
开发者ID:rochellecanale,项目名称:tutorials,代码行数:31,代码来源:generate_pdf.php

示例10: claPadrinos

        $this->Cell(10, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNumero_registro, 12)), 0, 0, 'L');
        $this->ln();
        $this->ln();
        $this->Cell(15);
        $this->MultiCell(38, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNotaMarginal, 135)), 0, 'L');
        $this->SetY(174);
        $this->Cell(15);
        $this->MultiCell(37, 5, utf8_decode($this->CompletaCaracteres($Bauti->asPrefectuDe, 30)), 0, 'L');
        $this->SetY(194);
        $this->Cell(15);
        $this->Cell(10, 5, utf8_decode($loFuncion->fDameFechaEscrita($Bauti->asPresentadoEl)), 0, 0, 'L');
        $this->SetY(204);
        $this->Cell(15);
        $this->Cell(10, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNumPartidaNac, 19)), 0, 0, 'L');
        $this->ln();
    }
}
$loPadrinos = new claPadrinos();
$objC = new claBautismo();
$objC->asReferenciaInfante = $_GET["ReFinfante"];
$objC->fbBuscarBauti();
if ($objC->asEstatusBau == 1) {
    $header = array('Ref', ' Fecha Bautizo', ' Infante', 'Sexo', 'Representante', 'Estado');
    $pdf = new PDF();
    $pdf->AddPage();
    $pdf->BasicTable($header, $objC, $loPadrinos);
    $pdf->Output();
} else {
    $_SESSION["message"] = "No se pudo imprimir el Certificado.";
    header("location: ../../index.php");
}
开发者ID:rhodwulf64,项目名称:igle,代码行数:31,代码来源:CertificadoBautismo.php

示例11: getBpartner

            $totaldebit = $totaldebit + $amt;
        } else {
            $creditamt = $amt * -1;
            $totalcredit = $totalcredit + $amt * -1;
        }
        $balanceamt = number_format($totaldebit - $totalcredit, 2);
        $i++;
        if (getBpartner($accounts_id) != "") {
            $accounts_name .= " - " . getBpartner($accounts_id);
        }
        $data[] = array($i, $accountcode_full, $accounts_name, number_format($debitamt, 2), number_format($creditamt, 2), $balanceamt, $batchno, $document_no);
    }
    $data[] = array("", "", "Total:", number_format($totaldebit, 2), number_format($totalcredit, 2), number_format($totaldebit - $totalcredit, 2), "", "");
    $pdf->AddPage();
    //$pdf->MultiCell(0,5,$sql,0,'C');
    $pdf->BasicTable($data);
    //display pdf
    //$pdf->Output("doc.pdf","D");
    $pdf->Output("Accounts.pdf", "I");
    exit(1);
} else {
    include_once "menu.php";
    include_once 'class/Log.php';
    include_once 'class/SelectCtrl.php';
    include_once "../../class/datepicker/class.datepicker.php";
    $dp = new datepicker("{$tableprefix}");
    $dp->dateFormat = 'Y-m-d';
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    $ctrl = new SelectCtrl();
    $accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
    $accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:viewtrialbalance_detail.php

示例12: conozca

				</tr>
				<tr align="left">
					<td style="width:500px;"><strong>Tercera proclama: ' . $lsFechaProclamaTres . '</strong></td>
					<td style="width:400px;" align="center"><strong>Hora: ' . $lsHoraProclamaTres . '</strong></td>
				</tr>
				 <tr>
				 	<td colspan="10" align="center"><button type="button" onclick="history.go(-1);" id="volver">Volver</button><button type="button" onclick="imprimir()" id="impri">Imprimir</button></td>
				 </tr>
			</table></center><br><br><br><br><b>
			<center><div style="width:800px;">Quien(es) conozca(n) algún impedimento que pueda hacer inválido este matrimonio tiene(n) la obligación de manifestarlo al Párroco.</div></center>
			<br><br><br><br><br><div align="center">_____________________________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_____________________________</div>
			<div align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Los contrayentes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>

	<br><br><br><br><div align="center" style="float:right; margin-right:100px;">_____________________________<br>
			Párroco</div>
			
			<div id="usuario">Elaborado por:
				' . $_SESSION["nombreUsuario"] . '
			</div>
		</div>
	</body>
	</html>');
        $this->WriteHTML($html);
    }
}
$arregloCl = "";
$header = array('Cedula', ' Nombre', 'Apellido', 'Sexo', 'Fecha Nacimiento', 'Direccion');
$pdf = new PDF();
$pdf->AddPage();
$pdf->BasicTable($header, $arregloCl, $lsNombreNovio);
$pdf->Output();
开发者ID:rhodwulf64,项目名称:igle,代码行数:31,代码来源:lista_cliente.php

示例13: generarPDFporEntidad

 public function generarPDFporEntidad()
 {
     Session::tienePermiso('estadistica');
     if (isset($_POST['fechaInicio2']) && isset($_POST['fechaFin2'])) {
         $fechaInicio = DateTime::createFromFormat('d/m/Y', $_POST['fechaInicio2'])->format('Y-m-d');
         $fechaFin = DateTime::createFromFormat('d/m/Y', $_POST['fechaFin2'])->format('Y-m-d');
         $pdf = new PDF();
         // Titulos de las columnas
         $header = array('Entidad', 'Kgs entregados');
         $estadisticas = Estadisticas::nuevo();
         $datos = $estadisticas->pesoPorEntidadEntre($fechaInicio, $fechaFin);
         $pdf->setTitulo('Kgs entregados a cada Entidad Receptora');
         $pdf->setFont('Arial', '', 14);
         $pdf->AddPage();
         $pdf->BasicTable($header, $datos);
         $pdf->Output();
     }
 }
开发者ID:RamiroAlvaro,项目名称:ProyectoDeSoftware,代码行数:18,代码来源:EstadisticasController.php

示例14: die

    $result = mysql_fetch_array($objQuery);
    array_push($resultData, $result);
}
//************************//
//*** Table 1 ***//
$pdf->AddPage();
$pdf->SetFont('Helvetica', '', 14);
$pdf->Cell(68);
$pdf->Write(5, 'Veggies24x7.com');
$pdf->Ln();
$pdf->Cell(22);
$pdf->SetFontSize(8);
$pdf->Cell(57);
$result = mysql_query("select date_format(now(), '%W, %M %d, %Y') as date");
while ($row = mysql_fetch_array($result)) {
    $pdf->Write(5, $row['date']);
}
$pdf->Ln();
//count total numbers of visitors
$result = mysql_query("Select * from products") or die("Database query failed: {$query}" . mysql_error());
$count = mysql_num_rows($result);
$pdf->Cell(0);
$pdf->Write(5, '             Total Price: ' . $count . '');
$pdf->Ln();
$pdf->Ln(5);
$pdf->Ln(0);
$pdf->Cell(10);
$pdf->BasicTable($header, $resultData);
//forme();
//$pdf->Output("$d.pdf","F");
$pdf->Output();
开发者ID:Aabitsoft-India,项目名称:Indiaandindian,代码行数:31,代码来源:print_pdf.php

示例15: BasicTable

<?php

session_start();
require "../fpdf.php";
include "../controller/api_connect_db.php";
class PDF extends FPDF
{
    function BasicTable($data)
    {
        foreach (['Nom', 'Quantité', 'Matière'] as $col) {
            $this->Cell(55, 7, utf8_decode($col), 1);
        }
        $this->Ln();
        foreach ($data as $row) {
            $this->Cell(55, 6, utf8_decode($row[0]), 1);
            $this->Cell(55, 6, utf8_decode($row[1]), 1);
            $this->Cell(55, 6, utf8_decode($row[2]), 1);
            $this->Ln();
        }
    }
}
$result = $bdd->query("SELECT f.nom as nom, MAX(l.quantite) as quantite, m.nom as matiere\n                            FROM fourniture f, liste l, link_eleve le, link_prof lp, matiere m\n                            WHERE f.id = l.fourniture_id\n                            AND lp.classe_id = le.classe_id\n                            AND l.prof_id = lp.prof_id\n                            AND f.matiere_id = m.id\n                            AND le.eleve_id = " . $_SESSION['id'] . "\n                            GROUP BY m.id,f.id");
$pdf = new PDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->BasicTable($result);
$pdf->Output();
开发者ID:AChevallier,项目名称:SchoolSupplies,代码行数:27,代码来源:api_create_pdf.php


注:本文中的PDF::BasicTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。