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


PHP PDF::GetY方法代码示例

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


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

示例1: render

 /**
  * PDF line renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     if ($this->x1 == ".") {
         $this->x1 = $pdf->GetX();
     }
     if ($this->y1 == ".") {
         $this->y1 = $pdf->GetY();
     }
     if ($this->x2 == ".") {
         $this->x2 = $pdf->getMaxLineWidth();
     }
     if ($this->y2 == ".") {
         $this->y2 = $pdf->GetY();
     }
     if ($pdf->getRTL()) {
         $pdf->Line($pdf->getPageWidth() - $this->x1, $this->y1, $pdf->getPageWidth() - $this->x2, $this->y2);
     } else {
         $pdf->Line($this->x1, $this->y1, $this->x2, $this->y2);
     }
 }
开发者ID:jacoline,项目名称:webtrees,代码行数:27,代码来源:PDF_Line.php

示例2: render

 /**
  * PDF image renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
     // Check for a pagebreak first
     if ($pdf->checkPageBreakPDF($this->height + 5)) {
         $this->y = $pdf->GetY();
     }
     $curx = $pdf->GetX();
     // If current position (left)set "."
     if ($this->x == ".") {
         $this->x = $pdf->GetX();
     } else {
         $this->x = $pdf->addMarginX($this->x);
         $pdf->SetX($curx);
     }
     if ($this->y == ".") {
         //-- first check for a collision with the last picture
         if (isset($lastpicbottom)) {
             if ($pdf->PageNo() == $lastpicpage && $lastpicbottom >= $pdf->GetY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) {
                 $pdf->SetY($lastpicbottom + 5);
             }
         }
         $this->y = $pdf->GetY();
     } else {
         $pdf->SetY($this->y);
     }
     if ($pdf->getRTL()) {
         $pdf->Image($this->file, $pdf->getPageWidth() - $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
     } else {
         $pdf->Image($this->file, $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
     }
     $lastpicpage = $pdf->PageNo();
     $pdf->lastpicpage = $pdf->getPage();
     $lastpicleft = $this->x;
     $lastpicright = $this->x + $this->width;
     $lastpicbottom = $this->y + $this->height;
     // Setup for the next line
     if ($this->line == "N") {
         $pdf->SetY($lastpicbottom);
     }
 }
开发者ID:jacoline,项目名称:webtrees,代码行数:48,代码来源:PDF_Image.php

示例3: ceil

	
$pdf->ln(8);
$fuel = ceil($fuel);
$dollar = "$";

$pdf->AddPage(); // remove this to show in cont page.

$pdf->SetFont('Helvetica','B',10);
$settel2 = $_SESSION['startdate']." to ".$_SESSION['todate'];
$pdf->SetX(65);
$pdf->Write(5,"Your invoice details from ".$settel2."");
$pdf->ln(8);

$pdf->FancyTable($header,$result_array);

	if($pdf->GetY() >= 242.00125){
	
	$pdf->AddPage();
	$pdf->FancyTable1($head_valur,$caption,$increasewidth,"bottom");
	}else
	{
		
	$pdf->FancyTable1($head_valur,$caption,$increasewidth,"bottom");
	$pdf->SetTextColor(0,0,0);
	}
 
$save = "Bill ID 1.pdf";

if(isset($_POST["sendas"]) && $_POST["sendas"]=="mail") {

$email = $_POST['biller_mailer_id'];
开发者ID:hari4you,项目名称:hackrmz,代码行数:30,代码来源:view_bill.php

示例4: die

     }
     $xx1++;
     if ($xx1 > 10) {
         die($xx1 . "FF");
     }
 }
 $xx2 = $xx2 - ($liga[0]->stamm + 12);
 if ($xx2 > 0) {
     $yy0 = $yy1 - 4 * $xx2;
 } else {
     $yy0 = $yy1;
 }
 $xx = 0;
 if ($x == 0) {
     $xx = 1;
 } elseif ($pdf->GetY() > $yy0) {
     $xx = 1;
 }
 if ($xx == 1) {
     //if (($x == 0)||($x == 4)||($x == 8)) {
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 7);
     $pdf->Cell(10, 3, ' ', 0, 0);
     $pdf->Cell(175, 3, utf8_decode(JText::_('WRITTEN')) . ' ' . utf8_decode(JText::_('ON_DAY')) . ' ' . utf8_decode(JHTML::_('date', $now, JText::_('%d. %B %Y ,  %H %M'))), 0, 1, 'R');
     $pdf->SetFont('Times', '', 14);
     $pdf->Cell(10, 15, ' ', 0, 0);
     $pdf->Cell(80, 15, utf8_decode($liga[0]->name) . " " . utf8_decode($saison[0]->name), 0, 1, 'L');
     $pdf->SetFont('Times', '', $font);
     $pdf->Cell(10, $zelle, JText::_('MELDELISTE_NR'), 0, 0, 'C');
     $pdf->Cell(60, $zelle, JText::_('TEAM') . "/" . JText::_('CLUB_LOCATION'), 0, 0, 'L');
     $pdf->Cell(10, $zelle, JText::_('MELDELISTE_REGULAR'), 0, 0, 'C');
开发者ID:ChessLeagueManager,项目名称:deprecated,代码行数:31,代码来源:start_pdf.php

示例5: basket

 public function basket()
 {
     $this->start = $this->input->get('start');
     $this->end = $this->input->get('end');
     $this->view = "";
     if (isset($_GET['view']) && $_GET['view'] != "") {
         $this->view = pnp::clean($_GET['view']);
     }
     $this->data->getTimeRange($this->start, $this->end, $this->view);
     $basket = $this->session->get("basket");
     if (is_array($basket) && sizeof($basket) > 0) {
         foreach ($basket as $item) {
             # explode host::service::source
             $slices = explode("::", $item);
             if (sizeof($slices) == 2) {
                 $this->data->buildDataStruct($slices[0], $slices[1], $this->view);
             }
             if (sizeof($slices) == 3) {
                 $this->data->buildDataStruct($slices[0], $slices[1], $this->view, $slices[2]);
             }
         }
     }
     //echo Kohana::debug($this->data->STRUCT);
     /*
      * PDF Output
      */
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->SetAutoPageBreak('off');
     $pdf->SetMargins(17.5, 30, 10);
     $pdf->AddPage();
     if ($this->use_bg) {
         $pdf->setSourceFile($this->config->conf['background_pdf']);
         $tplIdx = $pdf->importPage(1, '/MediaBox');
         $pdf->useTemplate($tplIdx);
     }
     $pdf->SetCreator('Created with PNP');
     $pdf->SetFont('Arial', '', 10);
     // Title
     foreach ($this->data->STRUCT as $data) {
         if ($pdf->GetY() > 200) {
             $pdf->AddPage();
             if ($this->use_bg) {
                 $pdf->useTemplate($tplIdx);
             }
         }
         if ($data['LEVEL'] == 0) {
             $pdf->SetFont('Arial', '', 12);
             $pdf->CELL(120, 10, $data['MACRO']['DISP_HOSTNAME'] . " -- " . $data['MACRO']['DISP_SERVICEDESC'], 0, 1);
             $pdf->SetFont('Arial', '', 10);
             $pdf->CELL(120, 5, $data['TIMERANGE']['title'] . " (" . $data['TIMERANGE']['f_start'] . " - " . $data['TIMERANGE']['f_end'] . ")", 0, 1);
             $pdf->SetFont('Arial', '', 8);
             $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1);
         } else {
             $pdf->SetFont('Arial', '', 8);
             $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1);
         }
         $image = $this->rrdtool->doImage($data['RRD_CALL'], $out = 'PDF');
         $img = $this->rrdtool->saveImage($image);
         $Y = $pdf->GetY();
         $cell_height = $img['height'] * 0.23;
         $cell_width = $img['width'] * 0.23;
         $pdf->Image($img['file'], 17.5, $Y, $cell_width, $cell_height, 'PNG');
         $pdf->CELL(120, $cell_height, '', 0, 1);
         unlink($img['file']);
     }
     $pdf->Output("pnp4nagios.pdf", "I");
 }
开发者ID:CoolCold,项目名称:pnp4nagios,代码行数:68,代码来源:pdf.php

示例6:

 }
 if (!is_null($row['ta_Email']) && $row['ta_Email'] != '') {
     $contatti .= $row['ta_Email'] . '  ';
 }
 $pdf->Cell(135, 6, ' ' . $contatti, 1, 1);
 $pdf->Cell(40, 6, 'Tutor scolastico ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' prof. ' . utf8_decode($row['TUT_Nome']) . ' ' . utf8_decode($row['TUT_Cognome']), 1, 1);
 $pdf->Cell(40, 6, 'Contatti ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' ' . $row['TUT_Cellulare'] . '  ' . $row['TUT_Email'], 1, 1);
 /*	$pdf->Cell(40,12,'Applicazione competenze ',1,0,'R',1);
 		$pdf->MultiCell(135,4,' '.utf8_decode($row['STA_Compito']),1,1);*/
 $pdf->Ln(3);
 $pdf->SetFont('abac', '', 11);
 $pdf->Cell(0, 8, "Polizze assicurative", 0, 2);
 $pdf->SetFont('abalc', '', 9);
 $pdf->Rect($pdf->GetX() + 6, $pdf->GetY(), 169, 8);
 $pdf->Cell(6);
 $pdf->Cell(0, 4, "INAIL Codice PAT n. " . $rsmeucci['INAIL_Pat'] . " - Infortuni sul lavoro Polizza n. " . $rsmeucci['ASS_Infortuni'], 0, 2);
 $pdf->Cell(0, 4, "Responsabilità civile Polizza n. " . $rsmeucci['ASS_RespCivile'] . " (Compagnia assicurativa " . $rsmeucci['ASS_Compagnia'] . ")");
 $pdf->Ln(5);
 $pdf->SetFont('abac', '', 11);
 $pdf->Cell(0, 8, "Obiettivi e modalità del Tirocinio", 0, 2);
 $pdf->SetFont('abalc', '', 9);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Orientamento: Prendere coscienza delle abilità specifiche necessarie all'inserimento in un settore produttivo e delle possibilità di autorealizzazione in un ambiente diverso da quello familiare e scolastico.", 'TLR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Socializzazione: Formare o potenziare le abilità comunicative e rafforzare determinate abilità cognitive, sociali e professionali; sviluppare le capacità di adattamento al fine di assumere atteggiamenti idonei rispetto all'ambiente operativo in cui gli alunni vengono inseriti.", 'LR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Sviluppo di abilità: Acquisire la capacità di rendersi autonomo nello svolgere i compiti assegnati; Sviluppare precisione ed accuratezza nell'effettuare il lavoro assegnato.", 'LR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Comportamento: Educazione al rispetto degli orari; sviluppare un corretto rapporto con gli altri dipendenti; capire l'importanza della cura delle attrezzature.", 'LR', 2);
开发者ID:andreazurli,项目名称:stage-ng,代码行数:31,代码来源:prjformativo.php

示例7: while

         $pdf->Cell(2, 5, ":", 0, 0, 'L');
         $pdf->Cell(63, 5, $bar1->batasselatan, 0, 0, 'L');
         $pdf->Cell(35, 5, $_SESSION['lang']['keterangan'], 0, 0, 'L');
         $pdf->Cell(2, 5, ":", 0, 0, 'L');
         $pdf->Cell(33, 5, $bar1->keterangan, 0, 0, 'L');
         $pdf->Ln();
         $pdf->Ln();
     }
     $str1 = "select * from " . $dbname . ".pad_photo\r\n            where idlahan = '" . $idlahan . "'";
     $res1 = mysql_query($str1);
     while ($bar1 = mysql_fetch_object($res1)) {
         $pdf->Cell(13, 5, $_SESSION['lang']['photo'], 0, 0, 'L');
         $pdf->Cell(2, 5, ":", 0, 0, 'L');
         $pdf->Cell(73, 5, $bar1->filename, 0, 0, 'L');
         $pdf->Ln();
         $yey = $pdf->GetY();
         $path = 'filepad/' . $bar1->filename;
         $pdf->Image($path, 25, $yey, 70);
         $pdf->SetY($yey + 80);
         $pdf->Ln();
     }
     $pdf->Output();
     exit;
     break;
 case 'update':
     $str = "update " . $dbname . ".pad_lahan \r\n         set pemilik=" . $pemilik . ", \r\n         unit='" . $unit . "', \r\n         lokasi='" . $lokasi . "', \r\n         luas=" . $luas . ", \r\n         luasdapatditanam=" . $bisaditanam . ", \r\n         rptanaman=" . $rptanaman . ", \r\n         rptanah=" . $rptanah . ", \r\n         totalgantirugi=" . ($rptanaman + $rptanah) . ", \r\n         statuspermintaandana=" . $statuspermintaandana . ", \r\n         statuspermbayaran=" . $statuspermbayaran . ", \r\n         kodeblok='" . $blok . "', \r\n         statuskades=" . $statuskades . ", \r\n         statuscamat=" . $statuscamat . ", \r\n         tanggalpengajuan=" . $tanggalpermintaan . ", \r\n         tanggalbayar=" . $tanggalbayar . ", \r\n         tanggalkades=" . $tanggalkades . ", \r\n         tanggalcamat=" . $tanggalcamat . ", \r\n         updateby=" . $_SESSION['standard']['userid'] . ", \r\n         biayakades=" . $biayakades . ", \r\n         biayacamat=" . $biayacamat . ", \r\n         biayamatrai=" . $biayamatrai . ", \r\n         keterangan='" . $keterangan . "', \r\n         nosurat='" . $nosurat . "', \r\n         batastimur='" . $batastimur . "', \r\n         batasbarat='" . $batasbarat . "', \r\n         batasutara='" . $batasutara . "', \r\n         batasselatan='" . $batasselatan . "'\r\n        where idlahan=" . $mid;
     if (mysql_query($str)) {
     } else {
         echo " Gagal," . addslashes(mysql_error($conn));
         exit;
     }
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:pad_slave_save_pembebasan.php

示例8: PDF

        }
    }
}
$pdf = new PDF('L', 'mm', 'A4');
$pdf->AddPage();
$th = $_REQUEST['th'];
$kdunit = $_REQUEST['kdunit'];
$renstra = th_renstra($th);
$font = 'Arial';
$noborder = 0;
$border = 1;
$size = 10;
$ln = 5;
$margin = 5;
$tinggi = 275;
$y = $pdf->GetY();
$pdf->SetY($y);
$pdf->Image('../../css/images/logo_lapan.jpg', 135, 5, 30, 30, 'jpg');
$y = $pdf->GetY();
$pdf->Cell(0, 30, '', '', 1, 'L');
$oSatker = mysql_query("SELECT NAMA FROM t_satker WHERE KDUNITKERJA = '{$kdunit}' ");
$Satker = mysql_fetch_array($oSatker);
$kdeselon1 = substr($kdunit, 0, 3) . '000';
$oEselon = mysql_query("SELECT nama FROM tb_unitkerja WHERE kdunit = '{$kdeselon1}' ");
$Eselon = mysql_fetch_array($oEselon);
$w = array(0, 290);
$pdf->SetFont($font, 'B', $size + 2);
$pdf->SetX($margin + $w[0]);
$pdf->Cell($w[1], $ln, 'RENCANA AKSI DARI PENETAPAN KINERJA', '', 1, 'C');
$pdf->SetX($margin + $w[0]);
$pdf->Cell($w[1], $ln, trim(strtoupper(nm_unit($kdunit))), '', 1, 'C');
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:penetapan_AksiPK_unit_prn.php

示例9:

    $namabarang = '';
    $strv = "select namabarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $bar->kodebarang . "'";
    $resv = mysql_query($strv);
    $barv = mysql_fetch_object($resv);
    $namabarang = $barv->namabarang;
    $pdf->Cell(8, 5, $no, 1, 0, 'L', 1);
    $pdf->Cell(42, 5, $bar->nopo, 1, 0, 'L', 1);
    $pdf->Cell(28, 5, $kodebarang, 1, 0, 'C', 1);
    $pdf->Cell(80, 5, $namabarang, 1, 0, 'L', 1);
    $pdf->Cell(15, 5, $satuan, 1, 0, 'L', 1);
    $pdf->Cell(18, 5, number_format($jumlah, 2, '.', ','), 1, 1, 'R', 1);
}
//footer================================
//                $dtpenerima=namakaryawan($dbname,$conn,$penerima);
//                $dtpengetahui=namakaryawan($dbname,$conn,$pengetahui);
$dptinY = $pdf->GetY();
$dptinX = $pdf->GetX();
$pdf->SetY($dptinY + 25);
$pdf->SetX($dptinX);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 8);
if (substr($expend, 0, 1) == 'S') {
    $dert = $_SESSION['lang']['expeditor'];
    $duer = $optSupplier[$expend];
} else {
    $dert = $_SESSION['lang']['dibawa'];
    $duer = $optKary[$expend];
}
$pdf->Cell(50, $height, $_SESSION['lang']['penerima'] . ",", 0, 0, 'C', 0);
$pdf->Cell(70, $height, $dert . ",", 0, 0, 'C', 0);
$pdf->Cell(65, $height, $_SESSION['lang']['pengirim'] . ",", 0, 1, 'C', 0);
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:log_slave_print_surat_jalan_pdf.php

示例10: PDF

     {
         $this->SetY(-15);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(10, 10, 'Page ' . $this->PageNo() . " / {totalPages}", 0, 0, 'L');
     }
 }
 //================================
 $pdf = new PDF('L', 'pt', 'A4');
 $pdf->AliasNbPages('{totalPages}');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 10;
 $tnggi = $jmlHari * $height;
 $pdf->AddPage();
 //            $pdf->SetFillColor(255,255,255);
 //            $pdf->SetFont('Arial','B',5);
 $tinggiAkr = $pdf->GetY();
 $ksamping = $pdf->GetX();
 $pdf->SetY($tinggiAkr + 20);
 $pdf->SetX($ksamping + 500);
 $pdf->SetFont('Arial', 'B', 6);
 $pdf->SetFillColor(255, 255, 255);
 $pdf->Cell(65, $height, " ", R, 0, 'C', 1);
 $pdf->SetFillColor(220, 220, 220);
 $pdf->Cell(135, $height, $_SESSION['lang']['anggaran'], TLR, 0, 'C', 1);
 $pdf->Cell(90, $height, $_SESSION['lang']['realisasi'], TLR, 1, 'C', 1);
 $tinggiAkr = $pdf->GetY();
 $ksamping = $pdf->GetX();
 $pdf->SetY($tinggiAkr);
 $pdf->SetX($ksamping + 500);
 $pdf->SetFillColor(255, 255, 255);
 $pdf->Cell(65, $height, " ", R, 0, 'C', 1);
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:lbm_slave_biaya_bibitan.php

示例11: foreach

$i = 0;
$nama_bagian = '';
if (!empty($data_outbox)) {
    foreach ($data_outbox as $outbox) {
        if ($nama_bagian != $outbox->nama_bagian) {
            if ($i > 0) {
                $pdf->CountJenis($i);
            }
            $i = 0;
            if ($nama_bagian != '') {
                $pdf->AddPage();
            }
            $nama_bagian = $outbox->nama_bagian;
            $pdf->ChapterTitle($nama_bagian);
        }
        if ($pdf->GetY() >= 175) {
            $pdf->AddPage();
        }
        $i++;
        $pdf->Cell(-6);
        $pdf->Cell(6, $margin, $i, 0, 0);
        $pdf->Cell(30, $margin, $outbox->no_surat, 0, 0);
        $pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_masuk)), 0, 0);
        $pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_surat)), 0, 0);
        $current_x1 = $pdf->GetX();
        $current_y1 = $pdf->GetY();
        $pdf->Cell(90);
        $current_x2 = $pdf->GetX();
        $current_y2 = $pdf->GetY();
        $pdf->Cell(50);
        $current_x3 = $pdf->GetX();
开发者ID:teddcm,项目名称:saask,代码行数:31,代码来源:fpdf-ekspedisi.php

示例12: Booking

$booking = new Booking();
$bookid = $request->GetVar('bookid', 'get');
$bookdata = $booking->getMeldedata($bookid);
define('FPDF_FONTPATH', $fontpath);
include_once 'fpdf.php';
include_once 'pdf.php';
$fonttype = 'times';
$pdf = new PDF();
$pdf->Open();
$pdf->SetTitle('ZVS Meldeschein');
$pdf->SetAuthor($request->GetVar('hotel_name', 'session'));
$pdf->SetCreator('ZVS');
$pdf->AliasNbPages();
$pdf->AddPage(P);
$pdf->ln(5);
$y = $pdf->GetY();
// Address
$pdf->SetFont($fonttype, 'B', 10);
$pdf->Write(5, $request->GetVar('hotel_name', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_street', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_zip', 'session') . " " . $request->GetVar('hotel_city', 'session'));
// Headline
$pdf->SetXY(120, $y);
$pdf->SetFont($fonttype, 'B', 12);
$pdf->Write(5, "Meldeschein für Beherbergungsstätten");
$pdf->SetXY(120, $y + 5);
$pdf->SetFont($fonttype, '', 6);
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:31,代码来源:meldescheinpdf.php

示例13: iconv

    $pdf->AliasNbPages();
    $pdf->SetFont('Arial', '', 9);
    $pdf->AddPage();
    $pdf->Ln();
    //Construcción de la tabla a mostrar
    $pdf->SetY(90);
    $pdf->SetFont('Arial', 'b', 11);
    $pdf->Text(23, 80, iconv('utf-8', 'cp1252', 'Item'));
    $pdf->Text(35, 80, iconv('utf-8', 'cp1252', 'Productos'));
    $pdf->Text(125, 80, 'Total Ventas');
    $pdf->Text(167, 80, iconv('utf-8', 'cp1252', 'Fecha'));
    $pdf->SetFont('Arial', '', 10);
    $pdf->Line(20, 82, 190, 82);
    $pdf->Line(20, 83, 190, 83);
    $j = 0;
    foreach ($fila as $key) {
        $j = $j + 1;
        $productos = iconv('utf-8', 'cp1252', $key[0]);
        $TotalVentas = iconv('utf-8', 'cp1252', $key[1]);
        $fecha = date_format(date_create($key[2]), 'd/m/Y');
        $pdf->Text(25, $pdf->GetY(), $j);
        $pdf->Text(35, $pdf->GetY(), $productos);
        $pdf->Text(135, $pdf->GetY(), $TotalVentas);
        $pdf->Text(165, $pdf->GetY(), $fecha);
        $pdf->cell(0, 6.5, '', 0, 1);
    }
    $pdf->cell(0, 8, '', 0, 1);
    $pdf->Output();
} else {
    header('Location: ../../index.php');
}
开发者ID:aiyellweb,项目名称:arenera,代码行数:31,代码来源:informe.php

示例14: home__memberlist_printview

function home__memberlist_printview()
{
    global $base_url, $files_dir, $config;
    // $content='<html><head><meta http-equiv="Content-Type" content="application/pdf; charset=utf-8" />';
    // drupal_add_css(BOOTSTRAP.'/css/bootstrap.min.css');
    // drupal_add_css(CHURCHDB.'/cdb_printview.css');
    // $content=$content.drupal_get_header();
    if (!user_access("view memberliste", "churchdb")) {
        addErrorMessage(t("no.permission.for", t("list.of.members")));
        return " ";
    }
    require_once ASSETS . '/fpdf17/fpdf.php';
    $compact = true;
    if (isset($_GET["compact"])) {
        $compact = $_GET["compact"];
    }
    // Instanciation of inherited class
    $pdf = new PDF('P', 'mm', 'A4');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 9);
    $res = home_getMemberList();
    $pdf->SetLineWidth(0.4);
    $pdf->SetDrawColor(200, 200, 200);
    $fields = _home__memberlist_getSettingFields()->fields;
    foreach ($res as $p) {
        $pdf->Line(8, $pdf->GetY() - 1, 204, $pdf->GetY() - 1);
        $pdf->Cell(10, 10, "", 0);
        if ($p->imageurl == null || !file_exists("{$files_dir}/fotos/{$p->imageurl}")) {
            $p->imageurl = "nobody.gif";
        }
        $pdf->Image("{$files_dir}/fotos/{$p->imageurl}", $pdf->GetX() - 10, $pdf->GetY() + 1, 9);
        $pdf->Cell(2);
        $pdf->Cell(13, 9, $p->anrede, 0, 0, 'L');
        $pdf->Cell(48, 9, utf8_decode("{$p->name}, {$p->vorname}"), 0, 0, 'L');
        $pdf->Cell(45, 9, utf8_decode("{$p->strasse}"), 0, 0, 'L');
        // TODO: second occurence of code part - whats this for?
        $birthday = "";
        if ($p->geburtsdatum != null) {
            if ($p->year < 7000) {
                $birthday = "{$p->day}.{$p->month}.";
            }
            if ($p->year != 1004 && $fields["memberlist_birthday_full"]->getValue()) {
                if ($p->year < 7000) {
                    $birthday = $birthday . $p->year;
                } else {
                    $birthday = $birthday . $p->year - 7000;
                }
            }
        }
        $pdf->Cell(20, 9, $birthday, 0, 0, 'L');
        if ($fields["memberlist_telefonprivat"]->getValue() && $p->telefonprivat != "") {
            $pdf->Cell(30, 9, $p->telefonprivat, 0, 0, 'L');
        } else {
            if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->telefongeschaeftlich != "") {
                $pdf->Cell(30, 9, $p->telefongeschaeftlich, 0, 0, 'L');
            } else {
                if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->fax != "") {
                    $pdf->Cell(30, 9, $p->fax . " (Fax)", 0, 0, 'L');
                } else {
                    $pdf->Cell(30, 9, "", 0, 0, 'L');
                }
            }
        }
        if ($fields["memberlist_telefonhandy"]->getValue() && $p->telefonhandy != "") {
            $pdf->Cell(30, 9, $p->telefonhandy, 0, 0, 'L');
        }
        // Zeilenumbruch
        $pdf->Ln(5);
        $pdf->Cell(73);
        $pdf->Cell(48, 10, "{$p->plz} " . utf8_decode($p->ort), 0, 0, 'L');
        $pdf->Cell(17);
        if ($fields["memberlist_email"]->getValue() && $p->email != "") {
            $pdf->SetFont('Arial', '', 8);
            $pdf->Cell(30, 9, $p->email);
            $pdf->SetFont('Arial', '', 9);
        }
        $pdf->Ln(12);
    }
    $pdf->Output(t("list.of.members") . '.pdf', 'I');
}
开发者ID:lhaselauer,项目名称:churchtools_basic,代码行数:81,代码来源:home.php

示例15: pdf

			{
				$eleve_id = $tab['eleve_id'];
				$score = (isset($tab_score_eleve_item[$eleve_id][$matiere_id][$item_id])) ? $tab_score_eleve_item[$eleve_id][$matiere_id][$item_id] : false ;
				$releve_PDF->afficher_score_bilan($score,$br=0);
				$releve_HTML_table_body .= affich_score_html($score,$tableau_tri_mode);
			}
			$valeur1 = $tab_moyenne_scores_item[$item_id];
			$valeur2 = $tab_pourcentage_acquis_item[$item_id];
			$releve_PDF->bilan_periode_synthese_pourcentages($valeur1,$valeur2,FALSE,TRUE);
			$checkbox = ($affichage_checkbox) ? '<td class="nu"><input type="checkbox" name="id_item[]" value="'.$item_id.'" /></td>' : '' ;
			$releve_HTML_table_body .= '<td class="nu">&nbsp;</td>'.affich_score_html($valeur1,$tableau_tri_mode,'%').affich_score_html($valeur2,$tableau_tri_mode,'%').$checkbox.'</tr>'."\r\n";
		}
	}
	$releve_HTML_table_body = '<tbody>'.$releve_HTML_table_body.'</tbody>'."\r\n";
	// dernière ligne (doublée)
	$memo_y = $releve_PDF->GetY()+2;
	$releve_PDF->SetY( $memo_y );
	$releve_PDF->choisir_couleur_fond('gris_moyen');
	$releve_PDF->Cell($releve_PDF->intitule_largeur , $releve_PDF->cases_hauteur , pdf('moy. scores '.$info_ponderation_courte.' [*]') , 1 , 2 , 'C' , true , '');
	$releve_PDF->Cell($releve_PDF->intitule_largeur , $releve_PDF->cases_hauteur , pdf('% validations [**]') , 1 , 0 , 'C' , true , '');
	$releve_HTML_table_foot1 = '<tr><th>moy. scores '.$info_ponderation_courte.' [*]</th>';
	$releve_HTML_table_foot2 = '<tr><th>% validations [**]</th>';
	$checkbox = ($affichage_checkbox) ? '<tr><th class="nu">&nbsp;</th>' : '' ;
	$memo_x = $releve_PDF->GetX();
	$releve_PDF->SetXY($memo_x,$memo_y);
	if($tableau_tri_objet=='eleve')
	{
		foreach($tab_liste_item as $item_id)	// Pour chaque item...
		{
			$valeur1 = $tab_moyenne_scores_item[$item_id];
			$valeur2 = $tab_pourcentage_acquis_item[$item_id];
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:code_releve_bilan_item.php


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