Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1415

Use an ES5-compatible or legacy version of PDF.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.37
    • Fix Version/s: 2.4.58
    • Component/s: Preview
    • Environment:
      Firefox 68esr for instance
    • Release Notes Summary:
      PDF.js is upgraded to version 2.12.313 and is using the legacy ES5 compatible to make preview work with most(all) browsers.
    • Backlog priority:
      850
    • Sprint:
      UI - 2021-14, UI Cooldown - 2021-14

      Description

      Since 10.10-HF37 (see ELEMENTS-1248 ), some old browsers display:

       PDF.js v2.6.347 (identifiant de compilation : 3be9c65f0)
      
      Message: The browser/environment lacks native support for critical functionnality used by the PDF.js library (e.g. 'ReadableStream' and/or 'Promise.allSettled'); please use an ES5-compatible build instead)
      

      One can find in https://github.com/mozilla/pdf.js/issues/12490 that PDF.js releases have changed names and compliance expectations:

      From version 2.4.456 on we produce a non-translated/non-polyfilled build for modern browsers by default. However, we also provide the translated/polyfilled build for older browsers in a separate bundle (with the -es5-dist.zip suffix).

      Looking in https://github.com/mozilla/pdf.js/releases , one can find there exists distributions of PDF.js with names
      es5 distributions names in v2.6 and v2.7 of PDF.js
      legacy distributions names in v2.8 and v2.9 of PDF.js

      It is requested that the PDF.js library shipped with Nuxeo remains compatible with fossile browsers which were compatible prior to Nuxeo 10.10-HF37, thus it is requested that an ES5-compliant distribution of PDF.js be shipped with Nuxeo

      As ELEMENTS-1248 was also fixed in WebUI 3.0.2, the same concern applies to an LTS 2021 compliant version of WebUI.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours, 35 minutes
                  1d 4h 35m