Closed Bug 1822233 Opened 2 years ago Closed 2 years ago

Update PDF.js to new version 351d11c9bd52c6209322964efe1576871031f03b from 2023-03-12 12:29:51

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1823360

People

(Reporter: update-bot, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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


toolkit/components/pdfjs/content/build/pdf.js | 105 ++++++++++-----
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 23 ++-
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 16 +-
toolkit/components/pdfjs/content/web/viewer.js | 16 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 107 insertions(+), 61 deletions(-)


c6c9eb4ccbfd15f2562d33cd58ca3c0571cb8094 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/c6c9eb4ccbfd15f2562d33cd58ca3c0571cb8094
Authored: 2023-03-12 10:40:53 +0100
Committed: 2023-03-12 10:40:53 +0100

Update l10n files

Files Modified:

  • l10n/ca/viewer.properties
  • l10n/cak/viewer.properties
  • l10n/cy/viewer.properties
  • l10n/dsb/viewer.properties
  • l10n/el/viewer.properties
  • l10n/en-CA/viewer.properties
  • l10n/eo/viewer.properties
  • l10n/fi/viewer.properties
  • l10n/hy-AM/viewer.properties
  • l10n/ja/viewer.properties
  • l10n/kab/viewer.properties
  • l10n/tg/viewer.properties
  • l10n/th/viewer.properties
  • l10n/tr/viewer.properties
  • l10n/zh-CN/viewer.properties

1d0652336613c53f6c1376b7de0366cbd7ebdb6b by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/1d0652336613c53f6c1376b7de0366cbd7ebdb6b
Authored: 2023-03-12 10:27:52 +0100
Committed: 2023-03-12 10:36:00 +0100

Update npm packages

Files Modified:

  • package-lock.json
  • package.json

f9539e57efcfeef33f992c07ff8bcb5d1f9af4fc by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/f9539e57efcfeef33f992c07ff8bcb5d1f9af4fc
Authored: 2023-03-09 16:10:31 +0100
Committed: 2023-03-10 17:03:40 +0100

Move the svg definitions in its own div

This way the svg element doesn't take up space in the viewer.
Fixes issue #16135.

Files Modified:

  • src/display/display_utils.js

9232264b8a960de48486eccb71c7161e06043b03 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/9232264b8a960de48486eccb71c7161e06043b03
Authored: 2023-03-09 15:51:55 +0100
Committed: 2023-03-09 15:57:16 +0100

Fix the JSDoc returns-type for two PageViewport-methods (issue 16134)

The affected methods have always returned Arrays, however the JSDoc did not accurately reflect that.

Files Modified:

  • src/display/display_utils.js

92296fa6a11f5fa19edd041585e7807f0e1787a2 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/92296fa6a11f5fa19edd041585e7807f0e1787a2
Authored: 2023-03-09 15:27:57 +0100
Committed: 2023-03-09 15:35:29 +0100

Include the document-id in the SVG-filter names (PR 16062 follow-up)

In the general PDF.js library multiple PDF documents may be opened on the same web-page, which is why we many years ago started using document-specific identifiers to prevent issues with global data such e.g. with fonts.
Hence we need to treat the identifiers generated by the FilterFactory in the same way, since the SVG-filters for two separate PDF documents may otherwise get identical ids.

Files Modified:

  • src/display/api.js
  • src/display/display_utils.js

07b094729e139f372569f36cf7fe2839d058bfbb by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/07b094729e139f372569f36cf7fe2839d058bfbb
Authored: 2023-03-09 14:13:28 +0100
Committed: 2023-03-09 15:03:01 +0100

Fix search in pdf a containing some UTF-32 characters (bug 1820909)

Some chars were supposed to have a length equals to 1 but UTF-32 chars
can be longuer.

Files Added:

Files Modified:

  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/pdf_find_controller_spec.js
  • web/pdf_find_controller.js

c0671ac13341dde2b0378771dc846cad84352a9c by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/c0671ac13341dde2b0378771dc846cad84352a9c
Authored: 2023-03-04 11:22:59 +0100
Committed: 2023-03-08 17:06:10 +0100

Slightly increase the maximum image sizes that we'll cache

The current value originated in PR 2317, and in the decade that have passed the amount of RAM available in (most) devices should have increased a fair bit.
Nowadays we also do a much better job of detecting repeated images at both the page- and document-level, which helps reduce overall memory-usage in many documents.

Finally the constant is also moved into the src/shared/util.js file, since it was implicitly used on both the main- and worker-thread previously.

Files Modified:

  • src/core/image_utils.js
  • src/display/api.js
  • src/shared/util.js

15d9faba57a1d8994e39dbba0e3b41da5abf7ef4 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/15d9faba57a1d8994e39dbba0e3b41da5abf7ef4
Authored: 2023-03-04 11:05:52 +0100
Committed: 2023-03-08 17:06:09 +0100

Slightly delay cleanup, after rendering, in documents with large images

Currently in PDF documents with large images we immediately cleanup once rendering has finished, in order to reduce memory-usage.
Normally that shouldn't be a big problem, however when e.g. repeated zooming happens in the viewer that could easily lead to a lot of wasted resources (and waiting).

Hence this patch, which introduces a new PDFPageProxy method that will slightly delay cleanup after rendering.

Files Modified:

  • src/display/api.js

e7a7f02f4c1a4f650c3fae1c933a8641bef4eef4 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/e7a7f02f4c1a4f650c3fae1c933a8641bef4eef4
Authored: 2023-03-04 09:42:32 +0100
Committed: 2023-03-08 17:06:09 +0100

Convert a couple of fields/methods into properly private ones in PDFPageProxy

These were always intended to be private, so let's use modern JS features to actually enforce that.

Files Modified:

  • src/display/api.js

6d3506548dcd698e44c78cd114276cd4f242267a by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/6d3506548dcd698e44c78cd114276cd4f242267a
Authored: 2023-03-07 12:03:45 +0100
Committed: 2023-03-07 16:33:56 +0100

[api-minor] Update the minimum supported Node.js version to 16

This patch updates the minimum supported environments as follows:

Note also that Node.js 14 will very soon reach EOL, and thus no longer receive any security updates.

Files Modified:

  • gulpfile.js
  • package-lock.json
  • package.json
  • src/shared/compatibility.js

158c836e26fd2a07eabb5bc52341bcccffafbb7c by Ben Wagner

https://github.com/mozilla/pdf.js/commit/158c836e26fd2a07eabb5bc52341bcccffafbb7c
Authored: 2023-02-27 12:34:12 -0500
Committed: 2023-03-03 17:25:11 -0500

Correct PostScript trigonometric operators

PDF 32000-1:2008 7.10.5.1 "Type 4 (PostScript Calculator) Functions"
defers to the PostScript Language Reference for the description of these
functions. The PostScript Language Reference, third edition chapter 8
"Operators" defines the angle type as a "number of degrees". Section
8.1 defines "angle sin real", "angle cos real", and "num den atan
angle". The documentation for atan further states that it will return
an angle in degrees between 0 and 360.

Handle these operators correctly in PostScriptEvaluator.execute.
Convert the inputs to sin and cos from degrees to radians for use
with Math.sin and Math.cos. Correctly pop two values from the stack
for atan, use Math.atan2, and convert from radians to (positive)
degrees.

Files Added:

  • test/pdfs/colorspace_atan.pdf
  • test/pdfs/colorspace_cos.pdf
  • test/pdfs/colorspace_sin.pdf

Files Modified:

  • src/core/function.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/function_spec.js

Updatebot encountered an error while trying to submit to try. It appears that the Decision task did not succeed.
Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(cdenizet)
No longer blocks: esm-ification
No longer blocks: 1820909
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1823360
Resolution: --- → DUPLICATE
Flags: needinfo?(cdenizet)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: