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