當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FPDF::line方法代碼示例

本文整理匯總了PHP中FPDF::line方法的典型用法代碼示例。如果您正苦於以下問題:PHP FPDF::line方法的具體用法?PHP FPDF::line怎麽用?PHP FPDF::line使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FPDF的用法示例。


在下文中一共展示了FPDF::line方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: line

 function line($x1, $y1, $x2, $y2)
 {
     FPDF::line($x1, $this->h - $y1, $x2, $this->h - $y2);
 }
開發者ID:stateless,項目名稱:weberp-cvs,代碼行數:4,代碼來源:class.pdf.php

示例2: array

while ($row = mysqli_fetch_assoc($sql)) {
    array_push($data, $row);
}
#setting judul laporan dan header tabel
$judul = "LAPORAN DATA PENJUALAN";
$header = array(array("label" => "No Polis", "length" => 15, "align" => "L"), array("label" => "Tgl Penjualan", "length" => 20, "align" => "L"), array("label" => "No Identitas", "length" => 30, "align" => "L"), array("label" => "Jumlah Premi", "length" => 20, "align" => "L"), array("label" => "Masa Asuransi(/thn)", "length" => 25, "align" => "L"), array("label" => "ID Agen", "length" => 15, "align" => "L"), array("label" => "Tipe", "length" => 15, "align" => "L"));
#sertakan library FPDF dan bentuk objek
ob_start();
require_once "fpdf16/fpdf.php";
$pdf = new FPDF();
$pdf->AddPage();
#tampilkan judul laporan
$pdf->SetMargins(35, 20, 20, 20);
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(0, 20, $judul, '0', 1, 'C');
$pdf->line(31, 770, 565, 770);
#buat header tabel
$pdf->SetFont('Arial', 'B', '7');
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
foreach ($header as $kolom) {
    $pdf->Cell($kolom['length'], 5, $kolom['label'], 1, '0', $kolom['align'], true);
}
$pdf->Ln();
#tampilkan data tabelnya
$pdf->SetFillColor(224, 225, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('');
$fill = false;
foreach ($data as $baris) {
開發者ID:rifkyekayama,項目名稱:asuransi,代碼行數:31,代碼來源:cetakDataPenjualan.php

示例3: FPDF

$db->_DEBUG = 1;
$pdf = new FPDF("L", 'mm', "A4");
$pdf->open();
$pdf->AddPage();
$fonte = 'times';
$pdf->SetLeftMargin(5);
$pdf->SetAutoPageBreak("on", 2);
$pdf->SetFont($fonte, "", 12);
$pdf->sety(15);
$pdf->SetFont($fonte, "b", 12);
$pdf->setx(5);
$pdf->ln();
$pdf->SetFont($fonte, "", 14);
$pdf->setx(5);
$pdf->cell(50, 5, "Controle de Entregas", 0, 1);
$pdf->line(5, $pdf->GetY(), 290, $pdf->GetY());
$pdf->ln(10);
$pdf->setfont($fonte, "B", "14");
$pdf->cell(0, 5, $_GET["dtvenda"], 0, 1, "C");
$pdf->setfillcolor(235);
$pdf->SetFont($fonte, "b", 10);
$total = $db->entregas["total"];
$sql = " SELECT fun_nome,count(*) as total\n         FROM   comandas inner join comandaentrega \n                on cet_comid = com_id\n                inner join funcionarios on fun_id = cet_funid\n         WHERE com_dtcomanda = '" . strformat($_GET["dtvenda"], "dten") . "' group by fun_nome order by fun_nome";
$rs = $db->executa($sql);
$pdf->cell(140, 5, "Funcionário", "B", 0, "C", 1);
$pdf->cell(45, 5, "Qtde", "B", 1, "C", 1);
$pdf->SetFont($fonte, "", 10);
while ($ln = $db->fetch_array($rs)) {
    if ($pdf->getY() >= $pdf->h - 15) {
        $pdf->addpage();
        $pdf->SetFont($fonte, "b", 10);
開發者ID:tavo1981,項目名稱:phpbar,代碼行數:31,代碼來源:del_rctrlentregas002.php

示例4:

 $y_aqui = $y_aqui - 10;
 $pdf->SetXY(14, $y_aqui);
 $pdf->Cell(178, 5, "", "LR", 0, 'L');
 //if ($ExtDominio==True){
 $pdf->Ln();
 //}
 $pdf->SetX(14);
 $pdf->MultiCell(178, 5, $texto_Principal3, "LR", 'J');
 //Se agregan celdas para rellenar espacios en el margen
 if ($ExtDominio == False) {
     $pdf->Ln();
     $pdf->SetX(14);
     $pdf->MultiCell(178, 5, "Los gastos originados por el lanzamiento o toma de posesión del inmueble después de que se obtengan las órdenes judiciales correspondientes, serán cubiertos por El Prestador hasta la cantidad indicada en este contrato, en caso de que por las características del inmueble sea necesario cubrir un gasto mayor, El Prestatario acepta cubrir esa diferencia.", "LR", 'J');
     $pdf->SetXY(14, 234);
     $pdf->Cell(178, 10, "", "LRB", 0, 'L');
     $pdf->line(14, 212, 14, 224);
     $pdf->line(192, 212, 192, 224);
 } else {
     $pdf->SetXY(14, 230);
     $pdf->Cell(178, 5, "", "LRB", 0, 'L');
     //$pdf->line(15,238,14,242);
     if ($GJudiciales == true) {
         //            $pdf->SetXY(14,194);
         //            $pdf->Cell(178,5,"","LR",0,'L');
         //            $pdf->SetXY(14,254);
         //            $pdf->Cell(178,10,"","LR",0,'L');
     }
 }
 //Rellenos
 $pdf->SetXY(14, 30);
 $pdf->Cell(178, 10, "", "LR", 0, 'L');
開發者ID:abisaigarcia,項目名稱:Contratos-SISI,代碼行數:31,代碼來源:certificado.php


注:本文中的FPDF::line方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。