This release contains improvements for annotations, the annotation editor, font conversion, image decoding, performance and the viewer.
Changes since v5.2.133
- Bump the stable version in
pdfjs.config
by @timvandermeij in #19875 - Add useractivation check for response function by @1Jesper1 in #19855
- Add a basic
navigator
polyfill for older Node.js versions by @Snuffleupagus in #19876 - Fix the bbox when saving a rotated text field (bug 1963407) by @calixteman in #19881
- Assert that
numberToString
is called with a number (issue 19877) by @Snuffleupagus in #19880 - Don't update the visible canvas at 60 fps (bug 1936605) by @calixteman in #19856
- Allow to, optionally, keep Unicode escape sequences in
stringToPDFString
(PR 17331 follow-up) by @Snuffleupagus in #19884 - Fix arguments in
toStyle
call inCheckButton
by @gpanakkal in #19883 - Remove the
BasePdfManager.prototype.catalog
getter by @Snuffleupagus in #19888 - Simplify the
serializeXfaData
method and related code by @Snuffleupagus in #19887 - Simplify the
loadXfaImages
method and related code by @Snuffleupagus in #19885 - Slightly re-factor how we pre-load fonts and images in XFA documents by @Snuffleupagus in #19889
- Downscale jpeg2000 images, if needed, while decoding them by @calixteman in #19893
- Unify method return values in the
ObjectLoader
class, and simplify how theObjectLoader
is used by @Snuffleupagus in #19895 - Update the Firefox repository used in
external/importL10n/locales.mjs
by @Snuffleupagus in #19905 - Add a pref in order to cap the canvas area to a factor of the window one (bug 1958015) by @calixteman in #19755
- Shorten the code in the
src/core/document.js
file by @Snuffleupagus in #19902 - Shorten the
PDFDocument.prototype.fieldObjects
getter slightly by @Snuffleupagus in #19903 - Improve validation in the
Catalog.prototype.openAction
getter by @Snuffleupagus in #19913 - Decode appearance keys of checkboxes by @calixteman in #19911
- Reduce duplication when computing the maximum canvas pixels by @Snuffleupagus in #19915
- Preserve webpack/vite ignore comments when minifying by @nicolo-ribaudo in #19922
- Update qcms build by @calixteman in #19924
- [Editor] Keep aspect ratio when rescaling an image before being processed for a signature (bug 1962819) by @calixteman in #19925
- Run CI tests in Node.js version 24 by @Snuffleupagus in #19897
- Remove unused OpenJPEG wasm fallback logic by @nicolo-ribaudo in #19923
- Prefer the /Metadata, when available, in the document properties dialog (bug 1966086) by @Snuffleupagus in #19929
- Minify the js code when building for Firefox (bug 1965003) by @calixteman in #19934
- Allow using the
workerPort
option in Firefox by @Snuffleupagus in #19936 - Use the worker created in the child actor (bug 1966721) by @calixteman in #19935
- Bump undici from 6.21.1 to 6.21.3 by @dependabot in #19933
- Enable the
unicorn/prefer-import-meta-properties
ESLint plugin rule by @Snuffleupagus in #19916 - chore: remove redundant word in comment by @studystill in #19937
- Add a couple of new
eslint-plugin-unicorn
rules by @Snuffleupagus in #19917 - Replace
PDFWorker.fromPort
with a genericPDFWorker.create
method by @Snuffleupagus in #19943 - Update dependencies and translations to the most recent versions by @timvandermeij in #19942
- Ensure that the viewer clears the
workerPort
option when using "fake" workers by @Snuffleupagus in #19939 - Use private fields in the
PDFDataRangeTransport
class by @Snuffleupagus in #19944 - Remove Node.js-specific checks when using the Fetch API by @Snuffleupagus in #19945
- Fix intermittent failure in the stamp editor's undo-related integration tests by @timvandermeij in #19949
- Fix missing
await
for asynchronous method calls in the integration tests by @timvandermeij in #19950 - [api-minor] Create the css color to use with the canvas in the worker by @calixteman in #19953
- Support Type3 fonts with an incomplete /FontDescriptor dictionary (issue 19954) by @Snuffleupagus in #19955
- Fix pdfjsPreloadedWorker when it's undefined by @calixteman in #19959
- Remove all the useless subarrays when using qcms. by @calixteman in #19957
- Bump library version to
5.3
by @Snuffleupagus in #19960 - Don't create a useless subarray when getting image data from a flate stream by @calixteman in #19958
- Revert "Minify the js code when building for Firefox (bug 1965003)" by @calixteman in #19967
- Improve how the PDF.js version/commit information is exposed in the built files by @Snuffleupagus in #19956
- Show the op dispatched by constructPath in the debugger by @nicolo-ribaudo in #19961
- Ignore empty paths when optimizing
constructPath
operations (issue 19971) by @Snuffleupagus in #19972 - Replace semi-private fields/methods with actual private ones in
src/core/catalog.js
by @Snuffleupagus in #19964 - Move a few helper functions/classes out of the
src/display/api.js
file by @Snuffleupagus in #19962 - Fix the colors of disabled buttons in the dialogs by @calixteman in #19975
- [Editor] Change mode when double clicking on an editor by @calixteman in #19969
- Fix intermittent failure in the "supports specifying a custom origin" viewer integration test by @timvandermeij in #19952