This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-825fde10-cdde-473a-8ac0-b4479237ad17 XWIKI-24677 Open

The nodes from the PDF export Table of Contents tree that don't fit a single print page get truncated

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-51c2ac52-71dd-49ac-901d-55f60ddcba74 Marius Dumitru Florea created this issue on 10/Aug/26 19:24
 
Summary: The nodes from the PDF export Table of Contents tree that don't fit a single print page get truncated
Issue Type: cid:jira-generated-image-avatar-825fde10-cdde-473a-8ac0-b4479237ad17 Bug
Affects Versions: 17.10.9
Assignee: Unassigned
Components: Export - PDF
Created: 10/Aug/26 19:24
Priority: cid:jira-generated-image-static-major-270d2d25-4535-4a11-b93f-99696c70fa0b Major
Reporter: Marius Dumitru Florea
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...

 
 

2 updates

 
cid:jira-generated-image-avatar-51c2ac52-71dd-49ac-901d-55f60ddcba74 Changes by Marius Dumitru Florea on 10/Aug/26 19:29
 
Attachment: firefox.png
Attachment: chrome.png