本文整理汇总了PHP中MYPDF::getY方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::getY方法的具体用法?PHP MYPDF::getY怎么用?PHP MYPDF::getY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MYPDF
的用法示例。
在下文中一共展示了MYPDF::getY方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Footer
public function Footer()
{
$this->SetY(-15);
$this->SetFont('helvetica', 'I', 8);
$this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
$pdf = new MYPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(15, 10, 15);
$pdf->setPrintHeader(false);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
foreach (tampilData($stmt) as $grid) {
$pdf->SetFont('helvetica', 'B', 9);
$pdf->setXY(15, $pdf->getY(), true);
$pdf->Cell(0, 0, 'SLIP KOMISI SALES', 0, 2, 'C', 0, '', '');
$pdf->SetFont('helvetica', '', 7);
$pdf->setXY(15, $pdf->getY(), true);
$pdf->Cell(0, 0, 'PT. LUXINDO RAYA', 0, 2, 'C', 0, '', '');
$pdf->SetFont('helvetica', 'B', 7);
$pdf->setXY(15, $pdf->getY(), true);
$pdf->MultiCell(15, 7, "NIS", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'M');
$pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(100, 7, $grid['nis'], 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(18, 7, "Periode", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(45, 7, $begin . " s.d " . $end, 0, 'L', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->setXY(15, $pdf->getY() - 2, true);
$pdf->MultiCell(15, 7, "Nama", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'T');
$pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
示例2:
$pdf->MultiCell(20, 7, "Tgl SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "No Seri", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "Nama Produk", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, "Quantity", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, "NIS", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, "Nama Sales", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, "Nama Qustomer", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(25, 7, "Telp", 'TB', 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->SetFont('helvetica', '', 7);
$i = 1;
foreach (tampilData($stmt) as $grid) {
$pdf->setXY(15, 55 + 7 * ($i - 1));
if ($i % 2 == 0) {
$pdf->setFillColor(198, 200, 198);
} else {
$pdf->setFillColor(231, 232, 231);
}
$pdf->MultiCell(10, 7, $i, 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, $grid['no_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['tanggal_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['no_seri_produk'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['nama_produk'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, $grid['quantity'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['no_nis_sales'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, $grid['nama_sales'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, $grid['nama_customer'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(25, 7, $grid['telp_customer'], 0, 'C', true, 1, '', '', false, 0, false, false, '', 'M');
$i++;
}
$pdf->Line($pdf->getX() - 14.5, $pdf->getY() + 3, 280, $pdf->getY() + 3);
$pdf->Output('example_001.pdf', 'I');
示例3:
$pdf->SetTextColor(190);
$pdf->SetY(5);
$pdf->Write(10, 'Facture ' . $id_ventes . ' ', '', 0, 'R', true);
/*écriture "ACQUITTEE"
if ($donnees['paiement']==1){
$pdf->SetFont('times', '', 49);
$pdf->SetY(10);
$pdf->SetTextColor(250,0,0);
$pdf->Write(10, 'ACQUITTE','',0, 'R',true);
}
*/
$pdf->SetFont('times', '', 9);
$pdf->SetY(30);
$pdf->SetTextColor(0);
// set columns width
$first_column_width = 100;
$second_column_width = 60;
// get current vertical position
$current_y_position = $pdf->getY();
//trois colonnes
$pdf->writeHTMLCell($first_column_width, '', '', $current_y_position, $txt_nous, 1, 0, 0, true);
$pdf->writeHTMLCell($second_column_width, '', 133, '', $txt_eux, 1, 0, 0, true);
$pdf->writeHTMLCell($second_column_width, '', 133, 60, $txt_divers, 1, 1, 0, 'C', true);
$pdf->writeHTML($txt1);
// ---------------------------------------------------------
//Close and output PDF document
//$pdf->Output('C:\wamp\www\valocal\valocal\admin-sec\pdf\factures\facture_'.$id_ventes.'.pdf', 'F'); //F for saving output to file
$pdf->Output('/home/clients/fdd1a6019f1e8376cbae15369dc54de1/web/applis/admin-sec/pdf/recus/recu_' . $id_ventes . '.pdf', 'F');
//F for saving output to file
$pdf->Output('Facture-VALOCAL-' . $id_ventes . '.pdf', 'I');
}
示例4: max
} else {
if (isset($columns['from'])) {
$time_width += $pdf->GetStringWidth(strftime($timeformat, $row['time_in']));
} else {
$time_width += $pdf->GetStringWidth(strftime($timeformat, $row['time_out']));
}
}
$max_time_width = max($max_time_width, $time_width);
}
$max_time_width += 10;
$max_money_width += 10;
$widths = $pdf->columnWidths($max_time_width, $max_money_width);
$pdf->printRows($customer[$project_id], $widths);
if (isset($columns['wage']) && isset($columns['dec_time'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1] + $widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->timespan($pdf->timeSum), '', 0, 0, true, 'R');
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->money($pdf->moneySum), '', 0, 0, true, 'R');
} else {
if (isset($columns['wage'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->money($pdf->moneySum), '', 0, 0, true, 'R');
} else {
if (isset($columns['dec_time'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->timespan($pdf->timeSum), '', 0, 0, true, 'R');
}
}
示例5:
$pdf->SetFont('helvetica', '', 7);
$pdf->setXY(15, 40);
$pdf->Cell(0, 0, 'Periode ' . $begin . ' - ' . $end, 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', 'B', 7);
$pdf->setXY(15, 45);
$pdf->MultiCell(10, 7, "No", 'TB', 'C', false, 0, '', '', false, 0, false, false, 7, 'M');
$pdf->MultiCell(30, 7, "NIS", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(60, 7, "Nama Sales", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, "Jumlah SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "Komisi", 'TB', 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->SetFont('helvetica', '', 7);
$i = 1;
foreach (tampilData($stmt) as $grid) {
$pdf->setXY(15, 55 + 7 * ($i - 1));
if ($i % 2 == 0) {
$pdf->setFillColor(198, 200, 198);
} else {
$pdf->setFillColor(231, 232, 231);
}
$pdf->MultiCell(10, 7, $i, 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['nis'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(60, 7, $grid['nama'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['total_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, number_format($grid['komisi'], 2, ',', '.'), 0, 'C', true, 1, '', '', false, 0, false, false, '', 'M');
$i++;
}
$pdf->setXY($pdf->getX() - 14.5, $pdf->getY() + 3);
$pdf->SetFont('helvetica', 'B', 7);
$pdf->MultiCell(120, 7, 'TOTAL', 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, number_format($total['total'], 2, ',', '.'), 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->Output('Laporan_Komisi_Sales.pdf', 'I');