4
On a budget screen, I display the products registered within a Foreach in a table (each product), so in some cases, at the time of printing the page the table is broken and ends up getting very ugly in printing. I tested the following in my CSS:
@media print {
table {
page-break-after: always;
}
}
But it breaks the page ALWAYS every time I have table but what I need is to break dynamically, only when there is a page break. I also tested with 'auto' instead of 'Always' and did not succeed.
How can I make the break only when the Table for break on print screen?
EDIT: I looked in several places and so far I could not solve the dynamic page break, IE, only break the page when the table comes broken.
A cruel doubt, why does 'auto' not work? Browser incompatibility? (Chrome V36)
Ever tried to use
auto
instead ofalways
? By the way, you just want me to change the page if the table entire does not fit in it, right? Instead of, say, breaking in the rows of the table instead (in which case thepage-break-after
would apply totr
instead of thetable
). P.S. Related question (in Soen)– mgibsonbr
@mgibsonbr tried to apply on tr and it didn’t work. I searched on Soen on the link you indicated and tried some possible solutions and I’m still at zero.
– RafaelMoura