TCPDF: How make a pdf in Landscape, splitted in 2 parts and print a table in first row and go next 2nd?

637 Views Asked by At

Sorry for title not very clear.

I'm using TCPDF.

I need print a table in a PDF, landscape. If data are more than available space of first row, goes to second row.

An image of my expected result (dimensions are not real, but it gives the idea):

enter image description here

Data are from an array, in PHP (pseudocode)

array(
[0]=> 'name'=>'Alessandro','age'=>'30')

Thank you for your help

1

There are 1 best solutions below

0
On

you have to check how many columns fits in to one page; if the result is not more than one page you start a a4 page, if the result is more than to fit in a4 page, that you start creating a A3 landscape page.