Skip to content
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

#399 #416 Initial fix for header/footer showing on page without body rows #418

Open
wants to merge 6 commits into
base: open-dev-v1
Choose a base branch
from

Conversation

danfickle
Copy link
Owner

I also plan to add some commits to this PR with general table cleanup of code.

@VictorAtPL, if you get time, you could perhaps test this branch with your real world tables.

+ Remove unneeded casts.
+ Add override annotations.
+ Change anonymous class creation to lambda (manual).
Plus orphaned thead.

Also compiler fixes for ContentLimit/ContentLimitContainer.

Test based on the one provided by @jesselong. Thanks.
@danfickle
Copy link
Owner Author

The test I just committed for #202 still produces this:

issue-202-malformed-table

so clearly there is still more related problems in the table code.

@VictorAtPL
Copy link

Right now it works differently. It puts part of text on the previous page, and part of it on the next, even that I have:

div.parts table.part tr, div.parts table.part tr td {
    page-break-inside: avoid;
}

in the styles.
openhtmltopdf_result_after_authors_bugfix

Need more testing before we can merge this branch.
Specifically:
Cells with margin/border/padding.
Cells which go over two or more pages.
Partial revert of dce1cd5 to get paged table with cells with large padding/border rendering correctly.

Unfortunately, this means that the #202 test with explicitly allowing page breaks in thead now fails again.

Fortunately, very few users want a page break in their thead so this is low priority to fix.
@leedsalex
Copy link

@danfickle Hi, any update when this will be ready to be released? I'm hopeful it will fix the issues i'm experiencing.

@danfickle
Copy link
Owner Author

@VictorAtPL, it is not clear from your comment if this is a problem introduced in this pr or was already existing? If it was already existing I propose to merge this pr and do a release, then we can work more on table rendering in a different pr.

@leedsalex Very soon if this pr has not introduced any additional problems as above.

@VictorAtPL
Copy link

@danfickle
I will test it tomorrow and answer your question.

@VictorAtPL
Copy link

VictorAtPL commented Jan 26, 2020

@danfickle
I am not sure. Maybe one of the problem is fixed, but I still have some problems in my scenario/

v. 1.0.1:
First screenshot
image
Second screenshot
image

fix_399_empty_table_header_footer
First screenshot
image
Second screenshot
image

my dirty fix, from https://github.com/VictorAtPL/openhtmltopdf/tree/fix_thead_tfoot_without_content_bug
First screenshot
image
Second screenshot
image

Conclusions:
As you can see, there are still problems with whole header and footer being not rendered ("rectangle" near "Grafika" and arrow below "C"). Also, on your branch, "dsadsa" of second C is on the previous page, and image of the second C doesn't have margin. Also, the second C is not rendered on the dark-blue area for your fix.

@danfickle
Copy link
Owner Author

Hi @VictorAtPL,
I'm back finally. I had a play around but wasn't able to replicate. Are you able to share how the left blue arrow bar is achieved? At a guess it involves rowspan, transforms and a CSS arrow? Even better would be a sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants