Update PDF.js to new version 241dbabbf1c6a5024dc4e573356977878317e04f from 2026-05-30 09:39:22
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | affected |
People
(Reporter: update-bot, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: QEjZbteiSQq4xA9sQFPrPQ])
This update covers 7 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 1 +
toolkit/components/pdfjs/content/build/pdf.mjs | 64 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 592 +++++++++--
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 466 ++++----
toolkit/components/pdfjs/content/web/viewer.html | 2 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 739 ++++++++-----
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 1201 insertions(+), 671 deletions(-)
74db085794cd4d0dbd369e9628fbc0b86e1d4034 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/74db085794cd4d0dbd369e9628fbc0b86e1d4034
Authored: 2026-05-29 14:54:44 +0200
Committed: 2026-05-29 22:11:58 +0200
Re-factor how "internal" EventBus listeners are handled in the viewer
Currently the viewer uses semi-private EventBus.prototype.{_on, _off} methods, to try and ensure that all internal viewer state is updated before any "external" listeners are invoked.
For all use-cases outside of the viewer, e.g in the integration-tests, the EventBus.prototype.{on, off} methods are supposed to be used instead.
Unfortunately this isn't currently enforced in any way, except (hopefully) during review, and generally speaking it's not really possible to prevent the semi-private methods being used (e.g. by third-party users).
Hence this patch adds a new INTERNAL_EVT property which is not exposed anywhere (neither in the API nor globally), and whose value is generated at build-time, that the viewer uses to mark its EventBus listeners are internal.
This allows us to remove the semi-private EventBus methods, which helps to simplify that class a little bit.
Files Added:
- src/shared/internal_evt.js
- web/internal_evt.js
Files Modified:
- gulpfile.mjs
- src/display/editor/tools.js
- test/integration/reorganize_pages_spec.mjs
- web/alt_text_manager.js
- web/annotation_editor_params.js
- web/annotation_layer_builder.js
- web/app.js
- web/editor_undo_bar.js
- web/event_utils.js
- web/firefoxcom.js
- web/new_alt_text_manager.js
- web/pdf_attachment_viewer.js
- web/pdf_cursor_tools.js
- web/pdf_document_properties.js
- web/pdf_find_controller.js
- web/pdf_history.js
- web/pdf_layer_viewer.js
- web/pdf_link_service.js
- web/pdf_outline_viewer.js
- web/pdf_presentation_mode.js
- web/pdf_scripting_manager.js
- web/pdf_text_extractor.js
- web/pdf_thumbnail_viewer.js
- web/pdf_viewer.js
- web/secondary_toolbar.js
- web/signature_manager.js
- web/text_highlighter.js
- web/text_layer_builder.js
- web/toolbar.js
- web/views_manager.js
b9b7661e649de3abfecc7189999f439333c8cd96 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/b9b7661e649de3abfecc7189999f439333c8cd96
Authored: 2026-05-25 15:30:54 +0200
Committed: 2026-05-29 20:24:42 +0200
Upgrade Puppeteer to version 25.1.0
This is a major version bump, but the changelog at
https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v25.0.0
doesn't indicate any breaking changes that should impact us.
Moreover, this release contains the fix for the memory leak from
puppeteer/puppeteer#14876, so we can remove
the workaround related to that now.
Finally, we rename .puppeteerrc to .puppeteerrc.json because of
https://github.com/puppeteer/puppeteer/issues/15076, but in general it's
a good idea to be explicit about the file format via its extension, so
even if this upstream bug is fixed we don't need to revert this.
Files Modified:
- gulpfile.mjs
- package-lock.json
- package.json
Files Changed:
- R100 .puppeteerrc
8d5fe521b39baeaf589e460d6bc5f1a75704a157 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/8d5fe521b39baeaf589e460d6bc5f1a75704a157
Authored: 2026-05-29 19:16:17 +0200
Committed: 2026-05-29 19:24:31 +0200
Fix missing non-zero exit code for failure cases in test.mjs
The two affected code paths caught and logged errors, but that wasn't
reflected in the exit code of the process, and that is what GitHub
Actions (and other tools) to determine if process execution was
successful or not. This commit fixes the issue by making sure we
consistently exit with code 1 in case of errors so that GitHub Actions
pipelines correctly reflect the outcome of the test run.
Files Modified:
- test/test.mjs
fc6e19b9cb250461fe8a1ec84715e38444ee0729 by github-actions[bot] <github-actions[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/fc6e19b9cb250461fe8a1ec84715e38444ee0729
Authored: 2026-05-29 00:55:59 +0000
Committed: 2026-05-29 00:55:59 +0000
l10n: Update locale files
Files Modified:
- l10n/ar/viewer.ftl
- l10n/hy-AM/viewer.ftl
600986b51d41175d9640cd58e4a88cca94d547c6 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/600986b51d41175d9640cd58e4a88cca94d547c6
Authored: 2026-05-25 18:16:29 +0200
Committed: 2026-05-28 22:11:13 +0200
Allow inserting an image as a new page when editing a PDF
Image files dropped on or selected via the thumbnail viewer's
"add file" picker are now accepted alongside PDFs and inserted
as synthetic pages sized to the document's modal page dimensions.
The image-encoding helper previously embedded in StampAnnotation has
moved to src/core/editor/pdf_images.js so it can be shared between
stamp annotations and page synthesis.
Files Added:
- src/core/editor/pdf_images.js
Files Modified:
- src/core/annotation.js
- src/core/document.js
- src/core/editor/pdf_editor.js
- src/core/worker.js
- src/core/writer.js
- src/display/api.js
- test/integration/reorganize_pages_spec.mjs
- test/unit/api_spec.js
- test/unit/stream_spec.js
- web/pdf_thumbnail_viewer.js
- web/viewer.html
385b1ca4127edb1ee8f085f9c1ba5045ce1cd725 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/385b1ca4127edb1ee8f085f9c1ba5045ce1cd725
Authored: 2026-05-26 21:08:26 +0200
Committed: 2026-05-26 21:24:51 +0200
Clamp out-of-range BlueScale to Adobe's valid window
Fonts that ship a BlueScale outside the range AFDKO considers valid
for their zone heights (0.5/maxZoneHeight <= BlueScale <= 1/maxZoneHeight)
cause Firefox's CFF rasterizer to misalign overshooting glyphs against
flat-topped ones at body sizes.
Clamp into that window, only apply the lower clamp when BlueScale is
also smaller than the default, so foundry fonts that pair the default
0.039625 with small zones are untouched.
Fixes #9437.
Files Modified:
- src/core/cff_parser.js
- test/unit/cff_parser_spec.js
567f585defce102d9dd4aaded5635f358757bf14 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/567f585defce102d9dd4aaded5635f358757bf14
Authored: 2026-05-20 18:37:26 +0200
Committed: 2026-05-25 15:42:19 +0200
Add a pref-controlled method to notify embedders that mozPrintCallback has completed (bug 2036265)
Adds a postMessageAfterPrintCallback browser option (off by default).
When enabled by Firefox, the print service posts "ready" or "error" to
the window after each page's mozPrintCallback resolves, so embedders
(e.g. print-preview test harnesses) can observe when rendering is done.
Upstreams the viewer-side portion of Phabricator D297837.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Daniel Holbert <dholbert@cs.stanford.edu>
Files Modified:
- web/app_options.js
- web/firefox_print_service.js
| Reporter | ||
Comment 2•3 days ago
|
||
| QEjZbteiSQq4xA9sQFPrPQ | ||
Updatebot encountered an error while trying to submit to try.
Updatebot will be unable to do anything more for this library version.
| Reporter | ||
Comment 3•3 days ago
|
||
| XKSK6JdsROWQWpLqwIDbBA | ||
This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).
Description
•