本文整理汇总了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');
}
示例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;
//==============================================================