How to create two columns and multiple page with dompdf

4,047 views
Skip to first unread message

Reky Susanto

unread,
Oct 19, 2015, 11:15:00 AM10/19/15
to dompdf
Excuse me, 
i want to create a report with dompdf for two columns and multi page, but i have a problem, 
if using table always error every column more then one page.
 Others i using element div and style with position :absolute, but i have problem at moment more then one page. where is text can't view in next page.
So help me what must i doing to resolve this problem? 

BrianS

unread,
Oct 19, 2015, 6:03:35 PM10/19/15
to dompdf
The ways you might typically do this in HTML, and the associated problems in dompdf:

1) Option: tables. Problem: dompdf is unable to split an individual table cell between pages [#98]. What this means is that all cells in the table must be able to be contained in a single page, otherwise dompdf will either crash trying to push the cell to a new page every time it renders or the cell will only be partially rendered when dompdf hits the recursion limit.

2) Option: absolute positioning. Problem: dompdf will display the content only on the page upon which it is positioned. The spec is a bit vague [1] [2] [3], although some browsers do appear to continue the content on the following page. It's likely something we'll consider options for this type of content in the future.

3) Option: floats. Problem: dompdf renders page elements serially. What this means practically is that the floated element must be fully rendered before the next element. If a page breaks is encountered then the following element will be rendered after the page break.

The only solution I can see at the moment (and it's not a great one) would be to render the two columns into separate documents and use something like FPDF to overlay one document on top of the other.
Reply all
Reply to author
Forward
0 new messages