Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20263

Use a timeout when waiting for the web page to be ready for print

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 14.9
    • 14.9-rc-1
    • Export - PDF
    • None
    • Unknown

    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).

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: