There are 2 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-2f1faa69-c21e-4f2a-8e39-84ad47af745b XWIKI-23385 Closed

PDF export fails when a page has a lot of text.

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-916d8ebb-93bf-4dc9-ba2d-723f1ad79a98 Changes by Marius Dumitru Florea on 29/Aug/25 06:21
 
Resolution: Duplicate
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-916d8ebb-93bf-4dc9-ba2d-723f1ad79a98 Marius Dumitru Florea on 29/Aug/25 06:21
 

Closing as duplicate of XWIKI-20298, root cause being https://gitlab.coko.foundation/pagedjs/pagedjs/-/issues/363 (paged.js can break when BR tags create duplicate sibling text nodes).

 
cid:jira-generated-image-avatar-916d8ebb-93bf-4dc9-ba2d-723f1ad79a98 Marius Dumitru Florea on 29/Aug/25 06:22
 
[~Farcasut] the PDF export works fine with large text. Here's an example wiki page  [^Sandbox.LongText.xar] based on 183KB of text  [^long.txt] , more than in your example, which produces this PDF export  [^LongText.pdf] that has everything in it.

The example you provided is a bit special / *fabricated* because:

* it has a *single long* paragraph with many line breaks that produce a *ton of BRs* tags
* the same content is *repeated multiple times*

Unfortunately this kind of fabricated content is not handled well by paged.js, the library we use to split the content into print pages. It throws this exception:

{noformat}
Layout repeated at:  "amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et"
layout @ paged.polyfill.js?r=1:3097
{noformat}

This issue has been reported already as XWIKI-20298 , so I consider it to be a duplicate. I suppose you can't provide the original content, so you should check:

* why is your original content having so much BRs {*}BR{*}s , which is uncommon (even bad practice)
* why does your original content have big chunks of repeated /
* duplicated * sections, which again is uncommon