Details
-
Bug
-
Resolution: Unresolved
-
Major
-
17.10.9
-
None
-
Integration
-
High
-
Easy
-
N/A
-
N/A
-
Description
Follow these steps to reproduce:
- Create a wiki page with this content:
= Start = == A == == B == == C == == D == == E == == F qwe rty uio pas dfg hjk lzx cvb nmq wer tyu iop asd fgh jkl zxc vbn mqw nbv cxz lkj hgf dsa poi uyt rew qmn 123 456 789 098 765 432 1 == == G == == H == == I == == J == == K == == L == == M == == N == == O == == P == == R == == S == == T == == U == == V == == W == == X == == Y == == Z == == a1 == == b2 == == c3 == == d4 == == e5 == == f6 == == g7 == == h8 == == i9 == == j10 == == k11 == == l12 == == m13 == == n14 == == o15 == == p16 == == r17 == == s18 == == t19 == == u20 == == v21 == == w22 == == x23 == == y24 == == z25 ==
- Export the page to PDF
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...
Attachments
Issue Links
- is duplicated by
-
XWIKI-24649 Text truncated in TOC of PDF
-
- Closed
-
-
XWIKI-24654 TOC truncated of PDF with chromium
-
- Closed
-