Details
-
Improvement
-
Resolution: Fixed
-
Major
-
14.9-rc-1
-
None
Description
ATM we're waiting indefinitely for the print preview web page to be ready for print before asking the browser to print it to PDF. The problem is that in same cases the page never gets ready:
- either because there's a bug in the JavaScript code that leads to an infinite loop (e.g. Paged.js can enter an infinite loop when paginating large tables, that overflow both the print page width and height, see
XWIKI-19555) - or because there's a JavaScript exception that prevents the page ready to be fired
It would be nice to be able to configure a "page ready timeout", after which the PDF export fails and the needed resources are released:
- browser tab (when using a remote headless Chrome)
- iframe (when using the users' browser)
This is important because if the JavaScript code enters an infinite loop, for instance, it will drain resources (CPU/memory) either from the server (when using a remote headless Chrome) or from the user's machine (when using the user's browser).