[stable29] chore(deps): Bump pdfjs-dist from 3.11.174 to 4.0.189 #1134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #1131
While the PDF.js version is usually not changed in maintenance releases it is the only way to fix read-only forms not being visible when the PDF file is showing read-only annotations (in the case of the PDF viewer this happens when the file itself is read only). This was fixed in PDF.js 4.0.189 (17066 in https://github.com/mozilla/pdf.js/pull, not linking directly to avoid polluting the pull request with backlinks), but PDF.js does not have a stable version with fixes and another one with new features, the versions are just increased and everything fixed or implemented go in the new version.
Note that the updated PDF.js version is no longer compatible with some older browsers that worked before due to now using the structuredClone API. Therefore, with this change the PDF viewer will require at least Firefox 94 and Chromium 98. However, those older browsers no longer compatible were not officially supported in Nextcloud 29 anyway (the Your browser is not supported screen lists Firefox 122 and Chrome 121 as the minimum versions).
Also note that even if the PDF viewer works with older browser versions like Firefox 94 and Chromium 98 not all the features of PDF.js may be available in them (for example, adding image annotations), although that was also the case with PDF.js 3.11.174 and the version bump does not change anything.
How to test
Result with this pull request
The form is visible
Result without this pull request
The form is not visible