本文整理汇总了PHP中MYPDF::image方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::image方法的具体用法?PHP MYPDF::image怎么用?PHP MYPDF::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MYPDF
的用法示例。
在下文中一共展示了MYPDF::image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MYPDF
<?php
$pdf = new MYPDF();
//$pdf->setMargins(20,20,20);
$pdf->AliasNbPages();
$pdf->AddPage('L', 'A4');
$pdf->AddFont('PT_Serif-Web-Bold', '', 'PT_Serif-Web-Bold.php');
$pdf->SetFont('PT_Serif-Web-Bold', '', 32);
$pdf->image('./images/lippo.jpg', 25, 4, 50, 30);
$pdf->Text(290 / 2 - $pdf->GetStringWidth('Lumiere Club') / 2, 15, 'Lumiere Club');
$pdf->SetFont('PT_Serif-Web-Bold', '', 30);
$pdf->Text(290 / 2 - $pdf->GetStringWidth('Lippo Mall Kemang') / 2, 26, 'Lippo Mall Kemang');
$pdf->SetFont('Times', '', 12);
$pdf->Text(290 / 2 - $pdf->GetStringWidth('Jl. Pangeran Antasari 36 Jakarta Selatan - 12150') / 2, 33, 'Jl. Pangeran Antasari 36 Jakarta Selatan - 12150');
//$pdf->setDrawColor(105,102,102);
$pdf->Line(10, 36, 290 - 5, 36);
$pdf->SetFont('Arial', '', 22);
$pdf->Text(290 / 2 - $pdf->GetStringWidth('Report Data Upgrade Membership') / 2, 45, 'Report Data Upgrade Membership');
$awal = date('d F Y', strtotime($tgl1));
$akhir = date('d F Y', strtotime($tgl2));
$periode = "{$awal} to {$akhir}";
$pdf->SetFont('Arial', '', 14);
$pdf->Text(290 / 2 - $pdf->GetStringWidth($periode) / 2, 54, $periode);
//$pdf->Line(10, 10, 210-10, 10);
$pdf->SetXY(10, 60);
$pdf->SetFont('Helvetica', '', 12);
$content = UpgradeMembership::model()->with(array('member', 'user'))->findAll(array('condition' => 'upgrade_date BETWEEN :date1 AND :date2', 'params' => array(':date1' => $tgl1, ':date2' => $tgl2)));
if ($content == null) {
$pdf->SetFont('Helvetica', '', 48);
$pdf->Text(290 / 2 - $pdf->GetStringWidth("No Data Found") / 2, 84, "No Data Found");
$pdf->Output();