New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: page breaking on rows with rowspan. #2090
base: master
Are you sure you want to change the base?
Conversation
- Don't break spanned rows/ - Don't break before row if page_break_before: avoid specified for <tr.>
@Ujifman I tested this and got the following pdf from #1388 The header is missed on the follwong pages. I guess this is known/intended to be able to render it. But it breaks later when having one more row on pdf page 4. |
@Ujifman To precise my testing and review of the code. Am I correct that your change delays the point a table with a spanned row breaks or should it completely fix the behavior? |
I don't know that this change is sufficient enough for the designated issue. It does make an attempt to keep rows with a spanning cell together, but Dompdf will still split a rowspanned cell across pages when the row it's on has already been paged. And since the real issue is that the row-spanned cell is lost from the table layout after the page break this doesn't really provide much relief. Let us know if you feel we're missing something. |
@bsweeney, sorry I wasn't clear enough. I didn't solve the problem fully. In my case I have small rowspans in pdf, i.e. rowspan is never greater than page length, so I check if page break came to spanned row, and go up to the span beggining to make a split. So as @simonberger saw in test, if rowspan is bigger then page, cells are lost. The only general solution is to copy spanned cell on every page break. So my solution is not full, but I think, it will be useful for those projects, who has spanned cells less then page length. |
I wasn't clear enough. I didn't solve the problem fully. In my case I have small rowspans in pdf, i.e. rowspan is never greater than page length, so I check if page break came to spanned row, and go up to the span beggining to make a split. So as @simonberger showed in test, if rowspan is bigger then page cells are still lost. The only general solution is to copy spanned cell on every page break. So my solution is not full, but I think, it will be useful for those projects, who has spanned cells less then page length. |
Thanks for the clarification. |
I would prefer to fix the actual bug. There shouldn't be the need to avoid breaks on rowspans aside of the current obvious problem. |
Thank you sir |
Let's push to the next release so we can better evaluate what to do with this. I don't want to implement something that we'll have to remember to roll back later even if it provides temporary relief. |
Do you have any update about this problem? |
Haven't looked into the second part, but the first change about |
<tr>
.