This release contains improvements for the annotation editor, font conversion, performance, text selection and the viewer.
Changes since v5.1.91
Bump the stable version in pdfjs.config by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19741
Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19742
Isolate the "basic operations" freetext editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19743
Simplify singularValueDecompose2dScale in order to make it using less memory by @calixteman in https://github.com/mozilla/pdf.js/pull/19721
Optimize save-transform-constructPath-restore by @calixteman in https://github.com/mozilla/pdf.js/pull/19712
Reduce some code duplication when handling globally cached images by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19746
[api-minor] Move Type3-glyph compilation to the worker-thread by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19736
Remove few useless beginPaths by @calixteman in https://github.com/mozilla/pdf.js/pull/19732
Change Util.applyTransform to use the point-argument as an in/out parameter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19751
Simplify updateRectMinMax in order to use slightly less memory by @calixteman in https://github.com/mozilla/pdf.js/pull/19752
Also transfer ImageBitmaps for image masks and inline images by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19760
Bump library version to 5.2 by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19766
Attempt to get bundlers to leave Emscripten Compiler generated URLs alone (issue 19761) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19767
Pass the /Info-strings as a Map to the src/core/writer.js code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19768
Replace UpdateRectMinMax by getAxialAlignedBoundingBox by @calixteman in https://github.com/mozilla/pdf.js/pull/19763
Use ctx.filter unconditionally in the src/display/canvas.js file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19756
Initialize the isOffscreenCanvasSupported option, in the OperatorList class, once per document by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19758
Change how (most) fields are initialized in the CanvasExtraState class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19771
Avoid to create an array when setting the text matrix by @calixteman in https://github.com/mozilla/pdf.js/pull/19772
Remove Array.prototype.reduce usage from the unit-tests by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19776
Tweak the Node.js version listed in "engines", to ensure that process.getBuiltinModule is available by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19777
Use Array-destructuring when computing MIN/MAX in AFSimple_Calculate by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19775
Lint against export [some declaration] by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19786
[chrome] Fix text selection with .markedContent by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19785
Enable the no-array-reduce ESLint plugin rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19788
Move the IDENTITY_MATRIX constant into src/core/core_utils.js (PR 19772 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19781
Inline PDFImage.createRawMask in the PDFImage.createMask method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19773
[api-minor] Replace various getAll methods with iterators by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19778
Handle non-integer and out-of-range values correctly in Indexed color spaces by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19791
[Editor] Fix the border line of the thickness slider in the signature modal while in HCM (bug 1959774) by @calixteman in https://github.com/mozilla/pdf.js/pull/19799
[Editor] Commit the current drawing before switching the current mode by @calixteman in https://github.com/mozilla/pdf.js/pull/19797
Use adjustWidths unconditionally for all embedded fonts (issue 19802) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19804
Catch circular references in /Form XObjects (issue 19800) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19803
Simplify the getAnnotationStorage integration-test helper function by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19790
Simplify Object.fromEntries usage a tiny bit in the web/generic_signature_storage.js file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19789
Change PDFDocument.prototype._xfaStreams to return a Map by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19805
Add more logical assignment in the src/ folder by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19806
Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19807
Run the integration tests in a random order by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19809
Update Webpack to version 5.99.5 (issue 19808) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19810
Remove debug code from the integration tests, and skip the "must check that canvas perfectly fits the page whatever the zoom level" integration test in Chrome by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19812
Improve error handling when parsing page-structTrees by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19824
Avoid to create any subarrays when optimizing 'save, transform, constructPath, restore' (bug 1961107) by @calixteman in https://github.com/mozilla/pdf.js/pull/19825
Check that the Object.prototype hasn't been incorrectly extended (PR 11582 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19828
Replace the info icon in the undo bar by the right one (bug 1960523) by @calixteman in https://github.com/mozilla/pdf.js/pull/19829
Fix printing of XFA documents, by calling XfaLayerBuilder.prototype.render correctly (issue 19840) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19841
Always fallback to checking all destinations, when lookup fails (issue 19835) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19836
Remove duplicate secondaryToolbar button mask-image definitions (PR 18385 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19823
Add a "supportsPrinting" viewer-option (bug 1957401) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19816
Disable userActivation before executing a setTimeout/setInterval callback by @calixteman in https://github.com/mozilla/pdf.js/pull/19853
Use the light-dark CSS function in the viewer (issue 17780) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19819
Ensure that the /Form XObject /Resources-entry is actually a dictionary (issue 19848) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19849
Fix errors when running the integration tests by @calixteman in https://github.com/mozilla/pdf.js/pull/19854
Fix the debugger CSS when using the dark theme (PR 19819 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19861
Ensure that "local" /Contents stream-dict /Resources aren't empty (PR 19803 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19815
Fix 'print to pdf' on Mac with a cid font (bug 1961423) by @calixteman in https://github.com/mozilla/pdf.js/pull/19862
Fix beginner bugs link in README by @loganrosen in https://github.com/mozilla/pdf.js/pull/19814
Tweak the Node.js version listed in "engines", to ensure that process.getBuiltinModule is available by @luckymore in https://github.com/mozilla/pdf.js/pull/19858
Use the MathClamp helper function more in the web/ folder (PR 19617 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19868
Avoid (most) string parsing when removing/replacing the hash property of a URL by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19866
Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19869
Always render the Annotation- and XFA-layers with light color-scheme (issue 19871) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19874
Fix the "must work properly when selecting undo by keyboard" integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19873