| Follow these steps to reproduce:
- Create a wiki page with this content:
Expected output: the Table of Contents of the generated PDF has a level one "Start" entry (node) with a lot of sub-entries (child nodes). The "Start" node (and it's children) doesn't fit a single print page, so the child nodes (entries) continue on the second ToC print page. All ToC entries are fully visible. Actual output:
- Firefox: the child entries continue on the next print page, but the last ToC entry on the first print page is truncated; no exception in the JavaScript console
- Chrome (both when using my own instance and in Docker): the child entries don't continue on the next print page; there is an exception in the JavaScript console, complaining that the "Start" node could not be layout ("Unable to layout item")
It looks like paged.js has trouble splitting a list item (e.g. a ToC entry with all its sub-entries) into multiple print pages:
- on Firefox it computes the content height incorrectly, truncating the last entry
- on Chrome it fails to split the entry at all
There is no problem if the ToC entry (along with all its sub-entries) fit in a single print page. Whether the heading text fits a single line or not doesn't seem to have any impact. The problem is just when the entry "content" (i.e. all its sub-entries) don't fit in a single print page. I doubt we can do much about this on our side... |