AddColumn()
(mPDF ≥ 2.2)
AddColumn – Start a new Column
Description
void AddColumn ( )
Start a new Column in the document. Columns must be set using SetColumns() or <columns>. Height justification for the Columns is disabled when column breaks are set explicitly.
Note: Columns are incompatible with (and automatically disable): borders for block-level elements (DIV, P etc), table rotation, and collapsible margins for blocks e.g. top and bottom margins for a DIV will not collapse (default) at the top/bottom of a column.
Parameters
No parameters
Examples
<?php
$mpdf = new \Mpdf\Mpdf();
$mPDF->SetColumns(2);
$mpdf->WriteHTML('Some text...');
$mpdf->AddColumn();
$mpdf->WriteHTML('Next column...');
$mpdf->Output();
See Also
- <columnbreak> - HTML equivalent to AddColumn()
- SetColumns() - Control the use of multiple columns on the page
- <columns> - Control the use of multiple columns on the page