本文整理汇总了PHP中MYPDF::setCellMargins方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::setCellMargins方法的具体用法?PHP MYPDF::setCellMargins怎么用?PHP MYPDF::setCellMargins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MYPDF
的用法示例。
在下文中一共展示了MYPDF::setCellMargins方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// dejavusans is a UTF-8 Unicode font, if you only need to
// print standard ASCII chars, you can use core fonts like
// helvetica or times to reduce file size.
// $pdf->SetFont('DejaVuSans', '', 8, '', true);
// $pdf->setLanguageArray($l);
// Add a page
// This method has several options, check the source code documentation for more information.
$pdf->AddPage();
// set text shadow effect
// $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// $pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 0, 1, 'C', 0, '', 1);
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(5, 3, 5, 3);
$pdf->SetFont('DejaVuSans', '', 9, '', true);
$html = '<table width="100%" border="0" style="padding:5px;">
<tr>
<td width="22%"><b>Belgelendirme Kuruluşu :</b></td>
<td width="78%">ABC Belgelendirme</td>
</tr>
<tr>
<td width="50%"><b>Liste Oluşturma Tarihi :</b> xx/xx/xxxx</td>
<td width="50%"><b>Talep ID :</b> YB0016/1</td>
</tr>
<tr>
<td width="50%"><b>Tavan Sınav Ücreti</b> (Max 300€) <b>:</b> MYK onayı ile belirlenecektir</td>
<td width="50%"><b>Euro Kuru </b>(' . $doviz['tarih'] . ') <b>:</b> MYK onayı ile belirlenecektir</td>
</tr>
</table><br>';
示例2:
// dejavusans is a UTF-8 Unicode font, if you only need to
// print standard ASCII chars, you can use core fonts like
// helvetica or times to reduce file size.
$pdf->SetFont('DejaVuSans', '', 14, '', true);
// $pdf->setLanguageArray($l);
// Add a page
// This method has several options, check the source code documentation for more information.
$pdf->AddPage();
// set text shadow effect
// $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// $pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 0, 1, 'C', 0, '', 1);
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(1, 1, 1, 1);
// İlk Sayfa Logo ve Yazı
// Set some content to print
$logo = <<<EOD
<img src="images/MYKlogo.jpg"/>
EOD;
$ilkSayfaUst = <<<EOD
<h4>BELGELENDİRME KURULUŞLARI İÇİN DENETİM FORMU</h4>
EOD;
// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
$pdf->writeHTMLCell(55, 30, '', '', $logo, 0, 0, 0, true, 'L', true);
$pdf->writeHTMLCell(0, 30, '', '', $ilkSayfaUst, 0, 1, 0, true, 'C', true);
$pdf->SetFont('DejaVuSans', '', 11, '', true);
$pdf->writeHTMLCell(0, 10, '', '', '<strong>Dosya No:</strong> YB-' . $seciliDenetim['YB_KODU'], 0, 1, 0, true, 'L', true);
// 1. Kısım
// $pdf->writeHTMLCell(0, 10, '', '', '<strong>1) Belgelendirme Kuruluşunun Adı-Tanımı</strong>', 0, 1, 0, true, 'L', true);
示例3:
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// ---------------------------------------------------------
// set font
$pdf->SetFont('freeserif', '', 18);
$pdf->Ln(5);
$txt = "Резултати от анкета:";
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// set font
$pdf->SetFont('freeserif', '', 16);
$txt = "\"" . $survey->getQuestion() . "\"";
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
$pdf->Ln(5);
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(0, 0, 0, 0);
// set font
$pdf->SetFont('freeserif', 'B', 14);
$txt = 'Отговори';
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// set color for background
$pdf->SetFillColor(225, 225, 225);
// set font
$pdf->SetFont('freeserif', '', 12);
// Multicell test
$txt = '№';
$pdf->MultiCell(10, '', $txt, 1, 'C', 1, 0, '', '', true);
$txt = 'Отговор';
$pdf->MultiCell(140, '', $txt, 1, 'C', 1, 0, '', '', true);
$txt = 'Тип';
$pdf->MultiCell(30, '', $txt, 1, 'C', 1, 1, '', '', true);