I am using Wicked PDF that uses Wkhtmltopdf 0.9.9.1 via wkhtmltopdf-binary gem. I have a table as described below (simplified)
<div id="listing">
<table>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
and style as described below (simplified)
<style>
#listing table tr td {
width:200mm !important
}
#listing {
width:210mm;
height:297mm;
page-break-inside:auto;
}
</style>
Since the there are 4 cells, each 200mm in width, the table should overflow to the right of the container (container's width is A4 standard width = 210 mm )
Why is it that the table never gets broken into 2 pages? I have followed some links related to it, but still get no good progress. Is it the case that Wkhtmltopdf does not support page break for horizontal overflowing? I really appreciate for some pointers.
ADDED INFO:
The whole thing simply shrinks to fit the table (auto-scaled). When I added rule "overflow:hidden", the table gets cut-off without being continued to the next page.
The intended behavior is :
- When the table overflows vertically, table gets continued on the next page.
- When the table overflows horizontally, table gets continued on the next page.
- When the table overflows in both direction, table gets continued on the next pages. Which one comes first (overflowed right side or bottom side) is not important, as long as both extra will come in the following pages.
If Wkhtmltopdf is not the correct tool for this, I would be glad to know some workaround (if any) or to know the best tool for this. Thank you.