當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mPDF::SetColumns方法代碼示例

本文整理匯總了PHP中mPDF::SetColumns方法的典型用法代碼示例。如果您正苦於以下問題:PHP mPDF::SetColumns方法的具體用法?PHP mPDF::SetColumns怎麽用?PHP mPDF::SetColumns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mPDF的用法示例。


在下文中一共展示了mPDF::SetColumns方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: date

 /**
  * Gerar PDF com colunas
  *
  * @param  String $html_data View que vai compor o PDF
  * @param  String $file_name Nome do arquivo
  */
 function create_pdf_col($html_data, $file_name = "")
 {
     if ($file_name == "") {
         $file_name = 'meu-pdf-' . date('d-m-Y');
     }
     require_once APPPATH . 'helpers/mpdf/mpdf.php';
     $hyphenate = new stdClass();
     $mypdf = new mPDF();
     $mypdf->SetDisplayMode('fullpage');
     $hyphenate->mypdf = true;
     $mypdf->KeepColumns = true;
     $mypdf->SetColumns(2, 'J', 5);
     $mypdf->WriteHTML($html_data);
     $mypdf->Output($file_name . '.pdf', 'D');
 }
開發者ID:smolareck,項目名稱:hmvcadmin,代碼行數:21,代碼來源:mpdf_helper.php

示例2: mPDF

require_once __DIR__ . '/../vendor/autoload.php';
$mpdf = new mPDF('', 'A4', '', '', 32, 25, 27, 25, 16, 13);
$mpdf->SetDirectionality('rtl');
$mpdf->mirrorMargins = true;
$mpdf->SetDisplayMode('fullpage', 'two');
$mpdf->autoLangToFont = true;
$mpdf->defaultPageNumStyle = 'arabic-indic';
$mpdf->setHeader($h);
$mpdf->setFooter($f);
$mpdf->debug = true;
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet, 1);
// The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->AddPage();
$mpdf->SetColumns(2, 'J');
$mpdf->WriteHTML($html);
$mpdf->SetColumns(0);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// INDEX
$html = '
<pagebreak type="next-odd" />
<h2>Index</h2>
<columns column-count="2" column-gap="5" />
<indexinsert usedivletters="on" links="on" collation="ar_SA.utf8" collation-group="Arabic_Saudi_Arabia" />
';
$mpdf->WriteHTML($html);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$mpdf->Output();
exit;
//==============================================================
開發者ID:CarlosAyala,項目名稱:midas-codeigniter-modulo-emergencias,代碼行數:31,代碼來源:example26_RTL.php


注:本文中的mPDF::SetColumns方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。