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


PHP PDF::getY方法代码示例

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


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

示例1: pdf_writeLinkedObjects

/**
 *	Show linked objects for PDF generation
 *
 *	@param	PDF			$pdf				Object PDF
 *	@param	object		$object				Object
 *	@param  Translate	$outputlangs		Object lang
 *	@param  int			$posx				X
 *	@param  int			$posy				Y
 *	@param	float		$w					Width of cells. If 0, they extend up to the right margin of the page.
 *	@param	float		$h					Cell minimum height. The cell extends automatically if needed.
 *	@param	int			$align				Align
 *	@param	string		$default_font_size	Font size
 *	@return	float                           The Y PDF position
 */
function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size)
{
    $linkedobjects = pdf_getLinkedObjects($object, $outputlangs);
    if (!empty($linkedobjects)) {
        foreach ($linkedobjects as $linkedobject) {
            $posy += 3;
            $pdf->SetXY($posx, $posy);
            $pdf->SetFont('', '', $default_font_size - 2);
            $pdf->MultiCell($w, $h, $linkedobject["ref_title"] . ' : ' . $linkedobject["ref_value"], '', $align);
            if (!empty($linkedobject["date_title"]) && !empty($linkedobject["date_value"])) {
                $posy += 3;
                $pdf->SetXY($posx, $posy);
                $pdf->MultiCell($w, $h, $linkedobject["date_title"] . ' : ' . $linkedobject["date_value"], '', $align);
            }
        }
    }
    return $pdf->getY();
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:32,代码来源:pdf.lib.php

示例2: while

 $pdf->Cell(50, 8, "Remarks", 0, 0, 'C');
 $pdf->line(0, 110, 220, 110);
 //line after slno, desc and remarks
 $pdf->ln(6);
 $j = 0;
 ///part count
 $l = 0;
 ///challan counter
 $k = 1;
 // for serial no
 $r = 1;
 //1 means ok to outpit serial no
 $pdf->ln(8);
 while ($j < count($dq_list)) {
     if ($dq_list[$j][0] != '') {
         if ($pdf->getY() > $pdf->getPageHeight() - 75) {
             $pdf->rollbackTransaction(true);
             $pdf->AddPage();
             $pdf->setY(56);
             $r = 1;
         }
         $pdf->SetFont('helvetica', '', 10);
         //body font
         if ($r) {
             $pdf->Cell(20, 8, $k, 0, 0, 'C');
             ///print serial no
         } else {
             $pdf->Cell(20, 8, '', 0, 0, 'C');
             //no serial no
         }
         $part = new Part();
开发者ID:sknagesh,项目名称:divyaeng2,代码行数:31,代码来源:materialoutward.php

示例3: while

 $pdf->Cell(20, 8, "Qty", 0, 0, 'C');
 $pdf->Cell(30, 8, "Unit Price " . $currency, 0, 0, 'C');
 $pdf->Cell(30, 8, "Discount", 0, 0, 'C');
 $pdf->line(0, 110, 220, 110);
 //line after slno, desc and remarks
 $pdf->ln(6);
 $j = 0;
 while ($j < count($description)) {
     if ($description[$j] != '') {
         $pdf->ln(8);
         $pdf->Cell(10, 8, $j + 1, 0, 0, 'C');
         $pdf->MultiCell(95, 8, $description[$j], 0, 'L', 0, 0, '', '', true, 0, false, true, 8, 'M', true);
         $pdf->Cell(15, 8, $itemqty[$j], 0, 0, 'C');
         $pdf->Cell(30, 8, $price[$j], 0, 0, 'R');
         $pdf->MultiCell(30, 8, $discount[$j], 0, '', 0, 0, '', '', true, 0, false, true, 8, 'M', true);
         if ($pdf->getY() > $pdf->getPageHeight() - 56.5) {
             $pdf->rollbackTransaction(true);
             $pdf->AddPage();
             $pdf->setY(100);
         }
     }
     $j++;
 }
 if ($notes != '') {
     $pdf->ln(12);
     $pdf->MultiCell(195, 8, 'Note:' . $notes, 0, 'L', 0, 0, '', '', true, 0, false, true, 8, 'L', true);
 }
 $db = Database::getInstance();
 $cxn = $db->getConnection();
 if (isset($potermid)) {
     $potermid = array_values($potermid);
开发者ID:sknagesh,项目名称:divyaeng2,代码行数:31,代码来源:purchaseorder.php

示例4: date

        $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();
        $current_y3 = $pdf->GetY();
        $pdf->Cell(35);
        $pdf->Cell(30, $margin, $outbox->nama_jenis, 0, 0);
        $pdf->Cell(0, $margin, $outbox->first_name, 0, 0);
        $pdf->SetXY($current_x3, $current_y3);
        $pdf->MultiCell(35, $margin, $outbox->ptt, 0, 'L');
        $y3 = $pdf->getY();
        $pdf->SetXY($current_x2, $current_y2);
        $pdf->MultiCell(50, $margin, $outbox->tujuan, 0, 'L');
        $y2 = $pdf->getY();
        $pdf->SetXY($current_x1, $current_y1);
        $pdf->MultiCell(90, $margin, $outbox->perihal, 0, 'L');
        $y1 = $pdf->getY();
        $pdf->setY(max($y1, $y2, $y3));
        $pdf->CreateLine($pdf->GetY());
        if ($outbox == end($data_outbox)) {
            $pdf->CountJenis($i);
        }
    }
}
$nama_file = get_user_name() . '_' . date(now());
$pdf->Output($nama_file, 'I');
开发者ID:teddcm,项目名称:saask,代码行数:31,代码来源:fpdf-ekspedisi.php

示例5: PDF

<?php

// CREAR PDF
$pdf = new PDF('Landscape', 'mm', 'Letter', $header);
$pdf->AliasNbPages();
$pdf->AddPage();
$fs = 8;
$lh = 8;
$pdf->SetFont('Arial', '', $fs);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetDrawColor(0, 0, 0);
$pdf->Ln(2);
$y = $pdf->getY();
$x = $pdf->getX();
$pdf->Celda(256, 160, '', 1, 1, '', true);
$y2 = $pdf->getY();
$pdf->setY($y + 1);
$pdf->setX($x + 1);
$pdf->Celda(20, 5, 'Estado: ', 0, 0, '', true);
$pdf->Celda(100, 5, $pdf->capitalizar($header['estado']), 'B', 0, '', true);
$pdf->Celda(20, 5, 'Municipio: ', 0, 0, '', true);
$pdf->Celda(110, 5, $pdf->capitalizar($header['municipio']), 'B', 1, '', true);
$y = $pdf->getY();
$pdf->setY($y + 1);
$pdf->setX($x + 1);
$pdf->Celda(50, 5, 'Unidad de Trabajo o Dependencia: ', 0, 0, '', true);
$pdf->Celda(200, 5, $pdf->capitalizar($header['dependencia']), 'B', 1, '', true);
$yt = $pdf->getY();
$pdf->setX($yt + 1);
$pdf->setX($x + 1);
$lh2 = 5;
开发者ID:econesa,项目名称:sgbm_yii,代码行数:31,代码来源:pdf4.php

示例6: PDF

//
//
//$text = iconv("iso-8859-1", "iso-8859-2", $SUMNIKI);
//test Šumnikov
///koliko bomo pomaknili vse v desno//
$XOF = 26;
$LN_DEFAULT = 5;
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->Image('img/obrazec.jpg', 0, 0, 197, 297);
//$pdf->AddFont('luxisb','','luxisb.php');
$pdf->AddFont('Arial', '', 'Arial.php');
$pdf->SetFont('Arial', '', 8);
//Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
//NAziv in sedez
$pdf->SetXY($XOF + 35, 15);
$pdf->Cell(0, 0, "Root d.o.o., cesta v {$text} 10 3320 velenje", 0, 0, 'L');
//$pdf->MultiCell(65, 4,'sss', '', 'TL',0);
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 13, $pdf->getY());
//napisemo davcno//
$pdf->Cell(0, 0, spacer("123456789123", 4, 3), 0, 0, 'L');
//nova vrsta
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 30, $pdf->getY());
//gospodarska dejavnost//
$pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L');
//output of the PDF//
$pdf->Output("test.pdf", "I");
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:test.php

示例7: foreach

            $pdf->Cell(15, 4, 'X', 1, 0, '');
        } else {
            $pdf->Cell(15, 4, '', 1, 0, '');
        }
        $pdf->SetDrawColor(235, 235, 235);
        $pdf->Cell(25, 4, '', 1, 0, '');
        $pdf->SetDrawColor(0, 0, 0);
        $pdf->Cell(60, 4, $data['CODEACTIVITE'] . ' ' . $data['LibelleActivite'], 1, 1, '');
    }
}
$pdf->SetY($pdf->GetY() - $i * 4);
$pdf->SetX(130);
$Y = $pdf->GetY();
$pdf->Cell(20, 4 * $i, '', 1, 0, '');
$pdf->RotatedText(140, $Y + 2, $processus, -90);
$pdf->SetY($pdf->getY() + $i * 4);
$i = 0;
foreach ($rows as $data) {
    if ($data['CODEPROCESSUS'] == 'P2') {
        $processus = $data['LibelleProcessus'];
        $i = $i + 1;
        $pdf->SetX(30);
        $ref = false;
        foreach ($rowsRef as $data1) {
            if ($data['CODEACTIVITE'] == $data1['codeactivite'] and $data1['nbRef'] > 0) {
                $ref = true;
            }
        }
        if ($ref) {
            $pdf->Cell(15, 4, 'X', 1, 0, '');
        } else {
开发者ID:Shagril,项目名称:gestcomp,代码行数:31,代码来源:pdf.php

示例8: PDF

$s = "čšžčk";
//$s is a string from whatever source
//mb_detect_encoding($s, "UTF-8") == "UTF-8" ? : $s = utf8_encode($s);
//$s = iconv("UTF-8//TRANSLIT", "iso-8859-2", $s);
utf8_encode($s);
///koliko bomo pomaknili vse v desno//
$XOF = 26;
$LN_DEFAULT = 4;
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
//$pdf->AddFont('luxisb','','luxisb.php');
$pdf->AddFont('Arial', '', 'Arial.php');
$pdf->SetFont('Arial', '', 8);
//Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
//NAziv in sedez
$pdf->SetXY($XOF + 35, 29);
$pdf->Cell(0, 0, "Root d.o.o., cesta v {$s} 10 3320 velenje", 0, 0, 'L');
//$pdf->MultiCell(65, 4,'sss', '', 'TL',0);
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 22, $pdf->getY());
//napisemo davcno//
$pdf->Cell(0, 0, spacer("2005977500396", 4), 0, 0, 'L');
//nova vrsta
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 30, $pdf->getY());
//gospodarska dejavnost//
$pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L');
//output of the PDF//
$pdf->Output("test.pdf", "I");
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:test3.php

示例9: whereMaker

        }
    }
}
$filter = whereMaker($filter, 'requestor', $requestor_id);
$filter = whereMaker($filter, 'company_name', $company_name);
$filter = whereMaker($filter, 'supplier', $supplier_id);
$filter = whereMaker($filter, 'secretary', $secretary_id);
$SELECT_po = "select * from po_file" . $filter;
$head = array("Date", "Letter", "Mode of Payment", "Company Name", "Engineer", "Secretary", "PO#", "JO#", "Item Description", "Page#", "Pay to", "Total amount", "Particulars");
//,"RM /ANY Time of Text",
// "Time Replied to RM / ANY","Time CR text","Time Reply to CR",
//"Time forward to Boss","Time Approved by Boss"
$result = $conn->query($SELECT_po);
$width = array(32, 14, 30, 30, 25, 25, 14, 14, 40, 15, 25, 23, 45, 45);
$pdf->AddPage();
$y = $pdf->getY();
//echo "<br>".$pdf->getY();
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->setY($y + 22);
//	echo "<br>2".$pdf->getY();
$data2 = array();
$pdf->row($width, $head, 1, $data2, $data2);
while ($row = $result->fetch_assoc()) {
    if (empty($engineer[$row['engineer']])) {
        $engineer[$row['engineer']] = "";
    }
    if (empty($secretary[$row['secretary']])) {
        $secretary[$row['secretary']] = "";
开发者ID:sayniki,项目名称:finance_gsmsep,代码行数:31,代码来源:list_payments_fpdf.php


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