Add visibility:-fs-table-paginate-repeated-visible for paginated tables.#32
Merged
danfickle merged 1 commit intodanfickle:open-dev-v1from Jul 15, 2016
Merged
Conversation
This allows to render some elements on the continuation of a repeated table header on a new page. E.g. a span containing the word "continued". For this to work the table must have -fs-table-paginate: paginate; set. Using visibility the element is always correctly layouted, but only painted after the table is broken into a new page.
Owner
Contributor
Author
|
This is an implementation limitation. The repeated-header row elements are only repositioned "as-is" and repainted on new pages. No kind of layout takes place on page breaks. So the only thing you can do is to paint or not paint something. Which this visibility style controls. Sorry, you need to move the [Continued] after the text. Everything else wont work. It might be possible to perform a layout of the table header row on every page break, but this will likely be very complex to implement. But feel free to try. |
|
Fair enough. I realized that placing it after would work well enough, and added some documentation for this in the Wiki. https://github.com/danfickle/openhtmltopdf/wiki/Page-features |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This allows to render some elements on the continuation of a repeated
table header on a new page. E.g. a span containing the word "continued".
For this to work the table must have -fs-table-paginate: paginate; set.
Using visibility the element is always correctly layouted, but only
painted after the table is broken into a new page.
@danfickle As with #31 feel free to suggest a better property name.
A customer of mine wants to have "(Continued)" in the table header if the table is broken across pages. This implements it.
I will update the testcase in #31 to use this feature if #31 is merged.
While implementing this I found out, that the table header elements are special handled in the BoxCollector. There is some "magic" which makes them repeat. So #19 might be just some wrong calculation in TableBox.updateHeaderFooterPosition(). I'll likely look into this in coming the next weeks.