Update PDF.js to new version 8de5cf69580bc10cd3c24ea6a2edd86581493267 from 2026-11-15 10:59:02 UTC
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | affected |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: L1aYSD1iSAqhB7nwW10CBA])
Attachments
(1 obsolete file)
This update covers 10 commits, including 1 new upstream commit I've never filed a bug on before. (It's the top one.). Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/PdfJsVersion.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 95 +-
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 49 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 1994 +++++++--
toolkit/components/pdfjs/content/web/cmaps/Adobe-GB1-4.bcmap.br | 4 +-
toolkit/components/pdfjs/content/web/cmaps/CNS2-H.bcmap.br | 2 +-
toolkit/components/pdfjs/content/web/cmaps/H.bcmap.br | 4 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 8 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 8 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
11 files changed, 1552 insertions(+), 622 deletions(-)
Commits by author:
7 Calixte Denizet <calixte.denizet@gmail.com> (all unsigned)
2 calixteman <calixte.denizet@gmail.com> (1 signed but unverified, 1 unsigned)
1 Jonas Jenwald <jonas.jenwald@gmail.com> (unsigned)
9eea18756f377105daddaec92269dbf2b1f3f035 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/9eea18756f377105daddaec92269dbf2b1f3f035
Authored: 2026-11-14 22:58:01 +0100
Committed: 2026-11-14 23:17:00 +0100
Preserve blend modes across soft-mask changes
Track the blend mode in the graphics state; the soft-mask scratch
context uses source-over.
It fixes #22489.
Files Added:
- test/pdfs/issue22489.pdf
Files Modified:
- src/display/canvas.js
- test/pdfs/.gitignore
- test/test_manifest.json
0b230df276c8c598859c46653a76414220e7dc6e by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/0b230df276c8c598859c46653a76414220e7dc6e
Authored: 2026-11-04 19:41:50 +0100
Committed: 2026-11-14 21:14:58 +0100
[api-minor] Support form field flattening in saveDocument (bug 2075337)
With flatten: true, also draw the widgets, generating their appearances
from the stored values, and remove the ones hidden for the intent. Prune
the removed fields from the AcroForm, and remove it when no page widget
remains, unless it declares signatures. Add a "non-forms" value to keep the
form fields.
Files Modified:
- src/core/annotation.js
- src/core/document.js
- src/core/flattener.js
- src/core/worker.js
- src/display/api.js
- test/unit/api_flattening_spec.js
4bbb1840aae8e38864e4276739be4a23a5660f0b by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4bbb1840aae8e38864e4276739be4a23a5660f0b
Authored: 2026-10-01 16:28:50 +0200
Committed: 2026-11-14 20:27:15 +0100
[api-minor] Support annotation flattening in saveDocument (bug 2075337)
Add flatten and intent options to draw supported annotation appearances
into page content. Use print or display visibility. Keep the widgets and
the interactive annotations.
Android 14's PdfRenderer calls PDFium without FPDF_ANNOT [1].
Files Added:
- src/core/flattener.js
- test/unit/api_flattening_spec.js
Files Modified:
- src/core/annotation.js
- src/core/core_utils.js
- src/core/document.js
- src/core/editor/print_appearances.js
- src/core/worker.js
- src/core/writer.js
- src/display/api.js
- test/unit/api_spec.js
- test/unit/clitests.json
- test/unit/jasmine-boot.js
- test/unit/test_utils.js
dff205cf6f4964c1ce3cd4c2d2b80ed8275300cc by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/dff205cf6f4964c1ce3cd4c2d2b80ed8275300cc
Authored: 2026-11-14 15:47:07 +0100
Committed: 2026-11-14 20:05:18 +0100
[api-major] Compress the no-Wasm fallback JavaScript files with Brotli
This extends PR 22499 to apply to all PDF.js builds, and will help reduce the size of e.g. the pdfjs-dist package.
Unfortunately we cannot just re-use the MOZCENTRAL approach here, given that native Brotli support isn't generally available, and we'll instead fetch the no-Wasm JS files manually and decompress them on load in the worker-thread.
In e.g. Firefox (which supports native decompression) the files are decompressed in 1-2 milliseconds, which seems fast enough to not be an issue. Especially considering that they are first of all not loaded by default, and secondly only when Wasm is disabled.
Note: This reduces the size of the gulp generic bundle by 510669 bytes, i.e. over 498 kilo-bytes.
Files Modified:
- gulpfile.mjs
- src/core/evaluator.js
- src/core/wasm_loader.js
- test/unit/test_utils.js
- test/unit/wasm_loader_spec.js
effe259abcc9905e8b3803d167799e452a816f79 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/effe259abcc9905e8b3803d167799e452a816f79
Authored: 2026-11-13 22:27:27 +0100
Committed: 2026-11-14 17:10:10 +0100
Fix the text content of mirrored text (e.g. RTL text from Tesseract)
Tesseract draws the RTL words with a mirrored text matrix, hence the glyphs
are in logical order and drawn from right to left. So reverse them in order to
have them in visual order before running bidi(), and give the item a transform
starting at its left end to avoid having the span rotated in the text layer.
Some invisible format marks (e.g. LRM) can have a width, which mustn't be
ignored when computing the item position and width.
It fixes #16754 and #6509.
Files Added:
- test/pdfs/issue16754.pdf
Files Modified:
- src/core/evaluator.js
- test/pdfs/.gitignore
- test/unit/api_spec.js
571843eed82e67da0b91e8b909084ee742d87f1f by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/571843eed82e67da0b91e8b909084ee742d87f1f
Authored: 2026-11-13 22:19:30 +0100
Committed: 2026-11-14 16:51:52 +0100
Type the non-spacing marks outside of the Hebrew/Arabic blocks as NSM in bidi()
Such marks (e.g. U+034F or U+0300-U+036F) were typed as L, hence they were
creating their own LTR run in RTL text and the following marks were reordered.
It fixes #22433.
Files Modified:
- src/core/bidi.js
- test/unit/bidi_spec.js
7a99223b1e2947f8c261028986edcdc37399412c by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/7a99223b1e2947f8c261028986edcdc37399412c
Authored: 2026-11-14 15:04:44 +0100
Committed: 2026-11-14 15:06:38 +0100
Don't add link attributes to an XFA rich text link with an invalid URL
An invalid URL (e.g. javascript:) is replaced by an empty string in the worker,
and passing it to addLinkAttributes threw.
Files Modified:
- src/display/xfa_layer.js
- test/unit/xfa_tohtml_spec.js
4dfe24fc43232a9b808d301f60764688c5631eeb by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4dfe24fc43232a9b808d301f60764688c5631eeb
Authored: 2026-11-13 16:35:46 +0100
Committed: 2026-11-13 19:57:07 +0100
Keep together the chars of a glyph when reordering the text content
When a glyph maps to several chars (e.g. a lam-alef ligature), they're in
logical order but bidi() was reversing them with the rest of the RTL run.
So now bidi() gets the glyphs and reorders them as a whole when all their
chars have the same level. The normalization is done per glyph in order to
handle the presentation forms expanded into several chars.
It fixes #16880.
Files Added:
- test/pdfs/issue16880.pdf
Files Modified:
- src/core/bidi.js
- src/core/evaluator.js
- src/core/fonts.js
- test/pdfs/.gitignore
- test/unit/api_spec.js
- test/unit/bidi_spec.js
41d6710e5468a1028ec718ff80fcd05c63dd5ab4 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/41d6710e5468a1028ec718ff80fcd05c63dd5ab4
Authored: 2026-11-13 16:15:03 +0100
Committed: 2026-11-13 16:19:25 +0100
Enable the enableAndroidEditing option in the GeckoView integration tests
Since #22515, the annotation editor is disabled in GeckoView unless the enableAndroidEditing preference is set.
Files Modified:
- test/integration/geckoview_spec.mjs
235187ee21ce85d6ea98a116b98da3873389697d by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/235187ee21ce85d6ea98a116b98da3873389697d
Authored: 2026-11-12 22:44:25 +0100
Committed: 2026-11-13 09:37:48 +0100
Preserve stamp orientation and size when editing saved annotations
Use the annotation rotation when extracting its bitmap, and keep the
rotation-aware dimensions from AnnotationEditor.deserialize.
Files Modified:
- src/display/editor/stamp.js
- src/display/editor/tools.js
- test/integration/stamp_editor_spec.mjs
| Reporter | ||
Comment 2•20 days ago
|
||
| L1aYSD1iSAqhB7nwW10CBA | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=6fc40dc52fb260270e6f194f830751f8975e266c
| Reporter | ||
Comment 3•20 days ago
|
||
| Reporter | ||
Comment 4•20 days ago
|
||
| X4YQDLGdSyuEVoIB2IiBlg | ||
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
| Reporter | ||
Comment 5•20 days ago
|
||
| X4YQDLGdSyuEVoIB2IiBlg | ||
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).
Updated•20 days ago
|
Description
•