Closed Bug 2090751 Opened 18 days ago Closed 18 days ago

Update PDF.js to new version 0b980a4475e2578d85e9383417f912cd8e0602dd from 2026-11-08 09:10:14 UTC

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 2090783
Tracking Status
firefox162 --- affected

People

(Reporter: update-bot, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 obsolete file)

This update covers 3 commits. Here are the overall diff statistics, and then the commit information.


toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 1 -
toolkit/components/pdfjs/content/PdfJsVersion.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 20 +++---
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 6 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 11 +--
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 18 ++----
toolkit/components/pdfjs/content/web/viewer.mjs | 38 +++++---------
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 41 insertions(+), 63 deletions(-)


945dbf6785f925ff8aafdc6f36ac3eea19544e0b by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/945dbf6785f925ff8aafdc6f36ac3eea19544e0b
Authored: 2026-09-25 13:52:44 +0200
Committed: 2026-11-07 17:16:39 +0100

Combine the enableMerge and enableSplitMerge options/preferences (issue 21679)

This removes the separate enableMerge option/preference, since the enableSplitMerge name already suggests that it controls both aspects.

Files Modified:

  • test/integration/reorganize_pages_spec.mjs
  • web/app.js
  • web/app_options.js
  • web/pdf_thumbnail_viewer.js
  • web/views_manager.js

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

https://github.com/mozilla/pdf.js/commit/a2f67dad8a3b576e82c103ed4504dd08d9d376cf
Authored: 2026-11-07 12:44:36 +0100
Committed: 2026-11-07 13:55:43 +0100

[api-major] Remove the maxCanvasPixels = 0 option, i.e. forced CSS-only zooming, from PDFViewer

This option is removed now, since:

  • It was originally added for the Boot to Gecko (B2G) project, later renamed to Firefox OS, which was discontinued in 2016.
    The option was needed then, since B2G was intended to also run on low-end hardware.

  • Outside of one example, which is a left-over from the B2G viewer, CSS-only zooming has not been used in the PDF.js project itself for a decade.
    (However, there are a couple of integration-tests for it though.)

  • CSS-only zooming often renders the document "useless" at higher zoom-levels, because of the blurriness.

  • Given the current implementation of CSS-only zooming it can break if the initial scale is very large, or if a page has huge dimensions, since the rendering is done without enforcing any limits.

  • Removing the option allows us to simplify the code a little bit.

Note: A much better user-experience can be had nowadays by setting the maxCanvasPixels, maxCanvasDim, and/or capCanvasAreaFactor options to fairly low values, and then via the enableDetailCanvas option (which is true by default) re-render only the currently visible viewport at high-resolution.

Files Modified:

  • examples/mobile-viewer/viewer.mjs
  • src/display/display_utils.js
  • test/integration/viewer_spec.mjs
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/pdf_thumbnail_viewer.js
  • web/pdf_viewer.js

3a326e3a8088f6eacd19c0a961b6f4f21e7fa812 by b84330808 <b84330808@gmail.com>

https://github.com/mozilla/pdf.js/commit/3a326e3a8088f6eacd19c0a961b6f4f21e7fa812
Authored: 2026-11-04 23:52:32 +0900
Committed: 2026-11-04 23:52:32 +0900

Fix the x 1 idiv and x -1 exp simplifications in PSStackToTree

x 1 idiv was simplified to x, so the Wasm and JS compilers returned a
non-integer x unchanged (e.g. 7.5), whereas the interpreter truncates it
(7). It's now simplified to truncate(x).

x -1 exp was rewritten as 1 x div, which gives 0 for x = 0 since a
division by zero returns 0, whereas the interpreter computes Infinity,
which is then clipped to the range. This rewrite is removed.

Files Modified:

  • src/core/postscript/ast.js
  • test/unit/postscript_spec.js

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: 18 days ago
Duplicate of bug: 2090783
Resolution: --- → DUPLICATE
Attachment #9677452 - Attachment is obsolete: true

All jobs completed, we found the following issues.

Known Issues:

  • test-windows11-64-25h2/debug-test-verify-path-1 - 1 of 4 failed on the same (retriggered) task (failed: SbA_wAaZT0iN55NAjxcedA)

These failures may mean that the library update succeeded; you'll need to review
them yourself and decide. If there are lint failures, you will need to fix them in
a follow-up patch. (Or ignore the patch I made, and recreate it yourself with
./mach vendor toolkit/components/pdfjs/moz.yaml.)

In either event, I have done all I can, so you will need to take it from here.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: