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


PHP MYPDF::Text方法代码示例

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


在下文中一共展示了MYPDF::Text方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
开发者ID:nicovicz,项目名称:reward-point,代码行数:31,代码来源:_report.php

示例2: eval

         if ($csf[$ff]['value_filter'] != "") {
             eval($csf[$ff]['value_filter']);
         } else {
             if (file_exists($plugin)) {
                 include $plugin;
             }
         }
         $value = TidyList($value);
         $pdf->Cell($imagesize, ($refnumberfontsize + $leading) / 72, $value, 0, 2, 'L', 0, '', 1);
     }
     $bottomy = $pdf->GetY();
     $bottomx = $pdf->GetX();
 } else {
     if ($sheetstyle == "list") {
         $pdf->SetXY($currentx, $currenty);
         $pdf->Text($pdf->GetX() + $imagesize + 0.1, $pdf->GetY() + 0.2, $ref);
         $pdf->SetXY($currentx, $currenty);
         for ($ff = 0; $ff < count($config_sheetlist_fields); $ff++) {
             $value = "";
             $value = str_replace("'", "\\'", $result[$n]['field' . $config_sheetlist_fields[$ff]]);
             $plugin = "../../plugins/value_filter_" . $csf[$ff]['name'] . ".php";
             if ($csf[$ff]['value_filter'] != "") {
                 eval($csf[$ff]['value_filter']);
             } else {
                 if (file_exists($plugin)) {
                     include $plugin;
                 }
             }
             $value = TidyList($value);
             $pdf->Text($pdf->GetX() + $imagesize + 0.1, $pdf->GetY() + 0.2 * ($ff + 2), $value);
             $pdf->SetXY($currentx, $currenty);
开发者ID:vongalpha,项目名称:resourcespace,代码行数:31,代码来源:contactsheet.php

示例3: getimagesize

 $imagesize = getimagesize($imgpath);
 $whratio = $imagesize[0] / $imagesize[1];
 $hwratio = $imagesize[1] / $imagesize[0];
 if ($whratio < 1) {
     $imageheight = $height - 4;
     // vertical images can take up half the page
     $whratio = $imagesize[0] / $imagesize[1];
     $imagewidth = $imageheight * $whratio;
 }
 if ($whratio >= 1 || $imagewidth > $width + 1) {
     $imagewidth = $width - 1;
     // horizontal images are scaled to width - 1 in
     $hwratio = $imagesize[1] / $imagesize[0];
     $imageheight = $imagewidth * $hwratio;
 }
 $pdf->Text(0.5, 0.5, i18n_get_translated($resourcedata['field' . $view_title_field]) . ' ' . $date);
 $pdf->Image($imgpath, ($width - 1) / 2 - ($imagewidth - 1) / 2, 1, $imagewidth, $imageheight, "jpg", $baseurl . '/?r=' . $ref);
 // set color for background
 $pdf->SetFillColor(255, 255, 200);
 $style = array('width' => 0.01, 'cap' => 'butt', 'join' => 'round', 'dash' => '0', 'color' => array(100, 100, 100));
 $style1 = array('width' => 0.04, 'cap' => 'butt', 'join' => 'round', 'dash' => '0', 'color' => array(255, 255, 0));
 $style2 = array('width' => 0.02, 'cap' => 'butt', 'join' => 'round', 'dash' => '3', 'color' => array(255, 0, 0));
 $ypos = $imageheight + 1.5;
 $pdf->SetY($ypos);
 $m = 1;
 unset($notes);
 if ($resources[$n]['annotation_count'] != 0) {
     $notes = sql_query("select * from annotate_notes where ref='{$ref}'");
     foreach ($notes as $note) {
         $ratio = $imagewidth / $note['preview_width'];
         $note_y = $note['top_pos'] * $ratio;
开发者ID:chandradrupal,项目名称:resourcespace,代码行数:31,代码来源:general.php

示例4: Footer

		public function Footer() {
			if ($this->page != 1) {
	            // Position at 15 mm from bottom
	            $this->SetY(-15);
	            // Set font
	            $this->SetFont('times', '', 11);
	            // Page number
	          	$this->Cell(0, 0, $this->getAliasNumPage(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
	        }     
        }    
	}
	$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false, 'test');
	$pdf->setStoryTitle($title[0]['title']);
	$pdf->finished($finished[0]['date']);
	$pdf->setstoryWriters($writers);
	$pdf->setHeaderFont(array('times', '', 25));
	$pdf->setFooterData(array(0,64,0), array(0,64,128));
	$pdf->setMargins(10,30,10,30);
	$pdf->AddPage();
	$pdf->AddPage();
	$text = '';
	foreach($words as $word) {
		$text .= ' ' . $word['words'];
	}
	$pdf->Text(9,35,$text,0);
	$pdf->SetFont('courier');
	$pdf->setCellHeightRatio(3);
	// $pdf->MultiCell(0, 0, 0, 0, 'L', false, 1, 10, 30, true, 2, false, true, 0, 'T', true);
	$pdf->Output('GN_' . $title[0]['title'] . '.pdf', 'I');

?>
开发者ID:pesa0015,项目名称:greatnonsens,代码行数:31,代码来源:with_pdf.php


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