Closed Bug 2086086 Opened 26 days ago Closed 25 days ago

Update PDF.js to new version 2a1b2415ed2aeeb515222c9358d1b958dfd2af11 from 2026-10-27 12:32:39 UTC

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 2086332
Tracking Status
firefox161 --- affected

People

(Reporter: update-bot, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [3pl-filed][task_id: Rmv8b1CfS0uiw6nha05bEQ])

This update covers 37 commits. 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 | 670 +-
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 86 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 3845 +++++----
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 368 +-
toolkit/components/pdfjs/content/web/images/gv-editor-toolbar-close.svg | 3 +
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 398 +
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 55 +-
toolkit/components/pdfjs/content/web/viewer.css | 492 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 41 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
11 files changed, 3382 insertions(+), 2582 deletions(-)


7b0a38d2a2871a5709b0153bcd22f7d69d62651c by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/7b0a38d2a2871a5709b0153bcd22f7d69d62651c
Authored: 2026-10-27 11:39:22 +0100
Committed: 2026-10-27 11:59:01 +0100

Only set the Glyph.prototype.originalCharCode property when debugging

This property was added in PR 13494 specifically for the debugger, however it wasn't actually used anywhere else.
More recently PR 20334 started using that property in getTextContent, however it's not clear to me that doing so was necessarily correct. First of all, note that Glyph instances already contain an isSpace property. Secondly, and more importantly, using the "raw" charCode may be wrong in composite fonts with multi-byte strings.

Note how the isSpace property is determined in the PDF.js code:
https://github.com/mozilla/pdf.js/blob/8e62d2475645a9a625b3e98964fc241d3f9c144f/src/core/fonts.js#L3721-L3732
which is based on the following specification text:

Word spacing shall be applied to every occurrence of the single-byte character code 32 in a string when using
a simple font or a composite font that defines code 32 as a single-byte code. It shall not apply to occurrences of
the byte value 32 in multiple-byte codes.

Files Modified:

  • src/core/evaluator.js
  • src/core/fonts.js

17b85dbbdfcf063505cb99d3a7a78fdf52c8461f by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/17b85dbbdfcf063505cb99d3a7a78fdf52c8461f
Authored: 2026-10-26 22:20:10 +0100
Committed: 2026-10-26 22:23:55 +0100

Shorten the calculationOrderIds getter a little bit

Avoid using two separate return shadow(...) lines, and shorten a variable name.

Files Modified:

  • src/core/document.js

74a21cb814cace846833f50d4e2b78eac5f6db9d by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/74a21cb814cace846833f50d4e2b78eac5f6db9d
Authored: 2026-10-13 15:23:05 +0200
Committed: 2026-10-26 21:44:06 +0100

Disable editors for existing annotations in GeckoView (bug 2068989)

Disable annotation-to-editor conversion and double-click editing in
GeckoView. Keep page rendering out of editing mode so existing
annotations stay visible when adding signatures.

Files Modified:

  • src/display/annotation_layer.js
  • test/integration/geckoview_spec.mjs
  • web/annotation_layer_builder.js
  • web/pdf_page_view.js

43cdbf67c9f57769df6e8f0fcb5771ac59857ce1 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/43cdbf67c9f57769df6e8f0fcb5771ac59857ce1
Authored: 2026-10-13 15:23:04 +0200
Committed: 2026-10-26 21:44:06 +0100

Style signature editors in GeckoView (bug 2068989)

Share editor layout and resizer styles with the desktop viewer.
Add grey borders, square resizers and a close button, and include
the button when constraining editor positions.

Files Added:

  • web/annotation_editor_layer_builder-geckoview.css
  • web/annotation_editor_layer_common.css
  • web/images/gv-editor-toolbar-close.svg

Files Modified:

  • src/display/editor/editor.js
  • src/display/editor/tools.js
  • test/integration/geckoview_spec.mjs
  • web/annotation_editor_layer_builder.css
  • web/pdf_viewer.js
  • web/viewer-geckoview.css

5b7ad610180371e803078376260ce5f03cac416d by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/5b7ad610180371e803078376260ce5f03cac416d
Authored: 2026-10-24 22:05:24 +0200
Committed: 2026-10-26 21:04:39 +0100

Keep tiling patterns aligned on scaled fallback glyphs

Glyph width correction also scaled tiling patterns. Recompute text
patterns after scaling and cache them by horizontal scale within each
text run.

Files Added:

  • test/pdfs/pattern_text_non_embedded_font.pdf

Files Modified:

  • src/display/canvas.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

0843a8b3e2a7214da2bb483970de605d60939118 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/0843a8b3e2a7214da2bb483970de605d60939118
Authored: 2026-10-26 17:08:10 +0100
Committed: 2026-10-26 17:08:17 +0100

Wait for the link annotations to be injected in the autolinker integration tests

In the zoom test, wait for the re-rendered text and annotation layers instead.

Files Modified:

  • test/integration/autolinker_spec.mjs

e6f6a2876f81678bc6ab5cdb6e27bd9a7e939bd6 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/e6f6a2876f81678bc6ab5cdb6e27bd9a7e939bd6
Authored: 2026-10-26 14:20:11 +0100
Committed: 2026-10-26 14:32:17 +0100

Avoid more unused code in the built pdf.renderer.mjs file (PR 22101 follow-up)

Stub out the OutputScale.prototype.limitCanvas method, similar to the OutputScale.capPixels static method, since it's only used on the main-thread.

Move the SupportedImageMimeTypes definition to the src/display/dom_utils.js file, since it's only used on the main-thread.

Files Modified:

  • src/display/display_utils.js
  • src/display/dom_utils.js
  • src/display/editor/stamp.js
  • src/pdf.js
  • test/unit/pdf_spec.js

b562f1187e32e0f1ad6c00b3502dd442e10a7dba by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/b562f1187e32e0f1ad6c00b3502dd442e10a7dba
Authored: 2026-10-22 11:35:45 +0200
Committed: 2026-10-26 13:18:24 +0100

Use the Util.pointBoundingBox helper in the meshUpdateBounds function

Files Modified:

  • src/core/pattern.js

77d2a13d5a09b368cb832a3194687cf0fc4f10c5 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/77d2a13d5a09b368cb832a3194687cf0fc4f10c5
Authored: 2026-10-26 12:28:58 +0100
Committed: 2026-10-26 12:40:11 +0100

Skip more unnecessary parsing when parsing inferred links (PR 22327 follow-up)

Avoid even more parsing when re-rendering the page, with the annotationLayer kept, by not invoking the PDFPageView.prototype.#injectLinkAnnotations method if inferred links were previously injected.

Also, avoid duplicated length checks in the AnnotationLayerBuilder.prototype.injectLinkAnnotations method for pages that contain no "actual" annotations.

Files Modified:

  • web/annotation_layer_builder.js
  • web/pdf_page_view.js

d313e35c9fb7b88ccb3cfefc60346341024d8e2b by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/d313e35c9fb7b88ccb3cfefc60346341024d8e2b
Authored: 2026-10-24 17:20:44 +0200
Committed: 2026-10-25 21:19:18 +0100

Rotate fallback glyphs in non-embedded vertical fonts

Rotate selected glyphs without encoded vertical forms, preserving vertical
origin offsets and centering their ink across the column.

For built-in CMaps with a horizontal base, substitute vertical forms only
when the CID changes.

It fixes #18384.

Files Added:

  • test/pdfs/issue18384.pdf.link
  • test/pdfs/vertical_rotated_fallback_glyphs.pdf

Files Modified:

  • src/core/evaluator.js
  • src/core/fonts.js
  • src/core/fonts_utils.js
  • src/display/canvas.js
  • src/shared/util.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/fonts_spec.js

e9da2dba3c07a70ae6d2ccd67c1b4d5933d96c87 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/e9da2dba3c07a70ae6d2ccd67c1b4d5933d96c87
Authored: 2026-10-25 15:43:50 +0100
Committed: 2026-10-25 15:55:25 +0100

Add a PDFDocument helper method for creating a Page instance

Rather than duplicating essentially the same code twice, we can add a helper method instead.
This also fixes a bug in the existing code, since the new Page(...) invocation in the checkLastPage method previously accessed a non-existent this.globalColorSpaceCache field.

Files Modified:

  • src/core/document.js

2c36ea08e214d4ca5584288c1499a78167e05332 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/2c36ea08e214d4ca5584288c1499a78167e05332
Authored: 2026-10-17 15:13:59 +0200
Committed: 2026-10-25 15:34:06 +0100

[JS] Use private class members in the scripting Field object

Replace the Proxy wrapping the fields with private fields and methods,
which simplifies the code: the obj/wrapped pairs, the Proxy handler and
the PDFObject base class are gone. The doc and the event dispatcher use
helpers defined in a static block for the few field internals they need.

The fields share a prototype with the methods and accessors of Field,
instead of getting bound methods from the Proxy. As in Acrobat, a field
method can't be called without its field as this, nor be overwritten.

Files Deleted:

  • src/scripting_api/pdf_object.js
  • src/scripting_api/proxy.js

Files Modified:

  • src/scripting_api/doc.js
  • src/scripting_api/event.js
  • src/scripting_api/field.js
  • src/scripting_api/initialization.js
  • test/unit/scripting_spec.js

5ac4b7379da83f006d772ce93b056982047547c4 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/5ac4b7379da83f006d772ce93b056982047547c4
Authored: 2026-10-17 15:13:57 +0200
Committed: 2026-10-25 15:34:06 +0100

[JS] Update the view from the field setters instead of the Proxy

The Proxy wrapping the fields no longer sends every assigned property to
the view nor copies it to the descendant fields. Instead, the setters of
the properties used by the view update the widgets and the descendants,
and the built-in properties of a non-terminal field are accessors
forwarding their value to the descendants.

Hence, as in Acrobat, a custom property stays on the field it's set on,
and nothing is sent for a rejected radio button value or a property
unknown to the view. The event dispatcher and the doc set values without
sending them, and the messages no longer contain a null siblings.

Files Modified:

  • src/scripting_api/app_utils.js
  • src/scripting_api/doc.js
  • src/scripting_api/event.js
  • src/scripting_api/field.js
  • src/scripting_api/proxy.js
  • test/unit/scripting_spec.js

40fc136451fa090c9affec74e718129825622589 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/40fc136451fa090c9affec74e718129825622589
Authored: 2026-10-17 15:13:55 +0200
Committed: 2026-10-25 15:34:06 +0100

[JS] Merge the radio button and checkbox fields into Field

A radio button or checkbox field tracks the export value, actions and
page of each of its widgets, instead of being a RadioButtonField or
CheckboxField instance. It prepares for private class members in Field,
which subclasses can't share.

Setting a null or undefined value now always clears a radio button, even
when one of its widgets has no export value.

Files Modified:

  • src/scripting_api/field.js
  • src/scripting_api/initialization.js

6c87279d8bf85e10d0e7f5b749466393030193e2 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/6c87279d8bf85e10d0e7f5b749466393030193e2
Authored: 2026-10-17 15:13:53 +0200
Committed: 2026-10-25 15:34:06 +0100

[JS] Use private class members in the scripting Doc object

The Doc object uses private class members. initSandbox and the event
dispatcher reach the few methods they need through helpers defined in a
static block, and a field gets callbacks, instead of the Doc instance,
to get its terminal children and to report errors.

The doc.info target has a null prototype, so that an info key such as
constructor doesn't give an Object.prototype member.

Files Modified:

  • src/scripting_api/doc.js
  • src/scripting_api/event.js
  • src/scripting_api/field.js
  • src/scripting_api/initialization.js
  • test/unit/scripting_spec.js

8905bbe959337611d8bf766eaec5161c1b0b25fd by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/8905bbe959337611d8bf766eaec5161c1b0b25fd
Authored: 2026-10-17 15:13:50 +0200
Committed: 2026-10-25 15:34:06 +0100

[JS] Use private class members in the scripting App object

The app object is no longer wrapped in a Proxy: it uses private class
members and, like the helper objects, looks like a plain object with
bound methods. initSandbox calls the timer callback through a helper
defined in a static block.

The timers use the Map, WeakMap and FinalizationRegistry methods
captured before any script runs, so that a script can't redefine them
to get the timer internals, e.g. to forge the data of a timeout handle
and cancel the user activation expiry.

Files Modified:

  • src/scripting_api/app.js
  • src/scripting_api/app_utils.js
  • src/scripting_api/initialization.js
  • test/unit/scripting_spec.js

4bd7ad051833912fabc4aa40fdaccca31a2cb39b by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/4bd7ad051833912fabc4aa40fdaccca31a2cb39b
Authored: 2026-10-17 15:13:48 +0200
Committed: 2026-10-25 15:09:47 +0100

[JS] Use private class members in the scripting event dispatcher

The event dispatcher uses private class members, and the events are
plain objects tagged as Event instead of Event class instances, so
that, as for the other scripting objects, event.constructor is
Object rather than an implementation class.

Files Modified:

  • src/scripting_api/event.js
  • test/unit/scripting_spec.js

3a4b1936ee421b81b00040e292b1b67370b73d2f by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/3a4b1936ee421b81b00040e292b1b67370b73d2f
Authored: 2026-10-17 15:13:46 +0200
Committed: 2026-10-25 15:09:47 +0100

[JS] Create the scripting event dispatcher in initSandbox

The event dispatcher and the map from widget ids to fields are created
in initSandbox instead of the App constructor, and the user activation
state is shared by the app, the doc and the event dispatcher, so that
they don't access each other's internals anymore.

The doc seen by the scripts (field.doc, app.activeDocs, and the source
and target of the doc and page events) is now the global object, which
already has the doc properties, instead of a Proxy on the Doc instance.

Files Modified:

  • src/scripting_api/app.js
  • src/scripting_api/doc.js
  • src/scripting_api/event.js
  • src/scripting_api/field.js
  • src/scripting_api/initialization.js
  • test/unit/scripting_spec.js

75625ee279f6c46778fa83431785cdec7b52bd1b by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/75625ee279f6c46778fa83431785cdec7b52bd1b
Authored: 2026-10-17 15:13:43 +0200
Committed: 2026-10-25 15:09:27 +0100

[JS] Use private class members in the scripting helper objects

The color, console, util, app.fs and app.thermometer objects are no
longer wrapped in a Proxy: they use private class members and, like the
print params, they look like plain objects whose prototype has the
methods, bound to them, and the accessors of their class. The AForm
helpers use private members too.

app.fs, app.thermometer and the print params are created with their
owner instead of on first use, and Function.prototype.toString shows the
API functions as native ones.

Files Modified:

  • src/scripting_api/aform.js
  • src/scripting_api/app.js
  • src/scripting_api/app_utils.js
  • src/scripting_api/color.js
  • src/scripting_api/console.js
  • src/scripting_api/doc.js
  • src/scripting_api/fullscreen.js
  • src/scripting_api/initialization.js
  • src/scripting_api/thermometer.js
  • src/scripting_api/util.js
  • test/unit/scripting_spec.js

414eb834182177ab77e135db9d64fbda24512336 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/414eb834182177ab77e135db9d64fbda24512336
Authored: 2026-10-25 14:40:46 +0100
Committed: 2026-10-25 14:40:46 +0100

Use Python 3.15 in the GitHub workflows

This version was released on October 9th [1] and is now available in
GitHub Action runner images [2]. To use it we also update fonttools,
that in version 4.66.0 declared official support for Python 3.15 [3], to
the most recent version.

[1] https://docs.python.org/3/whatsnew/3.15.html
[2] https://github.com/actions/python-versions/releases/tag/3.15.0-38076878863
[3] https://github.com/fonttools/fonttools/releases/tag/4.66.0

Files Modified:

  • .github/font_tests_requirements.txt
  • .github/workflows/fluent_linter.yml
  • .github/workflows/font_tests.yml

003311751a5a5ae8810b6ea15c57e83fd043c51b by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/003311751a5a5ae8810b6ea15c57e83fd043c51b
Authored: 2026-10-22 19:26:24 +0200
Committed: 2026-10-24 22:04:52 +0200

[Editor] End ink curves at the last accepted point

Append a final Bézier segment ending at the last accepted point.
Do the same when rebuilding curves from annotation points.

Files Modified:

  • src/display/editor/drawers/inkdraw.js
  • test/unit/editor_spec.js

8cf2aacb2987bac253aeaf54dda00dc149b3410c by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/8cf2aacb2987bac253aeaf54dda00dc149b3410c
Authored: 2026-10-24 20:17:49 +0200
Committed: 2026-10-24 20:17:49 +0200

Fix vulnerabilities in dependency versions

This patch is generated automatically using npm audit fix, and brings
the number of reported vulnerabilities to zero.

Files Modified:

  • package-lock.json

a6a4d03beecdef1af6248188d74545cfaffd6d8e by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/a6a4d03beecdef1af6248188d74545cfaffd6d8e
Authored: 2026-10-24 20:04:36 +0200
Committed: 2026-10-24 20:17:28 +0200

Update dependencies to the most recent versions

Files Modified:

  • gulpfile.mjs
  • package-lock.json
  • package.json
  • test/benchmarks/vitest.config.mjs

f913cc0141d5a04c135c69e95740562c6c363da1 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/f913cc0141d5a04c135c69e95740562c6c363da1
Authored: 2026-10-24 18:50:45 +0200
Committed: 2026-10-24 18:50:45 +0200

Update getTextContent to use getReader instead

Given that PR 22276 just replaced a for await loop, since a while loop over getReader invocations is apparently faster, let's do the same thing in the getTextContent method.

Files Modified:

  • src/display/api.js

aa6ebe3b7d766bc5b037fae5add97aae4204bb98 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/aa6ebe3b7d766bc5b037fae5add97aae4204bb98
Authored: 2026-10-18 18:33:47 +0200
Committed: 2026-10-24 18:44:54 +0200

Upgrade Vitest to version 5

We only use Vitest for benchmarking, and in this major version the
benchmarking API got rewritten [1] which requires changes on our end.
This means that bench is no longer a top-level import, that under
water created a test on its own, but it's now a fixture inside regular
test() scopes.

For us this would mean quite a bit of additional boilerplate because
we'd have to wrap every existing benchmark into a separate test()
scope [2]. To keep the individual benchmarks small and expressive this
commit introduces a helper wrapper function that takes care of this,
basically mirroring the behavior of Vitest 4.

[1] https://vitest.dev/blog/vitest-5#benchmarking-rewrite
[2] https://vitest.dev/guide/migration/#benchmarking-api-rewrite

Files Modified:

  • package-lock.json
  • package.json
  • test/benchmarks/api.bench.js
  • test/benchmarks/autolinker.bench.js
  • test/benchmarks/bench_utils.js
  • test/benchmarks/core.bench.js
  • test/benchmarks/crypto.bench.js
  • test/benchmarks/editor.bench.js
  • test/benchmarks/evaluator.bench.js
  • test/benchmarks/fonts.bench.js
  • test/benchmarks/functions.bench.js
  • test/benchmarks/images.bench.js
  • test/benchmarks/parser.bench.js
  • test/benchmarks/render.bench.js
  • test/benchmarks/streams.bench.js
  • test/benchmarks/wasm.bench.js
  • test/benchmarks/xml.bench.js

860ba837909b12bcdc9e6f80d49e4fef2303f20e by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/860ba837909b12bcdc9e6f80d49e4fef2303f20e
Authored: 2026-10-18 19:50:43 +0200
Committed: 2026-10-24 17:27:37 +0200

Apply annotation changes when extracting pages

Skip deleted annotations and popups. Update edited annotations in place.

Files Modified:

  • src/core/editor/pdf_editor.js
  • test/unit/api_spec.js

0e3a0002bd7b0e27bfcd67a0af801a11106c6dd0 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/0e3a0002bd7b0e27bfcd67a0af801a11106c6dd0
Authored: 2026-10-04 15:59:32 +0200
Committed: 2026-10-24 16:49:45 +0200

Introduce more find bar integration tests

This commit brings code coverage for the web/pdf_find_bar.js file to
100% by covering all missing cases, which include:

  • searching with no results;
  • searching with multiple results;
  • highlighting all search results using keyboard navigation;
  • closing the find bar via the toolbar button and the Escape key.

Files Modified:

  • test/integration/find_spec.mjs
  • test/integration/test_utils.mjs

45e5783c2159351afc32b6485fada07d5db8e7f5 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/45e5783c2159351afc32b6485fada07d5db8e7f5
Authored: 2026-10-04 15:37:45 +0200
Committed: 2026-10-24 16:49:45 +0200

Reword the names of the find bar integration tests

This makes the test names more consistent to improve clarity on what the
tests aim to check, and avoids using duplicate test names to make
discovery of e.g. failed tests easier in the logs.

Files Modified:

  • test/integration/find_spec.mjs

6019d28a40bba9b2f55ba4a60c24fca1b5419baa by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/6019d28a40bba9b2f55ba4a60c24fca1b5419baa
Authored: 2026-10-04 14:47:32 +0200
Committed: 2026-10-24 16:49:34 +0200

Extract the search logic to a helper function in the find bar integration tests

This refactoring makes the existing tests more compact/expressive, and
makes it easier to add more find bar tests in a next commit without
having to duplicate this logic more often.

Files Modified:

  • test/integration/find_spec.mjs

16185b478a66102281557c7a8a2b311e48c72721 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/16185b478a66102281557c7a8a2b311e48c72721
Authored: 2026-10-24 14:44:30 +0200
Committed: 2026-10-24 15:48:22 +0200

Remove extra operands from CFF stack-clearing operators

The fonts in issue10175 repeat width operands before later rmoveto
operators. FreeType ignores them, but OTS rejects the fonts.

Remove extra literal operands from glyph charstrings. Preserve shared
subroutines, where the same operand may be a valid width in another glyph.

Fixes #10175.

Files Added:

  • test/pdfs/issue10175.pdf

Files Modified:

  • src/core/cff_parser.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/cff_parser_spec.js

fd42c3960fdc8462bd3bee797fc526c1613e4f50 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/fd42c3960fdc8462bd3bee797fc526c1613e4f50
Authored: 2026-10-24 14:13:29 +0200
Committed: 2026-10-24 14:20:22 +0200

Avoid re-parsing inferred links when rotating/zooming the document

Given that an AnnotationLayerBuilder instance can only have inferred links inserted once, and that we normally keep the annotationLayer when rotating/zooming the document, avoid unnecessarily invoking Autolinker.processLinks when its result will be ignored.

Files Modified:

  • web/annotation_layer_builder.js
  • web/pdf_page_view.js

2cacfdbf8a07fb0e75342bd5b47d3f037b886eea by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/2cacfdbf8a07fb0e75342bd5b47d3f037b886eea
Authored: 2026-10-23 19:11:22 +0200
Committed: 2026-10-24 14:08:16 +0200

Reuse shared CFF Private DICTs and Subrs

Reject fonts when accumulated private data exceeds the font length.

Files Modified:

  • src/core/cff_parser.js
  • test/unit/cff_parser_spec.js

29825499478c4f8cfa01b6fa6636c1e4d8b5b6b7 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/29825499478c4f8cfa01b6fa6636c1e4d8b5b6b7
Authored: 2026-10-23 22:31:31 +0200
Committed: 2026-10-24 13:54:02 +0200

Render glyph 0 in full CFF fonts

With 65535 glyphs, CFF cannot append a copy of glyph 0. The old mapping
used the last glyph instead.

Reuse an empty slot and copy glyph 0's outline, width and FDSelect entry.
Keep the replaced glyph's original characters unmapped.

It fixes #5377.

Files Added:

  • test/pdfs/issue5377.pdf

Files Modified:

  • src/core/cff_font.js
  • src/core/cff_parser.js
  • src/core/fonts.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/cff_parser_spec.js

842fc67ab614ae1e9d618d0b5060c3d674e4a121 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/842fc67ab614ae1e9d618d0b5060c3d674e4a121
Authored: 2026-10-24 12:20:23 +0200
Committed: 2026-10-24 12:55:48 +0200

Skip unnecessary parsing in Autolinker.processLinks

If there is no text content on the page there's nothing to parse and we can return immediately. This can happen e.g. if the page is completely empty, or if it only contains images and/or path rendering operators.

Furthermore, if there are no inferred links found we can also avoid a pointless TextHighlighter.prototype._convertMatches call and the creation of an unused Range instance.

Finally, avoid pointless checking in AnnotationLayerBuilder.prototype.injectLinkAnnotations when there are no inferred links.

Files Modified:

  • web/annotation_layer_builder.js
  • web/autolinker.js

f0a22daa27084b0fae6195e86db89c1d15113a1e by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/f0a22daa27084b0fae6195e86db89c1d15113a1e
Authored: 2026-10-23 21:05:09 +0200
Committed: 2026-10-23 21:05:09 +0200

Use fixed V8 hash and random seeds in the benchmarks

The walltime results vary between runs of the same code by up to ~10% for
some benchmarks, while being stable within a run. Fixing the seeds roughly
halved the number of benchmarks differing by more than 5% between runs.

Files Modified:

  • test/benchmarks/vitest.config.mjs

09b34d498c44f5d784107b54fe28d1db07b280d8 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/09b34d498c44f5d784107b54fe28d1db07b280d8
Authored: 2026-10-22 19:21:22 +0200
Committed: 2026-10-22 21:40:59 +0200

[Editor] Append curves to the stored ink path

Preview the first two points until a curve can be appended. Share SVG
serialization with outlines and undo so a remaining two- or three-point
stroke no longer overwrites the preceding stroke.

Files Modified:

  • src/display/editor/drawers/inkdraw.js
  • test/integration/ink_editor_spec.mjs
  • test/unit/editor_spec.js

4b1f17d4994f44e4c602196514bb4fe2a813e722 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/4b1f17d4994f44e4c602196514bb4fe2a813e722
Authored: 2026-10-22 11:05:33 +0200
Committed: 2026-10-22 21:40:59 +0200

[Editor] Smooth ink input over a sliding time window

Average linearly interpolated positions over a centered 20 ms window,
narrowed near stroke endpoints. Upsample sparse input and preview pending
points up to the pointer.

Use input points for cancellation, discard obsolete samples and reuse
point buffers. Compare coalesced input using recorded positions and timing.

Based on Google Ink's SlidingWindowInputModeler.

Files Added:

  • src/display/editor/drawers/input_smoother.js

Files Modified:

  • src/display/editor/draw.js
  • src/display/editor/drawers/inkdraw.js
  • src/display/editor/drawers/outline.js
  • src/display/editor/ink.js
  • test/integration/ink_editor_spec.mjs
  • test/unit/editor_spec.js

Duplicate of this bug: 2085971

Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(cdenizet)
Flags: needinfo?(cdenizet)

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).

Status: NEW → RESOLVED
Closed: 25 days ago
Duplicate of bug: 2086332
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.