Compare commits

...

1493 Commits

Author SHA1 Message Date
Jonas Jenwald
10844326c7
Merge pull request #21497 from Snuffleupagus/substring-tweaks
Tweak some `String.prototype.substring()` usage
2026-06-24 20:32:34 +02:00
Jonas Jenwald
eee03693a0
Merge pull request #21499 from Snuffleupagus/version-6.1
Bump library version to `6.1`
2026-06-24 19:47:37 +02:00
Jonas Jenwald
7414f6ed5a Bump library version to 6.1
See commit b168293c173b0b9befe462c0b254136cf038c3ef
2026-06-24 19:32:42 +02:00
Jonas Jenwald
5964e88be1
Merge pull request #21488 from Snuffleupagus/annotationGlobals-catalog
Include the `catalog` instance in the `annotationGlobals` data
2026-06-24 18:57:53 +02:00
Jonas Jenwald
6718c2924c Tweak some String.prototype.substring() usage
In a few spots the `indexEnd` parameter is explicitly set to the string-length, which is unnecessary since that's the default value if the parameter is omitted; note https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring#description

In the `XMLParserBase.prototype._resolveEntities` method the `substring` usage can be replaced with an updated (and cached) regular expression that directly finds numbers.
2026-06-24 18:52:46 +02:00
Jonas Jenwald
44e637a064 Remove explicit xref usage in the ScreenAnnotation.prototype.#renditionActions method
Rather than fetching "raw" dictionary-data and then manually resolving any references, we can simply use `Dict.prototype.get` and `Dict`-iteration to access the needed data *directly* instead.
2026-06-24 10:46:07 +02:00
Jonas Jenwald
15d93e1f34 Introduce a helper method, in the Annotation class, for determining the attachment fileId
This avoids duplication between the `FileAttachmentAnnotation` and `MediaAnnotation` classes, since they currently include essentially the same code for determining the attachment `fileId`.
2026-06-24 10:45:52 +02:00
Jonas Jenwald
8a2c112c20 Simplify the Annotation.prototype.setAppearance method a tiny bit
It's not necessary to check if the /AS entry exists first, and it can just be fetched directly, since in that case the existing "is stream"-check won't be true anyway.

Also, move the `appearance` field definition to the top of the class instead.
2026-06-24 10:42:38 +02:00
Jonas Jenwald
f07a106529 Include the catalog instance in the annotationGlobals data
The `FileAttachmentAnnotation` and `MediaAnnotation` code needs to (synchronously) access a `catalog` method, which leads to unnecessarily verbose code.
This can be avoided by including the `catalog` instance in the `annotationGlobals` data, which is safe since it already includes data that's fetched asynchronously from the `catalog` instance.
2026-06-24 10:42:38 +02:00
calixteman
04eeeec4a4
Merge pull request #21492 from timvandermeij/updates
Update dependencies to the most recent versions
2026-06-24 08:06:07 +02:00
calixteman
e6539f6516
Merge pull request #21490 from calixteman/screen_rendition
Add support for Screen annotations playing embedded media
2026-06-23 21:34:30 +02:00
Tim van der Meij
7a9abfb2dc
Fix vulnerability in the js-yaml dependency
This patch is generated automatically using `npm audit fix`, and
partially fixes GHSA-h67p-54hq-rp68.
2026-06-23 20:53:19 +02:00
Tim van der Meij
048331b09a
Upgrade @types/node to version 26.0.0
This is a major version bump, but the patch at
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75025
doesn't indicate any breaking changes that should impact us as it mainly
includes support for Node.js 26.
2026-06-23 20:50:02 +02:00
Tim van der Meij
56843f9b42
Upgrade eslint-plugin-unicorn to version 68.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v67.0.0 and
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v68.0.0
doesn't indicate any breaking changes that should impact us.
2026-06-23 20:50:02 +02:00
Tim van der Meij
7818ab1b9d
Update dependencies to the most recent versions 2026-06-23 20:50:02 +02:00
Calixte Denizet
d8ea2afe47 Add support for Screen annotations playing embedded media
Screen annotations whose rendition action resolves to an embedded audio/video
file now play through the same play-button overlay as RichMedia.
Factor the shared resolution logic into a MediaAnnotation base (used by both RichMedia and Screen).

It fixes #6078 and #2787.
2026-06-23 20:48:35 +02:00
Tim van der Meij
4117b75a10
Merge pull request #21486 from Snuffleupagus/getTextContent-sink-fixes
Improve the `sink` handling in `getTextContent` for Highlight annotations (PR 20019 follow-up)
2026-06-23 20:02:34 +02:00
Jonas Jenwald
813d1949ba
Merge pull request #21491 from Snuffleupagus/readCmapTable-sort-last
Sort the mappings *last* in the `readCmapTable` function (PR 19321 follow-up)
2026-06-23 16:01:09 +02:00
Jonas Jenwald
a1acf4fc9f
Merge pull request #21489 from Snuffleupagus/editor-tools-rm-testing-reset
Remove the `AnnotationEditorUIManager` and `IdManager` test-only `reset` methods (PR 19809 follow-up)
2026-06-23 14:03:46 +02:00
Jonas Jenwald
9ca13c9a23 Sort the mappings *last* in the readCmapTable function (PR 19321 follow-up)
This improves performance of `issue19319.pdf` even more, and locally the rendering time of the second page goes from ~300 ms to ~250 ms, since we avoid sorting a bunch of duplicate entries.
2026-06-23 13:51:37 +02:00
Jonas Jenwald
09c9f7f2fe Remove the AnnotationEditorUIManager and IdManager test-only reset methods (PR 19809 follow-up)
These test-only methods became unused in PR 19809.
2026-06-23 12:09:12 +02:00
calixteman
d71fe9025d
Merge pull request #21474 from calixteman/rich_media
Add support for RichMedia annotations
2026-06-22 22:29:14 +02:00
Calixte Denizet
d537f5ba4b
Add support for RichMedia annotations
Render `/Subtype /RichMedia` annotations so embedded video and audio can
be played in the viewer.

The core layer parses the `RichMediaContent` dictionary to locate the
primary playable asset and its MIME type. The display layer overlays a
play button on the annotation's poster; clicking it swaps in a
`<video>`/`<audio>` element backed by a `blob:` URL. Presentation mode
lets events reach the media controls instead of advancing the page.

It fixes #2787.
2026-06-22 21:27:52 +02:00
Tim van der Meij
b6469341c1
Merge pull request #21485 from calixteman/bug2046659
Use AES256 for V=5 documents with a mislabeled AESV2 crypt filter (bug 2046659)
2026-06-22 20:44:48 +02:00
Tim van der Meij
7ac6dff4b7
Merge pull request #21483 from calixteman/issue21430
Reset alpha before drawing a colored glyph in type 3 font
2026-06-22 20:40:55 +02:00
Jonas Jenwald
22871eef23 Improve the sink handling in getTextContent for Highlight annotations (PR 20019 follow-up)
Currently there's a couple of issues related to the `sink` handling:
 - The `Page.prototype.extractTextContent` method is invoked with options that it doesn't actually use; note 1ddf6449ac/src/core/document.js (L669-L676)

 - When parsing "nested" textContent, i.e. /Form /XObjects, we end up wrongly treating repeated /XObjects as empty for the annotations use-case since `enqueue` is never invoked; note 1ddf6449ac/src/core/evaluator.js (L3439) and 1ddf6449ac/src/core/evaluator.js (L3449-L3451)

 - The `getTextContent` method might become ever so slightly slower by having to defer parsing at every step, given the "bad" fallback value when comparing with the `TEXT_CONTENT_CHUNK_SIZE` constant (in the API), note 1ddf6449ac/src/display/api.js (L1705) and 1ddf6449ac/src/core/evaluator.js (L3566)

 - Having the `sink` now be effectively optional, in the `getTextContent` method, does complicate the code slightly overall.

To address these things this patch ensures that a `sink` will always be available, by re-using the `sinkWrapper` structure from the "nested" textContent case, and with reasonable default values.
2026-06-22 14:56:17 +02:00
Calixte Denizet
7f7e63333d Use AES256 for V=5 documents with a mislabeled AESV2 crypt filter (bug 2046659)
Some producers wrongly set the crypt filter CFM to AESV2 for V=5 documents;
per the spec these must be decrypted with AES256 using the file encryption key directly.
2026-06-22 14:54:24 +02:00
calixteman
1ddf6449ac
Merge pull request #21478 from calixteman/comb-field-vertical-centering
Vertically center the glyphs in comb text fields
2026-06-22 09:57:55 +02:00
Jonas Jenwald
28a7606c14
Merge pull request #21480 from Snuffleupagus/mathML-FileSpec
A couple of small tweaks of the `StructElementNode.prototype.mathML` getter
2026-06-21 23:44:28 +02:00
calixteman
623e6d9476
Reset alpha before drawing a colored glyph in type 3 font
It fixes #21430.
2026-06-21 23:06:43 +02:00
Jonas Jenwald
9c9b465fd2 A couple of small tweaks of the StructElementNode.prototype.mathML getter
- Use `FileSpec.pickPlatformItem` when getting the fileStream, to ensure that /EF-entries are handled in a consistent way across the code-base.

 - Combine a couple of the data-validation steps, to reduce a tiny bit of duplication. Also, use the `isDict` helper a little more.

 - Finally, avoid using a temporary variable when returning data in the `Page.prototype.getStructTree` method.
2026-06-21 22:47:13 +02:00
Tim van der Meij
8ebc2382e3
Merge pull request #21479 from Snuffleupagus/Annotation-#setOptionalContent-MissingDataException
Don't swallow `MissingDataException`s in the `Annotation.prototype.#setOptionalContent` method (PR 21313 follow-up)
2026-06-21 19:11:54 +02:00
Tim van der Meij
38daede697
Merge pull request #21481 from Snuffleupagus/metadata-isDict
Use the `isDict` helper in the `Catalog.prototype.metadata` getter
2026-06-21 19:10:54 +02:00
Tim van der Meij
86b901fcde
Merge pull request #21470 from Snuffleupagus/AnnotationEditorUIManager-rm-isSelected
Remove the unused `AnnotationEditorUIManager.prototype.isSelected` method
2026-06-21 19:09:32 +02:00
Tim van der Meij
1d8e952062
Merge pull request #21482 from Snuffleupagus/password-input-Enter-preventDefault
Stop event propagation, for the `Enter` key, in the passwordPrompt input
2026-06-21 19:05:50 +02:00
Tim van der Meij
018ba66228
Merge pull request #21472 from mozilla/dependabot/npm_and_yarn/undici-7.28.0
Bump undici from 7.24.3 to 7.28.0
2026-06-21 19:04:29 +02:00
Jonas Jenwald
a911ce22e5 Stop event propagation, for the Enter key, in the passwordPrompt input
**Steps to reproduce:**
 1. Open the viewer.
 2. Show the sidebar, and switch to the "Pages" view if necessary.
 3. Click on the "Add file" button.
 4. Choose a password-protected PDF, e.g. the `issue6010_1.pdf` file, via the "File Upload" dialog opened by the browser.
 5. Enter the password, i.e. `abc`, and press the <kbd>Enter</kbd> key.

**Expected result:**
That the new PDF document is merged into the existing one, without UI side-effects.

**Actual result:**
Merging works, *however* the "File Upload" dialog is re-opened.

---

It seems that when the passwordPrompt dialog closes, the <kbd>Enter</kbd> key press (from the input) is forwarded to the previously focused element which naturally is the "Add file" button.

*Note:* This doesn't seem (easily) possible to test, since the integration-tests directly populate the `viewsManagerAddFilePicker` and doesn't actually "click" on the `viewsManagerAddFileButton` first.
2026-06-21 15:30:05 +02:00
Jonas Jenwald
a46ee2b647 Use the isDict helper in the Catalog.prototype.metadata getter 2026-06-21 12:26:21 +02:00
Jonas Jenwald
bd6541864b Don't swallow MissingDataExceptions in the Annotation.prototype.#setOptionalContent method (PR 21313 follow-up)
Unless the entire document has been loaded, the dictionary lookups in `parseMarkedContentProps` may throw `MissingDataException`s and in that case we need to re-parse the current Annotation rather than ignoring the optionalContent.
2026-06-21 09:13:33 +02:00
Jonas Jenwald
124228e318
Merge pull request #21473 from Snuffleupagus/showText-rm-return-undefined
Remove unnecessary explicit return statements in `CanvasGraphics.prototype.showText`
2026-06-20 22:31:58 +02:00
Jonas Jenwald
bff30726fa
Merge pull request #21476 from Snuffleupagus/relative-URI-action-test
Add a unit-test for relative URI actions specified as /Name instances
2026-06-20 22:31:02 +02:00
Calixte Denizet
34516bcec3 Vertically center the glyphs in comb text fields 2026-06-20 18:47:24 +02:00
Jonas Jenwald
bade1f3190 Add a unit-test for relative URI actions specified as /Name instances
The following branch was added to fix issue 4159, however looking at the coverage data it's not actually tested; see 59df671552/src/core/catalog.js (L1866-L1869) and 59df671552/blob/src/core/catalog.js (L1866)
2026-06-19 23:58:50 +02:00
Jonas Jenwald
00e1aabe93 Remove unnecessary explicit return statements in CanvasGraphics.prototype.showText 2026-06-19 10:58:14 +02:00
dependabot[bot]
dfa673290b
Bump undici from 7.24.3 to 7.28.0
Bumps [undici](https://github.com/nodejs/undici) from 7.24.3 to 7.28.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.24.3...v7.28.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.28.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 07:33:31 +00:00
calixteman
59df671552
Merge pull request #21471 from mozilla/update-locales
l10n: Update locale files
2026-06-19 08:10:32 +02:00
github-actions[bot]
87361aa094 l10n: Update locale files 2026-06-19 01:04:57 +00:00
Jonas Jenwald
786019eb0d Remove the unused AnnotationEditorUIManager.prototype.isSelected method
According to the coverage data this method is unused, see e20c810dd4/blob/src/display/editor/tools.js (L2552), and searching through the entire code-base reveals no call-site invoking an `isSelected` method.
2026-06-18 23:21:53 +02:00
calixteman
e20c810dd4
Merge pull request #21469 from calixteman/issue21466
Avoid too long BlueScale value when rewriting a CFF font
2026-06-18 21:43:05 +02:00
calixteman
07d4c1018a
Avoid too long BlueScale value when rewriting a CFF font
It fixes #21466.
2026-06-18 20:48:13 +02:00
Jonas Jenwald
e74be44919
Merge pull request #21467 from Snuffleupagus/canvas-rm-unused
Remove unused branches in the `src/display/canvas.js` file
2026-06-18 19:57:51 +02:00
Jonas Jenwald
b4b0a3fa04 Remove the unused ImageData branch in the putBinaryImageData function
This branch isn't covered by any tests, and looking at the two existing call-sites we only ever pass in a `CanvasRenderingContext2D` interface to this function.
Based on the git history this branch was added in PR 3312, however as far as I can tell it doesn't actually appear to have been necessary even back then!?
2026-06-18 18:22:55 +02:00
Jonas Jenwald
a443a635a1 Remove the unused HTMLElement branch in the paintInlineImageXObject method
This branch isn't covered by any tests, and as far as I can tell it's been unused ever since PR 11601 which simplified the JPEG image handling.
Prior to that we'd create an `Image` instance in one case, see [this code](https://github.com/mozilla/pdf.js/pull/11601/changes#diff-082d6b37ad01db7ac97cc07c6ddb0dc52040484c5ef91b110b072f50144d9f39L2312-L2314), which is why that branch was necessary since `new Image()` creates a `HTMLImageElement` instance which in itself is an instance of `HTMLElement`; note [this](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) respectively [this](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement).
2026-06-18 17:47:26 +02:00
calixteman
3956ac1b39
Merge pull request #21465 from calixteman/fix_attachments
Re-derive annotation attachment content from the xref after cleanup
2026-06-18 16:48:13 +02:00
Calixte Denizet
9d9fb06d7f Re-derive annotation attachment content from the xref after cleanup
Annotation-local attachments (those not in the catalog `/Names` tree) were
resolved through a dictionary cache that `Catalog.cleanup` clears, so their
content became unreachable once the idle cleanup had run.

Encode the reference of the embedded content in the attachment id and re-fetch
it from the xref on demand instead of caching the dictionary, so the content
stays reachable without anything having to survive cleanup.

It fixes a regression introduced by #21351.
2026-06-18 16:03:32 +02:00
calixteman
187c22126a
Merge pull request #21310 from calixteman/dont_save
Add a 'supportsDownloading' browser option to gate saving/downloading
2026-06-18 15:36:41 +02:00
Calixte Denizet
ece1e2ed0c Add a 'supportsDownloading' browser option to gate saving/downloading
Introduces a 'supportsDownloading' browser option (defaulting to false)
that lets embedders disable the save/download paths entirely. When
disabled:
  - the toolbar and secondary-toolbar download buttons are hidden;
  - PDFViewerApplication.{download,save,downloadOrSave} and the
    "beforeunload" save prompt bail out early;
  - the BaseDownloadManager helpers (download, downloadData,
    openOrDownloadData) and the Firefox/generic _triggerDownload
    implementations no-op.
2026-06-18 14:51:32 +02:00
Jonas Jenwald
2ed018ec2d
Merge pull request #21460 from Snuffleupagus/autolinking-check-every-LinkAnnotation
Check every LinkAnnotation when testing if inferred links overlap (issue 21458)
2026-06-16 22:32:07 +02:00
calixteman
eae42379f2
Merge pull request #21462 from calixteman/bluescale-small-zones
Don't clamp BlueScale up when a font genuinely has small zones
2026-06-16 21:52:25 +02:00
calixteman
d28030f838
Merge pull request #21463 from calixteman/fix_unit_test
Adjust the 'BaseException' unit-test for the 'Error.stack' changes in Firefox
2026-06-16 21:43:49 +02:00
Jonas Jenwald
cbefb334fd Check every LinkAnnotation when testing if inferred links overlap (issue 21458)
Currently we only check LinkAnnotations with URLs, but completely ignore e.g. internal destinations, named actions, attachments, SetOCGState actions, JS actions, and ResetForm actions when testing if inferred links overlap any existing annotation.
This seems conceptually wrong, since it may easily break intended functionality by overlaying the *correct* DOM element with an inferred link (as was the case in issue 21458).
2026-06-16 21:35:44 +02:00
Calixte Denizet
5432642250 Adjust the 'BaseException' unit-test for the 'Error.stack' changes in Firefox
Firefox 154 no longer walks the prototype chain in the `Error.stack`
getter, so `BaseException`-derived instances return an empty string
rather than the prototype `Error`'s stack (see bug 1946559).
2026-06-16 21:30:41 +02:00
Tim van der Meij
f0dc2166ab
Merge pull request #21464 from mozilla/dependabot/npm_and_yarn/markdown-it-14.2.0
Bump markdown-it from 14.1.1 to 14.2.0
2026-06-16 21:16:19 +02:00
dependabot[bot]
9ed97a859f
Bump markdown-it from 14.1.1 to 14.2.0
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.1 to 14.2.0.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.1...14.2.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 19:01:51 +00:00
Tim van der Meij
8bc13d502b
Merge pull request #21459 from Snuffleupagus/PDFEditor-ternary-Dict-set
Use ternary expressions to shorten code in `src/core/editor/pdf_editor.js`
2026-06-16 20:50:05 +02:00
Tim van der Meij
36eae2c978
Merge pull request #21461 from mozilla/dependabot/github_actions/github/codeql-action-4.36.2
Bump github/codeql-action from 4.36.1 to 4.36.2
2026-06-16 20:48:22 +02:00
calixteman
bc99fc0678
Don't clamp BlueScale up when a font genuinely has small zones
The lower BlueScale clamp from #21343 guarded foundry fonts via
`blueScale < DEFAULT_BLUE_SCALE`, but that lets a near-default value
(e.g. 0.037) with small zones get raised to `0.5 / maxZoneHeight`. On
macOS' Core Text rasterizer this collapses the overshooting glyphs, so
most text disappears (not reproducible on Linux/Windows).
2026-06-16 19:34:48 +02:00
calixteman
fdeed2af5e
Merge pull request #21455 from calixteman/bug1873345
Draw non-isolated blend-mode groups against their backdrop (bug 1873345)
2026-06-16 15:26:00 +02:00
Calixte Denizet
082ad21387 Draw non-isolated blend-mode groups against their backdrop (bug 1873345)
A non-isolated transparency group must blend with its backdrop, but a group
containing a blend mode was forced onto a transparent intermediate canvas;
e.g. a /Multiply highlight then painted opaquely over the text behind it,
 making that text invisible.
2026-06-16 15:09:39 +02:00
dependabot[bot]
6cdd3c19fd
Bump github/codeql-action from 4.36.1 to 4.36.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.36.1 to 4.36.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](87557b9c84...8aad20d150)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 12:14:06 +00:00
Jonas Jenwald
6c0ad865c6 Use ternary expressions to shorten code in src/core/editor/pdf_editor.js
This makes setting a few Dictionary entries a little bit shorter, which shouldn't hurt.
(Part of this code isn't fully covered by tests, so it improves overall code coverage as well.)
2026-06-16 11:50:53 +02:00
Tim van der Meij
7f7b38b424
Merge pull request #21457 from Snuffleupagus/GetAnnotationsByType-rm-page-check
Remove unneeded check in the "GetAnnotationsByType" worker-thread handler
2026-06-15 21:41:10 +02:00
Tim van der Meij
7d3ec9da1e
Merge pull request #21456 from Snuffleupagus/rm-classNamesForOutlining
Remove the unused `HighlightOutline.prototype.classNamesForOutlining` getter
2026-06-15 20:46:32 +02:00
calixteman
67e6ff0090
Merge pull request #21428 from calixteman/checkubtton_opt
Resolve checkbox/radio export values from the 'Opt' entry
2026-06-15 19:43:28 +02:00
Calixte Denizet
2550b91be9 Resolve checkbox/radio export values from the 'Opt' entry
For checkbox and radio button fields, the export value can differ from the
appearance-state name: the field's inheritable `Opt` array holds the real
export values (used for non-Latin text, or values shared between buttons).
We previously exposed the appearance-state name as the export value.
2026-06-15 18:23:26 +02:00
Jonas Jenwald
d9e4cc5f65 Remove unneeded check in the "GetAnnotationsByType" worker-thread handler
Given that the Promise returned by the `PDFDocument.prototype.getPage` method *always* resolves with a `Page` instance, checking that the page is defined isn't necessary; note 3a09329113/src/core/document.js (L1702-L1723)

Furthermore the `Page.prototype.collectAnnotationsByType` method is asynchronous, and thus it always returns a Promise, hence it's "pointless" to fallback to return an empty Array.
2026-06-15 13:12:47 +02:00
Jonas Jenwald
f781ac33da Remove the unused HighlightOutline.prototype.classNamesForOutlining getter
This was added in PR 18972 and it became unused in PR 19085, however it was accidentally left behind.
2026-06-15 12:02:46 +02:00
Tim van der Meij
3a09329113
Merge pull request #21454 from timvandermeij/eslint-plugin-unicorn
Upgrade `eslint-plugin-unicorn` to version 66.0.0
2026-06-14 21:51:42 +02:00
Tim van der Meij
0ea67ed96f
Upgrade eslint-plugin-unicorn to version 66.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v66.0.0
doesn't indicate any breaking changes that should impact us.

However, improved rules do require a small number of changes here:

- The `prefer-array-some` rule no longer reports a false positive after
  https://github.com/sindresorhus/eslint-plugin-unicorn/issues/3198 got
  fixed, so the ignore line that was added in commit 68a5ec1 is removed.

- The `prefer-ternary` rule triggers on more cases now, in particular
  `let` declarations with `if` reassignments, so a number of changes are
  made to make it pass again.

- The `prefer-at` rule triggers on more cases now, in particular
  `substring` calls that just extract a single character, so one change
  is made to make it pass again.
2026-06-14 20:20:34 +02:00
calixteman
92bd2dbb38
Merge pull request #21453 from timvandermeij/puppeteer-skip-download
Don't download Puppeteer browsers on `npm install`
2026-06-14 19:25:32 +02:00
Tim van der Meij
26b4206d87
Configure Puppeteeer to not download Chrome/Firefox by default
We currently download Chrome/Firefox immediately on `npm install`
invocations because Puppeteer's postinstall script does that by default.
However, this is wasteful if the user/workflow doesn't actually need to
run Puppeteer or its browsers, for example in GitHub Actions workflows
that do linting, static analysis or other tasks like updating locales or
publishing artifacts.

This commit therefore makes sure no browser binaries get pulled in by
default anymore, and defers doing that until it's actually necessary,
which is when we want to start the browsers in the `startBrowsers`
function of `test.mjs`.

Locally this brings the `npm install` runtime down from 8.998 to 1.800
seconds, and as a bonus it results in better log output too because it
now shows which browser versions were used in the run (whereas
previously with `npm install` this information was not sent to stdout).
2026-06-14 17:15:47 +02:00
Tim van der Meij
6bfefa53da
Configure Puppeteer to use the stable version of Chrome
We currently use the pinned version of Chrome as hardcoded in the
Puppeteer release, which is based on the version of Chrome that was
deemed stable at the time of the Puppeteer release.

However, this is not ideal because it means that Chrome updates are
strongly tied to Puppeteer releases, so if Puppeteer releases are slow
we could be missing out on e.g. (security) patches being applied on the
stable channel. It's also not consistent with Firefox where we don't
use a hardcoded pinned version either.

This commit therefore configures Puppeteer to use (resolve) the most
recent stable version of Chrome at the time of the installation so that
determining the browser version to use is fully decoupled from the
Puppeteer release we're running.

The effect of this change can be seen in the output of running
`npx puppeteer browsers list`:

Before:

`chrome@149.0.7827.22 (linux) <path>`

After (note the slightly newer version):

`chrome@149.0.7827.115 (linux)` <path>`
2026-06-14 17:12:43 +02:00
Tim van der Meij
66c22b1fc5
Configure Puppeteer to not download Chrome headless shell
Nowadays Chrome has a built-in (new) headless mode in the regular
binary, but before that time there was an old headless mode that was
essentially a separate binary [1]. We don't use the latter, but it turns
out that Puppeteer downloads it automatically if it's not explicitly
skipped, which is wasteful because it costs extra time and resources for
each `npm install` invocation.

This commit therefore skips downloading Chrome headless shell explictly,
which results in the local runtime of `npm install` going from 10.125
seconds to 8.998 seconds (which can't hurt in e.g. GitHub Actions).

[1] https://developer.chrome.com/blog/chrome-headless-shell.
2026-06-14 16:59:13 +02:00
Tim van der Meij
8560125056
Merge pull request #21448 from timvandermeij/comment-intermittent
Fix intermittent failure in the `must check that the comment sidebar is resizable` comment integration test
2026-06-14 16:35:20 +02:00
Tim van der Meij
ed1b2f91be
Merge pull request #21440 from Snuffleupagus/putBinaryImageData-convertRGBToRGBA
Use the `convertRGBToRGBA` helper with RGB images in `putBinaryImageData`
2026-06-14 14:20:11 +02:00
Tim van der Meij
bfcafbc004
Merge pull request #21444 from Snuffleupagus/merge-test-password
Add an integration-test for merging a password-protected PDF
2026-06-14 14:16:35 +02:00
Jonas Jenwald
2dc73ad2a7 Collect coverage data from all workers when closing integration-tests
The "Merge PDF" integration-tests will (indirectly) invoke `PDFViewerApplication.open` as part of loading the new PDF document, which will end up creating a new `PDFWorker` instance.
Currently worker coverage is only collected at the end of each integration-test, which means that in these cases we miss the coverage data from any "previous" workers.
2026-06-14 13:27:06 +02:00
Jonas Jenwald
feec28583d Add an integration-test for merging a password-protected PDF
Looking at the coverage data the password-handling part of the merge functionality wasn't being tested; see e75a7cfd62/blob/src/core/worker.js (L652)
2026-06-14 13:17:33 +02:00
Jonas Jenwald
1373aa4a48
Merge pull request #21452 from Snuffleupagus/merge-test-corrupt
Add an integration-test for merging a corrupt PDF
2026-06-14 13:13:47 +02:00
Jonas Jenwald
e1c930adfe Add an integration-test for merging a corrupt PDF
Currently when opening a PDF document the following code is used, where `checkFirstPage`/`checkLastPage` helps detect XRef corruption; note 86a18bd5fe/src/core/worker.js (L167-L176)

However when merging a PDF into an existing document the parsing is only "partial"; note 86a18bd5fe/src/core/worker.js (L632-L634)

It seems a little strange to not support corrupt PDFs in a consistent manner in the code-base, hence this patch adds a new `BasePdfManager` helper that handles all the relevant parsing/checking and re-uses that when merging PDFs.
2026-06-14 09:49:23 +02:00
Tim van der Meij
d305b542df
Fix intermittent failure in the must check that the comment sidebar is resizable comment integration test
We use the generic `page.mouse.move(x, y, { steps }` API, but that purely
performs the mouse move steps without having knowledge about if/how the
application handles any events caused by it, so it doesn't wait for the
sidebar to render before moving on. This causes intermittent failures if
the sidebar didn't get enough time to render before the next mouse move
is initiated (which can happen in slower environments).

This commit fixes the issue by doing the mouse move steps ourselves and
by waiting for a browser trip between each of them to make sure that the
sidebar got a chance to render.

Fixes #21447.
Relates to #21044 / #21045 / 24e5377.
2026-06-13 21:32:00 +02:00
Tim van der Meij
86a18bd5fe
Merge pull request #21446 from timvandermeij/updates
Update dependencies to the most recent versions
2026-06-13 21:15:55 +02:00
Tim van der Meij
68a5ec1403
Upgrade eslint-plugin-unicorn to version 65.0.1
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v65.0.0
doesn't indicate any breaking changes that should impact us.

However, there is one false positive, possibly introduced by patch
https://github.com/sindresorhus/eslint-plugin-unicorn/pull/3028:

```
src/core/xfa/factory.js
  104:54  error  Prefer `.some(…)` over `.find(…)`  unicorn/prefer-array-some
```

This is incorrect because on this line we're not dealing with an array
but with a `FontFinder` instance instead (and that doesn't have a
`.some()` method), so we ignore the rule for this line.
2026-06-13 19:33:50 +02:00
Tim van der Meij
827ddf6e09
Update dependencies to the most recent versions 2026-06-13 19:12:35 +02:00
Tim van der Meij
01948aff23
Merge pull request #21443 from Snuffleupagus/finishWorkerTask-finally
Reduce duplication when invoking `finishWorkerTask`
2026-06-13 19:01:04 +02:00
Jonas Jenwald
c88f0bba04 Reduce duplication when invoking finishWorkerTask
By utilizing `Promise.prototype.finally()` more it's possible to avoid a bit of duplication when invoking `finishWorkerTask`.
2026-06-13 16:52:47 +02:00
Jonas Jenwald
55c8516944 Use the convertRGBToRGBA helper with RGB images in putBinaryImageData
This removes a little bit of code duplication, which only exist since the `src/display/canvas.js` code pre-dates the helper function by many years.

Note: Given that `OffscreenCanvas` is enabled by default there's currently not a lot of test coverage for this code-path, hence the added browser-test.
2026-06-13 13:14:50 +02:00
Tim van der Meij
e75a7cfd62
Merge pull request #21441 from Snuffleupagus/JpegImage-isSourcePDF-conditional
Re-factor the `isSourcePDF` handling in the `JpegImage` class
2026-06-13 12:48:00 +02:00
Tim van der Meij
5f8f6b1e40
Merge pull request #21439 from Snuffleupagus/more-getOrInsertComputed
Use `Map.prototype.getOrInsertComputed()` more in the code-base
2026-06-13 12:44:51 +02:00
Jonas Jenwald
ec1e94423b Re-factor the isSourcePDF handling in the JpegImage class
This functionality was added specifically for the standalone image-decoders, and by utilizing the pre-processor we can reduce the amount of "unnecessary" code in the regular builds.

Also, shorten a few loop variables a little bit since less code is always good.
2026-06-13 10:59:02 +02:00
Jonas Jenwald
5873e1cbc0
Merge pull request #21431 from Snuffleupagus/more-isDict
Use the `isDict` helper function in a few more places
2026-06-12 23:32:22 +02:00
Jonas Jenwald
ffa7ac7a91 Use Map.prototype.getOrInsertComputed() more in the code-base 2026-06-12 23:21:16 +02:00
Tim van der Meij
ca34359e1f
Merge pull request #21426 from Snuffleupagus/rm-convertToViewportRectangle
[api-minor] Remove the unused `convertToViewportRectangle` method in the `PageViewport` class
2026-06-12 22:06:19 +02:00
calixteman
35d275d3b1
Merge pull request #18907 from calixteman/bug1802506
Use the checkboxes and radio button appearances as defined in the pdf to render them in the annotation layer (bug 1802506)
2026-06-12 22:04:29 +02:00
Tim van der Meij
4781194b37
Merge pull request #21437 from Snuffleupagus/issue-21436
Handle corrupt PDFs that lack /Kids array and just inline the /Page dictionary (issue 21436)
2026-06-12 20:49:27 +02:00
Calixte Denizet
069b757998 Use the checkboxes and radio button appearances as defined in the pdf to render them in the annotation layer (bug 1802506)
The idea is to generate two operator lists for the Yes/Off states and render them on a separate canvas.
These canvases are then attached the annotation and we modify their display depending on the input state.

It fixes #18021.
2026-06-12 20:10:56 +02:00
Jonas Jenwald
131d6b7d38 Handle corrupt PDFs that lack /Kids array and just inline the /Page dictionary (issue 21436)
This basically extends PR 9549 to the fallback `getAllPageDicts` method, which didn't exist at the time, in order to support more cases of corrupt PDF documents.
2026-06-12 12:04:58 +02:00
calixteman
63db4bb777
Merge pull request #21433 from mozilla/update-locales
l10n: Update locale files
2026-06-12 08:45:22 +02:00
github-actions[bot]
53d0856ee9 l10n: Update locale files 2026-06-12 01:00:11 +00:00
Jonas Jenwald
3b628d59fb Use the isDict helper function in a few more places 2026-06-11 17:24:03 +02:00
Jonas Jenwald
2466a76ba4
Merge pull request #21429 from Snuffleupagus/getAttachmentContent-fix-unit-test
Fix the unit-tests for on-demand password handling of encrypted attachments (issue 21425)
2026-06-11 15:13:46 +02:00
Jonas Jenwald
587abf0ef4 Re-use the getPassword helper function more in the src/core/worker.js file
Currently the same code, for requesting the password from the main-thread, is now duplicated three times.
Let's avoid that by moving the new `getPassword` helper function, added in the previous commit, and re-use that everywhere instead.
2026-06-11 10:07:39 +02:00
Jonas Jenwald
f3f5acc418 Fix the unit-tests for on-demand password handling of encrypted attachments (issue 21425)
These unit-tests used a PDF that prompted for password on document load, which meant that the on-demand password handling wasn't actually being tested as intended.

Updating the unit-tests also caused the "re-prompts for encrypted attachments after incorrect passwords" test to fail, since the `INCORRECT_PASSWORD` password reason was being accidentally "swallowed" in the worker-thread.
2026-06-10 23:08:34 +02:00
Jonas Jenwald
ac64bcfa2b
Merge pull request #21427 from Snuffleupagus/putBinaryImageData-convertBlackAndWhiteToRGBA
Use the `convertBlackAndWhiteToRGBA` helper with grayscale images in `putBinaryImageData`
2026-06-10 21:23:03 +02:00
Jonas Jenwald
d1926fb179 Use the convertBlackAndWhiteToRGBA helper with grayscale images in putBinaryImageData
This removes a little bit of code duplication, which only exist since the `src/display/canvas.js` code pre-dates the helper function by many years.

*Note:* Given that `OffscreenCanvas` is enabled by default there's currently not a lot of test coverage for this code-path, hence the added browser-test.
2026-06-10 18:31:07 +02:00
Jonas Jenwald
a543d0a2e0 [api-minor] Remove the unused convertToViewportRectangle method in the PageViewport class
This method has been completely unused for many years, possibly as far back as PR 8030, hence we can avoid shipping a little bit of dead code.

*Note:* If there's any third-party code depending on it, updating it ought to be as simple as changing
```javascript
const r = viewport.convertToViewportRectangle(rect);
```
into
```javascript
const r = [
  ...viewport.convertToViewportPoint(rect[0], rect[1]),
  ...viewport.convertToViewportPoint(rect[2], rect[3])
];
```
2026-06-10 14:19:20 +02:00
calixteman
ce08a803c4
Merge pull request #21416 from calixteman/drop-css-unsafe-inline
Drop 'unsafe-inline' from the CSP style-src directives
2026-06-09 23:16:38 +02:00
calixteman
a13f2aa793
Merge pull request #21413 from calixteman/improve_comb
Improve rendering of comb text fields
2026-06-09 23:10:49 +02:00
Calixte Denizet
fe5eb0f779
Improve rendering of comb text fields
Center each glyph within its comb cell instead of left-aligning it,
both in the HTML annotation layer and in the printed/saved appearance,
to match Acrobat. Cell width is now the single source of truth via the
--comb-width CSS variable, and field text-alignment (center/right) is
applied as a whole-cell --comb-offset that stays in sync on input,
blur, resetform and updatefromsandbox. The field no longer grows on
focus; trailing letter-spacing is clipped and cell dividers are drawn
on focus.
2026-06-09 22:15:40 +02:00
Calixte Denizet
5ca6026d80
Drop 'unsafe-inline' from the CSP style-src directives
The print service injected the per-PDF `@page { size }` rule as an inline
<style> element, which required 'unsafe-inline' on style-src-elem.

Inject it through a constructable CSSStyleSheet attached to
document.adoptedStyleSheets instead. Constructable stylesheets aren't
subject to style-src's inline restrictions in browsers.
2026-06-09 22:08:08 +02:00
calixteman
cb53dbecb9
Merge pull request #21419 from calixteman/chrome_ext_csp
[CRX] List all viewer-accessible schemes in the connect-src CSP
2026-06-09 21:32:08 +02:00
Tim van der Meij
c541d24ac3
Merge pull request #21407 from calixteman/fix_hidden_updated_field
Fix form fields with their own canvas updated on non-rendered pages
2026-06-09 20:03:20 +02:00
Tim van der Meij
29ad297626
Merge pull request #21409 from Snuffleupagus/PDFViewer-#setPrintingAllowed
Add a `PDFViewer` helper method for setting `#printingAllowed` and dispatching the event
2026-06-09 19:43:26 +02:00
Tim van der Meij
8a80f1b8b7
Merge pull request #21418 from Snuffleupagus/getAttachments-Map
[api-minor] Convert `getAttachments` to return data in a `Map`
2026-06-09 19:42:23 +02:00
Tim van der Meij
7f5b42140d
Merge pull request #21414 from calixteman/issue21406
Handle TR2 with /Default entry
2026-06-09 19:26:57 +02:00
Tim van der Meij
9e5cbcef50
Merge pull request #21421 from mozilla/dependabot/github_actions/github/codeql-action-4.36.1
Bump github/codeql-action from 4.36.0 to 4.36.1
2026-06-09 19:24:13 +02:00
Tim van der Meij
cf8677154b
Merge pull request #21420 from mozilla/dependabot/github_actions/actions/checkout-6.0.3
Bump actions/checkout from 6.0.2 to 6.0.3
2026-06-09 19:23:29 +02:00
calixteman
3602db7456
[CRX] List all viewer-accessible schemes in the connect-src CSP 2026-06-09 16:55:19 +02:00
dependabot[bot]
5140371ebe
Bump github/codeql-action from 4.36.0 to 4.36.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.36.0 to 4.36.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7211b7c807...87557b9c84)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 12:14:30 +00:00
dependabot[bot]
380c4c8139
Bump actions/checkout from 6.0.2 to 6.0.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](de0fac2e45...df4cb1c069)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 12:13:07 +00:00
Jonas Jenwald
ea139e7df1 [api-minor] Convert getAttachments to return data in a Map
Compared to regular `Object`s there's a number of advantages to using `Map`s:
 - They support "proper" iteration.
 - They have a simple way to check for the existence of data.
 - They have a simple/efficient way to check the number of elements.

If this functionality was added today, I cannot imagine that we'd choose an `Object` for this sort of data.
Furthermore, in PR 21351 the data returned by `getAttachments` changed slightly and third-party users will need to update their code anyway (hence why `[api-minor]` should be fine here).
2026-06-09 10:17:23 +02:00
Calixte Denizet
473b53fe3c Handle TR2 with /Default entry
It fixes #21406.
2026-06-08 19:09:45 +02:00
calixteman
ea4fe68c01
Merge pull request #21405 from Snuffleupagus/scripting-rm-getOrInsertComputed-polyfill
Remove the `Map.prototype.getOrInsertComputed` polyfill from the scripting implementation (PR 21399 follow-up)
2026-06-08 17:25:47 +02:00
Calixte Denizet
ecd43bc8e1 Fix form fields with their own canvas updated on non-rendered pages
When a read-only field (which has its own canvas) is updated by the
sandbox while its page isn't rendered, showElementAndHideCanvas
isn't called, so once the page is finally rendered the field still
shows its outdated canvas instead of the new value.

Replace the imperative canvas/element toggling with a `sandboxModified`
class, set from the annotation storage both at render time and on
sandbox updates, and let the CSS show the element and hide the canvas.
2026-06-08 17:22:11 +02:00
calixteman
879437247b
Merge pull request #21408 from wooorm/wooorm/selection-color-transparent
Fix transparent color of `::selection` in Firefox
2026-06-08 16:57:34 +02:00
Jonas Jenwald
f93faae01c Add a PDFViewer helper method for setting #printingAllowed and dispatching the event
This reduces a little bit of code duplication, which shouldn't hurt.
2026-06-08 15:30:05 +02:00
Titus Wormer
7b54ec0a8d
Fix transparent color of ::selection in Firefox
This forces `color: transparent` on selections.
In latest Firefox Nightly, this is no longer inherited on
`::selection` from the normal element.

References: <753827d749>
2026-06-08 15:14:21 +02:00
calixteman
fadd201c09
Merge pull request #21404 from matasaru/master
fixed typo in README.md
2026-06-08 11:56:28 +02:00
Jonas Jenwald
5f83408099 Remove the Map.prototype.getOrInsertComputed polyfill from the scripting implementation (PR 21399 follow-up)
All unit- and integration-tests pass with this patch, and according to the QuickJS changelog this is supported now; note 3d5e064e9d/Changelog (L10) and https://github.com/tc39/proposal-upsert.
2026-06-08 11:48:42 +02:00
calixteman
52a44a68be
Merge pull request #21399 from calixteman/update_quickjs_3d5e064
Update quickjs to rev 3d5e064e9dd67c70f7962836505a7fa067bf0a4e
2026-06-08 10:38:44 +02:00
calixteman
7a7e4fd382 Update quickjs to rev 3d5e064e9dd67c70f7962836505a7fa067bf0a4e 2026-06-08 09:26:36 +02:00
radu
82098f175b fixed typo in README.md 2026-06-07 18:52:07 -04:00
Tim van der Meij
ff88446d01
Merge pull request #21402 from timvandermeij/updates
Update dependencies to the most recent versions
2026-06-07 17:08:06 +02:00
Jonas Jenwald
4a01dd669a
Merge pull request #21400 from Snuffleupagus/workflows-test-external-folder
Run various test-suite when the `external/` folder is modified
2026-06-07 16:52:39 +02:00
Tim van der Meij
4112c2953b
Upgrade @eslint/json to version 2.0.0
This is a major version bump, but the changelog at
https://github.com/eslint/json/releases/json-v2.0.0
doesn't indicate any breaking changes that should impact us.
2026-06-07 16:14:37 +02:00
Tim van der Meij
984fcd4bae
Update dependencies to the most recent versions 2026-06-07 16:13:36 +02:00
Jonas Jenwald
9c0b56ac07 Run various test-suite when the external/ folder is modified
Given that the `external/` folder contains various imported code/resources, all of which could affect functionality and/or rendering, it seems safest to simply run browser/font/integration/unit tests whenever any part of that folder is touched.
2026-06-07 16:03:40 +02:00
Tim van der Meij
f86b5abb05
Merge pull request #21398 from timvandermeij/codecov-ci-fix
Upgrade `codecov/codecov-action` to version 7.0.0
2026-06-07 15:39:39 +02:00
Tim van der Meij
b8ad7c8d0f
Upgrade codecov/codecov-action to version 7.0.0
Codecov had to migrate to a new Keybase account after losing access to
their old Keybase account, and because of that the old account got
bricked to prevent misuse [1] which resulted in GPG verification
failures in our builds [2]. This new version of the action fixes the
issue by using the new account.

Fixes #21394.

[1] https://github.com/codecov/codecov-action/issues/1956
[2] https://github.com/codecov/codecov-action/issues/1955
2026-06-07 14:52:24 +02:00
Tim van der Meij
d9eea18876
Merge pull request #21396 from Snuffleupagus/injectLinkAnnotations-move-call
Prevent intermittent issues when invoking the `PDFPageView.prototype.#injectLinkAnnotations` method
2026-06-07 14:42:14 +02:00
Tim van der Meij
bfc33678da
Merge pull request #21395 from Snuffleupagus/DrawLayerBuilder-cancel-optional-chaining
Shorten the `DrawLayerBuilder.prototype.cancel` method a tiny bit
2026-06-07 14:35:40 +02:00
Jonas Jenwald
43dd2781a0 Prevent intermittent issues when invoking the PDFPageView.prototype.#injectLinkAnnotations method
Looking at the coverage data there are cases where we attempt to insert inferred link-annotations *before* the annotationLayer has rendered, see [here](2348365874/blob/web/annotation_layer_builder.js (L246)), which shouldn't happen and why that's treated as an Error.

This is most likely caused by the asynchronicity of all the relevant code, since the `Autolinker` functionality can only be invoked after both the annotationLayer *and* the textLayer have finished rendering.
Given that those operations are asynchronous, by the time that they complete it's possible that the annotationLayer (and also the textLayer) has been replaced by a new instance. In that case we might thus attempt to inject inferred link-annotations before the "new" annotationLayer has rendered.

To avoid this intermittent issue, we now ensure that the annotationLayer and textLayer haven't changed between those layers rendering and the `Autolinker` functionality being invoked. (If they did change, then a future `render` call will trigger the inferred link-annotations handling).
2026-06-07 11:28:57 +02:00
Jonas Jenwald
0eca809589 Shorten the DrawLayerBuilder.prototype.cancel method a tiny bit
By replacing the early return with optional chaining, a pattern that we already use in lots of places, the code becomes a tiny bit shorter and more importantly the code coverage for this file becomes 100 percent.
2026-06-06 23:41:31 +02:00
Tim van der Meij
f12c463452
Merge pull request #21393 from Snuffleupagus/PDFCursorTools-tests
Add basic integration-tests for the `PDFCursorTools` functionality
2026-06-06 19:51:52 +02:00
Tim van der Meij
81f15c3437
Merge pull request #21390 from Snuffleupagus/getDocument-binary-string-unit-test
Add a unit-test for passing a binary string to `getDocument`
2026-06-06 19:46:45 +02:00
Tim van der Meij
f4d6b4ef85
Merge pull request #21391 from Snuffleupagus/getDocument-Node-fs-unit-test
Add a unit-test for passing a filesystem URL-string (in Node.js) to `getDocument`
2026-06-06 19:45:26 +02:00
Jonas Jenwald
0b3b101dbc Remove the unused GrabToPan.prototype.toggle method
Given that the cursor tools are managed via the `PDFCursorTools` class, of which the `GrabToPan` instance is essentially a (semi) private implementation detail, the `GrabToPan.prototype.toggle` method is completely unused and can thus be removed.
2026-06-06 17:27:19 +02:00
Jonas Jenwald
a5333f2a92 Add a unit-test for passing a binary string to getDocument
This format is obviously not very efficient however it's been supported since "forever" and there's even examples using, hence it seems like a good idea to actually test this.
2026-06-06 14:37:25 +02:00
Jonas Jenwald
ae30748956 Add basic integration-tests for the PDFCursorTools functionality 2026-06-06 14:32:15 +02:00
calixteman
2348365874
Merge pull request #21392 from Snuffleupagus/Autolinker-invalid-email-domain-test
Add one more unit-test case for invalid email domains in the `Autolinker` class
2026-06-06 13:17:11 +02:00
Jonas Jenwald
08b704d4b1 Add one more unit-test case for invalid email domains in the Autolinker class
This improves coverage for a branch of the `Autolinker` class that wasn't previously tested.
2026-06-06 11:57:22 +02:00
Jonas Jenwald
a7d32f4518 Add a unit-test for passing a filesystem URL-string (in Node.js) to getDocument
This improves coverage for a part of the API that previously wasn't tested.
2026-06-05 23:17:11 +02:00
Tim van der Meij
9c437e6ab4
Merge pull request #21388 from calixteman/strip_jbig2_header
Strip the JBIG2 file header from JBIG2Decode streams
2026-06-05 20:06:02 +02:00
Tim van der Meij
4ed78beb38
Merge pull request #21387 from Snuffleupagus/ChunkedStream-abort-reject
Reject the stream-capability when aborting the `ChunkedStreamManager`
2026-06-05 20:02:02 +02:00
Tim van der Meij
e34e11cf78
Merge pull request #21386 from KonstantinRight/print-params-flag-fix
fix typo in bit flag value for suppressCropClip
2026-06-05 19:58:58 +02:00
Tim van der Meij
c8fb1be7b6
Merge pull request #21389 from calixteman/readme_ccov
Update the README in order to add some info about code coverage
2026-06-05 19:57:18 +02:00
Calixte Denizet
9ab6b743ea Update the README in order to add some info about code coverage 2026-06-05 17:45:20 +02:00
calixteman
173e083c71
Merge pull request #21350 from calixteman/kb_shortcuts_l10n
Match editor keyboard shortcuts by event.code as a fallback
2026-06-05 17:19:17 +02:00
Calixte Denizet
88c52a1523 Strip the JBIG2 file header from JBIG2Decode streams
It's rendering correctly in Acrobat and PdfBox.
2026-06-05 16:31:44 +02:00
Jonas Jenwald
959ce38f5b Reject the stream-capability when aborting the ChunkedStreamManager
Given that any incoming data is already being ignored after loading has been aborted, it seems reasonable to reject the stream-capability to avoid it remaining in a pending state indefinitely.

*Note:* This is something that I noticed while looking at the coverage data, since the `ChunkedStreamManager.prototype.onError` method is not used and from a brief look at the history of the code it never appears to have been used either.
2026-06-05 12:25:53 +02:00
Konstantin
a66782615e fix typo in bit flag value for suppressCropClip 2026-06-05 11:30:20 +03:00
calixteman
091f459d2e
Merge pull request #21358 from sfoster/bug-203525-viewer-favicon
Bug 2035251 - Use toolkit's pdf icon as favicon
2026-06-04 21:35:28 +02:00
Tim van der Meij
23ea0810d9
Merge pull request #21379 from calixteman/dedup_stream_merging
Deduplicate shared font/image streams when merging PDFs
2026-06-04 20:58:22 +02:00
Sam Foster
b9e3a6b5d0 Bug 2035251 - Use toolkit's pdf icon as favicon 2026-06-04 11:58:12 -07:00
Tim van der Meij
7f15bd6591
Merge pull request #21383 from calixteman/ko_inner_bd
Add knockout_inner_backdrop ref test
2026-06-04 20:41:50 +02:00
Tim van der Meij
dc3696f23c
Merge pull request #21384 from Snuffleupagus/Stream-getBytes-shorten
Shorten the `getBytes` method in the `Stream`/`ChunkedStream` classes
2026-06-04 20:41:07 +02:00
Tim van der Meij
0cc139fdfc
Merge pull request #21385 from Snuffleupagus/AppOptions-unittest-EVENT_DISPATCH
Extend the `AppOptions` unit-tests to also cover the `EVENT_DISPATCH` option-kind
2026-06-04 20:36:17 +02:00
Tim van der Meij
d619ff3207
Merge pull request #21380 from Snuffleupagus/AnnotationLayerBuilder-rm-#externalHide
Remove the `#externalHide` field from the `AnnotationLayerBuilder` class
2026-06-04 20:35:14 +02:00
Tim van der Meij
f45a1b4df5
Merge pull request #21382 from mozilla/dependabot/github_actions/github/codeql-action-4.36.0
Bump github/codeql-action from 4.35.5 to 4.36.0
2026-06-04 20:32:41 +02:00
Jonas Jenwald
dc602ae543 Extend the AppOptions unit-tests to also cover the EVENT_DISPATCH option-kind 2026-06-04 17:51:41 +02:00
Jonas Jenwald
d36d3ab893 Shorten the getBytes method in the Stream/ChunkedStream classes
This is very old code and there's currently a bit of unneeded duplication in these methods, especially in the `ChunkedStream` class.
2026-06-04 13:10:24 +02:00
Calixte Denizet
e4a3e91444 Add knockout_inner_backdrop ref test
Non-isolated subgroup needing isolation (Multiply BM) nested in a KO
group, exercising the inner-backdrop blend path.
2026-06-04 09:13:43 +02:00
dependabot[bot]
936a472f05
Bump github/codeql-action from 4.35.5 to 4.36.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.5 to 4.36.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e0d7b8d25...7211b7c807)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:19:24 +00:00
calixteman
9071f451a5
Merge pull request #21359 from Snuffleupagus/coverage-browser-tests
Run browser tests to collect code coverage data
2026-06-03 19:01:52 +02:00
Jonas Jenwald
890edc9265 Run browser tests to collect code coverage data
Obviously it's not yet possible to just migrate `gulp browsertest` to GitHub Actions, however it's already possible to at least run the browser tests there which allows collection of more code coverage data.
This should thus give us more realistic coverage numbers, since currently there's many `src/` files that have very low code coverage.

By taking advantage of the fact that the GitHub Actions runners provide multiple cores, these tests are also fairly fast:
 - The ubuntu-latest/firefox job complete in ~9 minutes.
2026-06-03 18:15:18 +02:00
Jonas Jenwald
b168293c17
Merge pull request #21351 from wooorm/wooorm/auth-event-and-encrypted-attachments
[api-minor] Add support for `/AuthEvent`, on-demand decryption
2026-06-03 18:13:44 +02:00
Titus Wormer
4db9e45b8c
Add support for /AuthEvent, on-demand decryption
Normally entire PDFs are encrypted (or not).
But it is also possible to only encrypt attachments.
It is then also possible to *only* prompt for a password when the user opens
them.

In the existing flow, prompting for passwords happens because things are decrypted.
A specific error is thrown, caught, and the user is prompted.
To keep this flow working, this PR changes to decrypting attachments on demand,
instead of eagerly.
This sounds logical: to not read attachments on startup.

I’ve extensively tested this, not only with regular attachments, but also with outline items
and attachments in annotations.

This PR builds on GH-21234.
It’s an alternative to the naïve GH-20732.

Closes GH-20049.
2026-06-03 16:44:57 +02:00
Jonas Jenwald
5907d87774 Remove the #externalHide field from the AnnotationLayerBuilder class
Prior to PR 20321 the annotationLayer was hidden when there was no regular annotations on the page, which meant that if there were any inferred links (from the textLayer) the annotationLayer needed to be made visible but in such a way that it wouldn't override an explicit `hide`-call from the `PDFPageView` class.

With the changes in the aforementioned PR the annotationLayer is now always "visible", and this code can thus be simplified a little bit.
2026-06-03 13:56:43 +02:00
Calixte Denizet
836a08084e Match editor keyboard shortcuts by event.code as a fallback
So that Ctrl+A, Ctrl+Z, etc. still fire on non-US keyboard layouts where
the physical "A" key produces a non-Latin character (Cyrillic, Greek,
some AZERTY combinations, ...). KeyboardManager now tries event.key first
and falls back to a US-layout translation of event.code (KeyA => a,
Digit1 => 1, Numpad1 => 1) when no shortcut is bound on event.key.

Also refactors KeyboardManager to store modifiers as a bitmask instead
of a serialized string, and treats a shortcut array without any
"mac+"-prefixed entry as applying on all platforms, letting us drop the
redundant "mac+X" duplicates of bare "X" entries across the editor code.
2026-06-03 10:13:41 +02:00
Calixte Denizet
1a7821ab13 Deduplicate shared font/image streams when merging PDFs
Identical embedded fonts and images across the merged documents are now
written once and shared, instead of being copied per source file.
And avoid to compress already compressed stream with Brotli.
2026-06-02 22:08:21 +02:00
Jonas Jenwald
19046a6949
Merge pull request #21349 from Snuffleupagus/OptionalContentConfig-serializable
Implement proper serialization of `OptionalContentConfig`
2026-06-02 21:57:16 +02:00
Tim van der Meij
e9a946ec0b
Merge pull request #21378 from wooorm/wooorm/fix-selection-rendering-off
Fix broken `enableSelectionRendering: false`
2026-06-02 21:02:18 +02:00
Tim van der Meij
744c1e6d7a
Merge pull request #21372 from calixteman/issue7998
Render gray transparency groups in grayscale
2026-06-02 20:10:18 +02:00
Tim van der Meij
e9ee61f67c
Merge pull request #21347 from calixteman/issue21240
Restore editor layer state for unchanged pages after page mutations
2026-06-02 20:08:14 +02:00
Tim van der Meij
27b345a61e
Merge pull request #21361 from timvandermeij/is-canvas-monochrome
Fix intermittent failure in the "must check that a freetext is still here after having updated it and scroll the doc" freetext editor integration test
2026-06-02 20:01:24 +02:00
Titus Wormer
a8cf37f6bc
Fix broken enableSelectionRendering: false
Closes GH-21374.
Related-to GH-20981.
2026-06-02 12:57:04 +02:00
Jonas Jenwald
b43ef1c746
Merge pull request #21373 from Snuffleupagus/presentation-mode-test-links
Add an integration-test for clicking on internal links in presentation mode
2026-06-02 10:56:14 +02:00
Jonas Jenwald
065ea625dd
Merge pull request #21371 from Snuffleupagus/BaseStream-clone-fix
Improve the `BaseStream.prototype.clone` implementations
2026-06-02 10:54:36 +02:00
Jonas Jenwald
4e6b7be4d7 Add an integration-test for clicking on internal links in presentation mode 2026-06-01 14:25:55 +02:00
calixteman
69e8d6900f Render gray transparency groups in grayscale
It fixes #7998.
2026-05-31 21:16:29 +02:00
Jonas Jenwald
a6321e7201 Improve the BaseStream.prototype.clone implementations
- The `dict` field is optional, hence avoid an Error if trying to clone a non-existent dictionary.

 - Use the `length` getter in the `Stream` class, to avoid duplication.

 - Fix the `DecodeStream` implementation, since it has a couple of bugs:
    - The `clone` method currently uses `start`/`end` fields, despite these only existing on `Stream` instances.
    - Given the previous point, we ended up creating the cloned `Stream` instance using the *entire* underlying `buffer`. This is problematic since the length of a `DecodeStream` cannot be accurately estimated before decoding, and the `buffer`-length is simply a multiple of two.
       Unless the size of the decoded-data just happens to also be a multiple of two, this causes the cloned `Stream` instance to be "padded" with zeros at the end.
2026-05-31 20:24:39 +02:00
Tim van der Meij
5fbab91f71
Merge pull request #21368 from Snuffleupagus/more-internal-events
Mark a couple of viewer, and editor, EventBus listeners as "internal"
2026-05-31 14:35:18 +02:00
Jonas Jenwald
94fdea15f4
Merge pull request #21366 from Snuffleupagus/StringStream-dict
Update the `StringStream` constructor to accept an optional dictionary argument
2026-05-31 13:01:43 +02:00
Jonas Jenwald
04237100a5 Mark a couple of viewer, and editor, EventBus listeners as "internal"
There's currently a few EventBus listeners that aren't marked as "internal", however I'm assuming that they probably should be (e.g. to reduce the risk of intermittent failures in the integration-tests).
2026-05-31 12:12:41 +02:00
Jonas Jenwald
345089de1f
Merge pull request #21367 from Snuffleupagus/canvas-MathClamp
Use the `MathClamp` helper function in the `src/display/canvas.js` file
2026-05-31 11:55:48 +02:00
Tim van der Meij
add30f3ca0
Fix intermittent failure in the "must check that a freetext is still there after having updated it and scroll the doc" freetext editor integration test
The problem is that we screenshot the page itself rather than the
canvas, even though we specifically care about the latter according to
the comment, which means that we manually have to take care of hiding and
showing the annotation editor. This is problematic because even though
we signal that the annotation editor should be hidden, we don't wait
until that is actually done, which leads to a situation where we can
take the screenshot before the annotation editor is actually invisible
in the view.

This commit fixes the issue by screenshotting the canvas instead, which
avoids the need for manually hiding/showing the annotation editor. This
makes the test less fragile, and matches other tests better.
2026-05-31 11:36:44 +02:00
Jonas Jenwald
06439a95c3 Update the StringStream constructor to accept an optional dictionary argument
There's currently some amount of `StringStream` usage where the `dict`-parameter is manually assigned, and by updating the signature of the constructor this can be avoided.
2026-05-31 11:36:32 +02:00
Tim van der Meij
327822c21f
Merge pull request #21365 from calixteman/cmap_overflow
Skip the format 4 cmap sub-table when it doesn't fit its 16-bits fields
2026-05-31 11:32:58 +02:00
Tim van der Meij
af2380060a
Merge pull request #21364 from timvandermeij/webgpu-logs
Disable WebGPU for Firefox tests
2026-05-31 11:19:22 +02:00
Jonas Jenwald
0e1660700a Use the MathClamp helper function in the src/display/canvas.js file 2026-05-31 11:13:42 +02:00
calixteman
5d28cf5e88 Skip the format 4 cmap sub-table when it doesn't fit its 16-bits fields
It's a follow-up of bug 199861 (see https://bugzilla.mozilla.org/show_bug.cgi?id=1998618#c2).
2026-05-30 21:53:29 +02:00
Tim van der Meij
eef4ea620e
Disable WebGPU for Firefox tests
The GitHub Actions workflow for the integration tests on Windows logs
the following line for every test:

`JavaScript warning: http://127.0.0.1:62313/build/generic/build/pdf.mjs,
line 134934: WebGPU is disabled by blocklist.`

On Linux WebGPU is disabled by default because of missing support, but on
Windows it's enabled by default since bug 1972486, so we try to obtain a
GPU adapter which fails (and logs) if there is no actual GPU like on
GitHub Actions. Coverage data confirms that our own WebGPU code is
already uncovered because of the lack of a GPU, so having WebGPU enabled
or disabled doesn't change that, but if it causes log spam it seems
better to disable it, which this commit does.

Note that Chrome doesn't seem to have a matching flag, but Chrome already
doesn't log anything about this (which is the primary driver for this
change), so that's not a problem.
2026-05-30 19:30:24 +02:00
Tim van der Meij
145feeaa3f
Merge pull request #21360 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-05-30 15:19:21 +02:00
Tim van der Meij
6701ccd86b
Bump the stable version in pdfjs.config 2026-05-30 15:14:47 +02:00
Jonas Jenwald
241dbabbf1
Merge pull request #21355 from Snuffleupagus/INTERNAL_EVT
Re-factor how "internal" EventBus listeners are handled in the viewer
2026-05-30 11:39:22 +02:00
Jonas Jenwald
74db085794 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.
2026-05-29 22:11:58 +02:00
Tim van der Meij
19d95c8fee
Merge pull request #21285 from timvandermeij/puppeteer-25
Upgrade Puppeteer to version 25.1.0
2026-05-29 21:09:24 +02:00
Tim van der Meij
b9b7661e64
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.
2026-05-29 20:24:42 +02:00
Tim van der Meij
e7f951dc1b
Merge pull request #21357 from timvandermeij/fix-browser-test-exit-code
Fix missing non-zero exit code for failure cases in `test.mjs`
2026-05-29 20:23:22 +02:00
Tim van der Meij
8d5fe521b3
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.
2026-05-29 19:24:31 +02:00
calixteman
80c8e62e65
Merge pull request #21308 from calixteman/bug2036265
Add a pref to postMessage when mozPrintCallback has completed (bug 2036265)
2026-05-29 14:32:29 +02:00
calixteman
c7a32c3db6
Merge pull request #21343 from calixteman/issue9437
Clamp out-of-range BlueScale to Adobe's valid window
2026-05-29 08:58:05 +02:00
calixteman
3fe3321f7a
Merge pull request #21334 from calixteman/merge_images
Allow inserting an image as a new page when editing a PDF (bug 2032967)
2026-05-29 08:22:53 +02:00
calixteman
3e76bfd364
Merge pull request #21354 from mozilla/update-locales
l10n: Update locale files
2026-05-29 08:17:11 +02:00
github-actions[bot]
fc6e19b9cb l10n: Update locale files 2026-05-29 00:55:59 +00:00
Calixte Denizet
600986b51d 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.
2026-05-28 22:11:13 +02:00
calixteman
389853d473
Merge pull request #21336 from calixteman/issue15292
Parse CID-keyed Type 1 fonts instead of falling back to a system font
2026-05-28 21:45:30 +02:00
Tim van der Meij
7d305ff281
Merge pull request #21335 from calixteman/multiple_merge
Allow merging several PDFs at once via the picker or drag-and-drop
2026-05-28 21:01:05 +02:00
Tim van der Meij
be8a8c4309
Merge pull request #21348 from calixteman/issue21346
Use a black backdrop for Luminosity SMasks when /BC is missing
2026-05-28 20:46:47 +02:00
Tim van der Meij
5d7ec1fb79
Merge pull request #21345 from mozilla/dependabot/github_actions/codecov/codecov-action-6.0.1
Bump codecov/codecov-action from 6.0.0 to 6.0.1
2026-05-28 20:42:47 +02:00
Tim van der Meij
6e9ee9fcdc
Merge pull request #21344 from mozilla/dependabot/github_actions/github/codeql-action-4.35.5
Bump github/codeql-action from 4.35.4 to 4.35.5
2026-05-28 20:42:09 +02:00
calixteman
974f98613f
Merge pull request #21234 from wooorm/wooorm/encrypted-attachments
Add support for encrypted attachments
2026-05-28 16:07:00 +02:00
Titus Wormer
45cdb5d3e8
Add support for encrypted attachments
This PR is related to GH-20732, which is about `AuthEvent` (to delay
promting for a password), but instead adds the actual support for
encrypted attachments.
“Encrypted attachments” means that the main things are plain text.
Note that some PDF viewers, like Preview/QuickLook/Safari or Chrome,
do not support attachments at all.
Note that the file checked into the tests is the same as
`output-no-auth-event.pdf` referenced in
<https://github.com/mozilla/pdf.js/issues/20139#issuecomment-3952462166>.

Closes GH-20139.
2026-05-28 10:30:37 +02:00
Jonas Jenwald
ce45d5a443 Implement proper serialization of OptionalContentConfig
I happened to notice that the way the `OptionalContentConfig`-data handled in the PR that implements worker-rendering leaves a lot to be desired:
 - The way that the optional content state is handled is not correct, since that PR collects the "effective visibility" of the optional content groups rather than their *actual* internal state.

 - The necessary `OptionalContentConfig`-data is collected piecemeal in the API, which leads to quite frankly very messy code that's hard to read and will be even harder to maintain.

The solution to all of these issues seem really simple though, just add a couple of `OptionalContentConfig` methods that serialize/de-serialize the necessary data.
In the API calling `optionalContentConfig.serializable` will get *all* of the needed data for transferring to the worker-renderer, and once received there calling `OptionalContentConfig.fromSerializable(/* transferred data here */)` will create an `OptionalContentConfig` instance with the correct internal state.

As part of this patch, to avoid increasing bundle-size unnecessarily, a couple of existing methods are stubbed out when the `OptionalContentConfig` class ends up in a worker-file (since they're unused there).
This part assumes that the new worker-renderer is built correctly, note how the existing `pdf.worker.mjs` is handled in 03eda70d7e/gulpfile.mjs (L539-L545)

(*Note:* Submitting a PR was a lot faster than trying to provide review comments, since writing this commit message took longer than writing the patch.)
2026-05-27 11:06:57 +02:00
Calixte Denizet
a33e06cafb Use a black backdrop for Luminosity SMasks when /BC is missing
It fixes #21346.
2026-05-26 22:36:50 +02:00
Calixte Denizet
8e6e35473f Restore editor layer state for unchanged pages after page mutations
It fixes #21240.
2026-05-26 22:27:35 +02:00
dependabot[bot]
8666bca8ae
Bump codecov/codecov-action from 6.0.0 to 6.0.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](57e3a136b7...e79a6962e0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 19:41:27 +00:00
dependabot[bot]
e1ddc6614b
Bump github/codeql-action from 4.35.4 to 4.35.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.4 to 4.35.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](68bde559de...9e0d7b8d25)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-26 19:41:13 +00:00
calixteman
385b1ca412 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.
2026-05-26 21:24:51 +02:00
Jonas Jenwald
b849567c10
Merge pull request #21342 from mozilla/revert-21339-remove-unused-variables
Revert "Remove unused variables with the Babel plugin"
2026-05-26 21:04:45 +02:00
Jonas Jenwald
6d8d6f1349
Revert "Remove unused variables with the Babel plugin" 2026-05-26 21:00:25 +02:00
Jonas Jenwald
6a1368ad81
Merge pull request #21339 from nicolo-ribaudo/remove-unused-variables
Remove unused variables with the Babel plugin
2026-05-26 18:59:32 +02:00
calixteman
e1de5c30b5 Parse CID-keyed Type 1 fonts instead of falling back to a system font
It fixes #15292.

PDFs can embed a CID-keyed Type 1 program (Adobe TechNote 5014,
CIDFontType 0) under /Subtype /CIDFontType0 + /FontFile. Its binary
CIDMap/SubrMap layout has no eexec block, so Type1Font's eexec-only
parser used to fall through and trigger the work-around added in
PR #15397.
Split the constructor and parse the binary CIDMap, SubrMap
and charstrings (encrypted with the standard Type 1 charstring cipher)
through the existing Type1CharString.convert + CFF wrap pipeline.

Only single-FDArray fonts are supported; the StartData length is
clamped to the stream's remaining bytes before allocating.
2026-05-26 17:49:56 +02:00
Nicolò Ribaudo
2691868904 Remove unused variables with the Babel plugin
- functions were already removed
- variables can be removed when their initializer does not have side effects
- classes can be removed when they have no static blocks

Fixes #21337
2026-05-26 16:35:57 +02:00
calixteman
03eda70d7e
Merge pull request #21340 from Snuffleupagus/test-modified-external-builder
Run unit-tests and integration-tests when the `external/builder/` folder is changed
2026-05-26 16:14:36 +02:00
Jonas Jenwald
927da8c78e Run unit-tests and integration-tests when the external/builder/ folder is changed
Given that changes to either the Babel plugin or the "old" builder could accidentally cause issues in the built files, it seems like a good idea to run all test-suites when the `external/builder/` folder is changed.
2026-05-26 15:12:22 +02:00
Calixte Denizet
6b92ad5924 Allow merging several PDFs at once via the picker or drag-and-drop 2026-05-25 21:09:42 +02:00
Tim van der Meij
e7661983f7
Merge pull request #21333 from calixteman/fix_test_timeout
Recover the browser session on test timeout to keep running subsequent tests
2026-05-25 18:27:31 +02:00
Tim van der Meij
d1c85f87f7
Merge pull request #21330 from calixteman/fix_regex
Enable 'eslint-plugin-regexp' and fix existing findings
2026-05-25 18:22:21 +02:00
Calixte Denizet
91ca580f31 Recover the browser session on test timeout to keep running subsequent tests
When a reftest hangs and trips the per-browser timeout, the session was
closed, which left every remaining task in the per-browserType queue with
no consumer and effectively skipped the rest of the manifest. Instead,
mark the in-flight task(s) as failed, reload the page so the driver can
reconnect and request the next task, and only fall back to closing the
session if the reload itself fails.
2026-05-25 16:50:55 +02:00
calixteman
f82382e010
Merge pull request #21331 from calixteman/fix_cjk_file
Load the predefined CMap for composite fonts that omit the FontDescriptor
2026-05-25 16:40:11 +02:00
Jonas Jenwald
f156b8190b
Merge pull request #21332 from Snuffleupagus/direct-return
Avoid a temporary variable and return results directly in a couple of functions
2026-05-25 16:14:15 +02:00
Calixte Denizet
567f585def 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>
2026-05-25 15:42:19 +02:00
Jonas Jenwald
48a12ac225 Avoid a temporary variable and return results directly in a couple of functions 2026-05-25 15:33:39 +02:00
Calixte Denizet
8f85e3f20b Load the predefined CMap for composite fonts that omit the FontDescriptor
and add font substitutions for the standard Acrobat CJK families.
2026-05-25 14:44:48 +02:00
calixteman
164ffb9042
Merge pull request #21321 from danyalahmed1995/fix/issue-21259-text-layer-spacing
Prevent inherited spacing from affecting text layer
2026-05-25 14:36:22 +02:00
Calixte Denizet
7bda0fc97c Enable 'eslint-plugin-regexp' and fix existing findings
Enable the recommended preset and fix or per-line-disable the 78
findings it surfaces. Most are equivalent rewrites, intentional
patterns (control chars, the whatwg email regex, autolinker URL regex)
keep their behavior via targeted disables.
2026-05-25 14:31:55 +02:00
Tim van der Meij
87b436ddd4
Merge pull request #21329 from calixteman/fix_selection_color
Force the text selection color to be in light mode
2026-05-25 13:59:13 +02:00
Calixte Denizet
f7af3ea9ac Force the text selection color to be in light mode
Most of the pdfs have a white background, so it makes sense to use the colors for light mode.
2026-05-25 12:59:54 +02:00
calixteman
1cb14a02d3
Merge pull request #21314 from calixteman/issue21312
Recover CFF FontBBox with negative coordinates encoded as unsigned 16-bit
2026-05-25 08:57:43 +02:00
Calixte Denizet
9391296036 Recover CFF FontBBox with negative coordinates encoded as unsigned 16-bit
It fixes #21312.
2026-05-25 08:36:18 +02:00
calixteman
5f2691e77d
Merge pull request #21328 from timvandermeij/updates
Update dependencies to the most recent versions
2026-05-25 08:33:34 +02:00
Danyal Ahmed
4ee9c39fc8 Prevent inherited spacing from affecting text layer
Fixes #21259.

Reset letter-spacing and word-spacing on the text layer and hidden measurement canvas so inherited page styles do not affect text layer alignment. Add an integration regression test for inherited spacing.
2026-05-24 23:56:23 +05:00
Tim van der Meij
33d8f45fc5
Fix vulnerabilities in dependency versions
This patch is generated automatically using `npm audit fix`, and brings
the number of reported vulnerabilities back to zero by patching:

- GHSA-jxxr-4gwj-5jf2: "brace-expansion: Large numeric range defeats
  documented `max` DoS protection"
- GHSA-58qx-3vcg-4xpx: "ws: Uninitialized memory disclosure"
2026-05-24 19:34:07 +02:00
Tim van der Meij
f1f8e2c04e
Upgrade postcss-values-parser to version 8.0.0
This is a major version bump, but the changelog at
17304bbe9c
doesn't indicate any breaking changes that should impact us.
2026-05-24 19:29:57 +02:00
Tim van der Meij
0fa006997b
Update dependencies to the most recent versions 2026-05-24 19:29:09 +02:00
Tim van der Meij
e6cb600896
Merge pull request #21320 from calixteman/issue7625
Substitute a system font when an embedded CFF is truncated
2026-05-24 19:00:50 +02:00
calixteman
adcde1175e Substitute a system font when an embedded CFF is truncated
It fixes #7625.

If the Top DICT's Private DICT extends past the end of the font data,
the Local Subrs INDEX is unreachable and every CharString that calls
a subr ends up as a blank glyph. Throw from parsePrivateDict so the
existing catch in translateFont triggers fallbackToSystemFont, then
run getFontSubstitution post-construction so we pick a close local
match instead of the generic fallbackName.
2026-05-24 18:10:09 +02:00
calixteman
143a7244a3
Merge pull request #21315 from calixteman/issue18548
Keep the first /Subrs and /CharStrings block
2026-05-24 18:07:20 +02:00
Tim van der Meij
13a61b1f72
Merge pull request #21319 from Snuffleupagus/XRefWrapper-fix
Fix the `XRefWrapper` implementation, in the `src/core/editor/pdf_editor.js` file
2026-05-24 15:06:22 +02:00
Tim van der Meij
941e17296e
Merge pull request #21313 from Snuffleupagus/Annotation-OC
Add support for Optional Content in the AnnotationLayer (issue 20433)
2026-05-24 15:02:06 +02:00
calixteman
1f8eed020f Keep the first /Subrs and /CharStrings block
Some Type1 fonts (the embedded Optima variants in orw1972.pdf) ship
two /Subrs and /CharStrings blocks wrapped in save/restore frames
gated on an Adobe hires/lores runtime switch.
In such cases, we just use the first /Subrs and /CharStrings block,
which is the one that is actually used by the font renderer in Acrobat.

It fixes #18548.
2026-05-24 15:01:22 +02:00
Tim van der Meij
bbfbe5159c
Merge pull request #21324 from Snuffleupagus/scaleCharBBox
Simplify how the character BBox is scaled in `src/display/canvas_dependency_tracker.js`
2026-05-24 14:41:34 +02:00
Tim van der Meij
4daca805d6
Merge pull request #21323 from Snuffleupagus/integration-test-more-fromBase64
Use `Uint8Array.fromBase64` in the `test/integration/highlight_editor_spec.mjs` file
2026-05-24 14:37:27 +02:00
Tim van der Meij
d37e0b40a5
Merge pull request #21317 from Snuffleupagus/XfaLayerBuilder-render-shorten
Shorten the `XfaLayerBuilder.prototype.render` method
2026-05-24 14:36:33 +02:00
Tim van der Meij
46b16bd42e
Merge pull request #21322 from Snuffleupagus/fontFile-lookup-shorten
Shorten the `fontFile` lookup a tiny bit
2026-05-24 14:33:25 +02:00
Jonas Jenwald
59086fa582 Simplify how the character BBox is scaled in src/display/canvas_dependency_tracker.js
In many/most PDF documents every glyph will require that the character BBox has scaling/offset applied, which can be made a tiny bit more efficient. In particular:
 - Avoid creating one additional temporary Array for every glyph.
 - Simplify the helper function, since there's no skew-components.
2026-05-24 12:32:19 +02:00
Jonas Jenwald
057507f6ce Use Uint8Array.fromBase64 in the test/integration/highlight_editor_spec.mjs file 2026-05-24 10:56:51 +02:00
Jonas Jenwald
31c6561b91 Shorten the fontFile lookup a tiny bit
Rather than effectively duplicating code, we can use a loop instead.
2026-05-24 10:19:34 +02:00
Jonas Jenwald
05de3c8a88 Fix the XRefWrapper implementation, in the src/core/editor/pdf_editor.js file
When comparing this code with the full `XRef` class it doesn't seem to be entirely correctly implemented, since the `fetch` method is basically doing what the `fetchIfRef` method is intended to do.
2026-05-23 22:40:14 +02:00
calixteman
ea18e73de2
Merge pull request #20542 from calixteman/fontfile3
Use the CFF program directly for CID fonts wrapped in OpenType FontFile3
2026-05-23 21:39:13 +02:00
Jonas Jenwald
bd14524536 Shorten the XfaLayerBuilder.prototype.render method
Given that the "print" intent is handled separately, there's currently a little bit of unnecessary code duplication in this method.
2026-05-23 16:33:23 +02:00
Jonas Jenwald
fb9758303b Add support for Optional Content in the AnnotationLayer (issue 20433) 2026-05-23 12:33:56 +02:00
calixteman
25c7d9eaac
Merge pull request #21316 from mozilla/update-locales
l10n: Update locale files
2026-05-22 08:11:19 +02:00
github-actions[bot]
d8c08b980a l10n: Update locale files 2026-05-22 00:51:32 +00:00
calixteman
98e3a85a44
Merge pull request #21300 from calixteman/issue21298
Sanitize glyf composite cycles, OS/2 length and maxp version mismatches
2026-05-21 21:45:33 +02:00
Calixte Denizet
d6a2b91243 Sanitize glyf composite cycles, OS/2 length and maxp version mismatches
Prune the back-edge components from cyclic composite glyphs in
sanitizeGlyphLocations (leaving non-cyclic siblings intact), reject OS/2
tables whose length is too short for the declared version so a clean
table gets regenerated, and upgrade a version 0.5 maxp table to 1.0 for
TrueType fonts to silence OTS' "wrong maxp version for glyph data".

It fixes #21298.
2026-05-21 21:24:00 +02:00
Tim van der Meij
52d574c539
Merge pull request #21306 from calixteman/dnd_pdf_merging
Allow merging a PDF by dropping it onto the thumbnail viewer
2026-05-21 21:01:42 +02:00
Tim van der Meij
9b5cd3db64
Merge pull request #21304 from Snuffleupagus/PdfTextExtractor-tests
Add basic integration-tests for the `PdfTextExtractor` class
2026-05-21 20:27:53 +02:00
Tim van der Meij
93f01aa412
Merge pull request #21311 from Snuffleupagus/getPdfFilenameFromUrl-test-corrupt-relative
Extend unit-test coverage for the `getPdfFilenameFromUrl` helper function
2026-05-21 20:19:48 +02:00
Tim van der Meij
83c37357dc
Merge pull request #21302 from mozilla/dependabot/github_actions/github/codeql-action-4.35.4
Bump github/codeql-action from 4.35.3 to 4.35.4
2026-05-21 20:18:52 +02:00
Tim van der Meij
223170694c
Merge pull request #21301 from mozilla/dependabot/github_actions/actions/create-github-app-token-3.2.0
Bump actions/create-github-app-token from 3.1.1 to 3.2.0
2026-05-21 20:18:09 +02:00
Tim van der Meij
42db304268
Merge pull request #21305 from Snuffleupagus/integration-test-EventBus-on
Don't use "internal" `EventBus` methods in the integration-tests
2026-05-21 20:17:28 +02:00
calixteman
78cc2e3d38
Merge pull request #21309 from calixteman/issue21307
Fix 'Select all' after #20981
2026-05-21 18:11:56 +02:00
Calixte Denizet
0f90987927 Fix 'Select all' after #20981 2026-05-21 16:39:34 +02:00
Jonas Jenwald
74471651c7 Extend unit-test coverage for the getPdfFilenameFromUrl helper function
Currently there's a couple of branches, specifically for dealing with corrupt URLs, that are not covered by tests.
2026-05-21 14:03:32 +02:00
Calixte Denizet
d79043b3af Allow merging a PDF by dropping it onto the thumbnail viewer
Drop an external PDF anywhere in the views-manager thumbnail
sidebar to merge it at the cursor, rather than always inserting
after the current page via the "Add file" button.

The drop reuses the blue separator from page-move drag so the
user can see exactly where the inserted pages will land, and the
merge path is shared with the existing picker so post-merge
selection/current-page behavior stays consistent.
2026-05-20 18:06:55 +02:00
Jonas Jenwald
429b469ecb Add basic integration-tests for the PdfTextExtractor class 2026-05-20 17:26:50 +02:00
Jonas Jenwald
abe8b564a3 Don't use "internal" EventBus methods in the integration-tests
This way *guarantees* that any and all internal viewer state has been updated first, before any test-specific code runs.
2026-05-20 16:39:21 +02:00
calixteman
5a4d93a238
Merge pull request #20981 from wooorm/wooorm/hcm
Make text selection more visible (bug 1879559)
2026-05-20 15:49:01 +02:00
dependabot[bot]
16a9f1cafc
Bump github/codeql-action from 4.35.3 to 4.35.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.3 to 4.35.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e46ed2cbd0...68bde559de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 23:20:52 +00:00
dependabot[bot]
5b99173043
Bump actions/create-github-app-token from 3.1.1 to 3.2.0
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md)
- [Commits](1b10c78c78...bcd2ba4921)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 23:19:08 +00:00
Tim van der Meij
b13ec1fc3c
Merge pull request #21299 from timvandermeij/disable-gpu
Disable hardware acceleration for Chrome tests
2026-05-19 22:19:32 +02:00
Titus Wormer
957e004e38
Make text selection more visible (bug 1879559)
References <https://bugzilla.mozilla.org/show_bug.cgi?id=1879559>
(“In HCM, the text selection is barely visible”).

Continues work from @calixteman who had a partial patch.

This PR improves viewer text-selection highlighting by rendering
selection shapes in the draw layer.

* add selection overlay rendering in the draw layer
  * significant code relates to selections spanning multiple text
    layers/pages, and edges/end-of-content boundaries
* clear selection on rotate/scale/scroll/spread changes

My main question is: how should it appear?
I don’t have access to the Figma file linked on bugzilla.

In the CSS (`draw_layer-builder.css`) there are 3 blocks:

* default
* `@supports` for browsers supporting `backdrop-filter`
* `forced-colors` mode

So it’s possible to design for those (or more).
Personally, the `backdrop-filter: invert(1)` is the most contrast,
so perhaps it’s better to use something else as the default,
and to use `invert(1)` if high contrast mode is used (maybe with a
`prefers-contrast` media query instead)?
2026-05-19 21:10:12 +02:00
Tim van der Meij
60591388a8
Disable hardware acceleration for Chrome tests
This commit fixes the rendering issue that makes the "must update an
existing annotation" ink editor integration test permafail locally in
Chrome. Note that we already do this for Firefox tests, so this also
improves consistency between the two browsers.

Moreover, improve how we define Chrome options to (similar to their
Firefox counterparts) provide them in a single array, and document the
reasoning for why these options are being set more explicitly.

Fixes #21272.
2026-05-19 21:07:26 +02:00
Jonas Jenwald
f500cffd2e
Merge pull request #21292 from timvandermeij/presentation-mode
Introduce integration tests for the presentation mode functionality
2026-05-19 13:29:45 +02:00
Tim van der Meij
0d69cc4dcf
Introduce integration tests for the presentation mode functionality
This commit provides coverage for the happy flows of basic operations
like entering/exiting and changing pages.
2026-05-18 20:52:00 +02:00
Tim van der Meij
00af75905f
Merge pull request #21295 from Snuffleupagus/PDFDocumentProperties-more-tests
Add more integration-tests, with multi-page documents, for the `PDFDocumentProperties` dialog
2026-05-18 20:24:41 +02:00
Tim van der Meij
9ebee868c9
Merge pull request #21294 from Snuffleupagus/mv-scaleMinMax
Move the `Util.scaleMinMax` helper into `src/display/canvas_dependency_tracker.js`
2026-05-18 20:18:31 +02:00
calixteman
abb8e31408
Merge pull request #21261 from calixteman/bug1960363
Add a Content-Security-Policy to pdf.js' viewer.html (bug 1960363)
2026-05-18 18:24:38 +02:00
Jonas Jenwald
1e62f01773 Improve handling of corrupt pages in the PDFDocumentProperties dialog
If the active page is corrupt that currently results in the entire dialog being "blank", thus providing no information, which seems unfortunate and it's easy enough to only skip `pageSizeField` in that rare case.
2026-05-18 17:38:43 +02:00
Jonas Jenwald
e05b6d6f59 Add more integration-tests, with multi-page documents, for the PDFDocumentProperties dialog
Improve test coverage for multi-page documents, to ensure that:
 - Unnecessary re-parsing is avoided where possible.
 - Rotation, in the viewer, is handled correctly.
 - Different page sizes are handled correctly.
2026-05-18 14:24:05 +02:00
Jonas Jenwald
1e9e8fad7e Add helper functions for opening/closing the document properties dialog during testing
This reduces duplication in the various integration-tests.
2026-05-18 13:31:26 +02:00
Jonas Jenwald
d1da73931a Move the Util.scaleMinMax helper into src/display/canvas_dependency_tracker.js
This method is completely unused in the worker-thread, and it only has a single call-site in the main-thread.
By moving this helper into the `src/display/canvas_dependency_tracker.js` file, the size of the `gulp mozcentral` bundle is reduced by `1220` bytes.
2026-05-18 11:41:37 +02:00
calixteman
deb532334f
Merge pull request #21290 from calixteman/issue20633
Recover CFF private dict defaults zeroed by Ghostscript
2026-05-17 21:57:16 +02:00
calixteman
cd8a78c4e2
Recover CFF private dict defaults zeroed by Ghostscript
It fixes the issue #20633.
2026-05-17 20:51:35 +02:00
Tim van der Meij
2fb2bc13e0
Merge pull request #21275 from timvandermeij/integration-tests-optimize
Optimize runtime and memory usage of the integration tests
2026-05-17 20:41:43 +02:00
Tim van der Meij
f2bf57f444
Merge pull request #21288 from timvandermeij/unskip-test
Enable the `must check that an existing highlight is ignored on hovering` integration test on Windows
2026-05-17 20:19:42 +02:00
Tim van der Meij
b942714f45
Merge pull request #21291 from Snuffleupagus/PDFDocumentProperties-undef-contentLength-test
Add an integration-test for documents without `contentLength` available in the `PDFDocumentProperties` dialog
2026-05-17 18:31:19 +02:00
Jonas Jenwald
2cef900834 Add an integration-test for documents without contentLength available in the PDFDocumentProperties dialog 2026-05-17 16:55:48 +02:00
Tim van der Meij
e98b43879e
Merge pull request #21289 from Snuffleupagus/PDFDocumentProperties-approx-size-test
Add an integration-test for the page-name fuzzy matching in the `PDFDocumentProperties` dialog
2026-05-17 15:23:49 +02:00
Tim van der Meij
af65d7f930
Enable the must check that an existing highlight is ignored on hovering integration test on Windows
It looks like this test passes consistently again, most likely after a
combination of browser/Puppeteer/configuration updates and the completed
switch to the WebDriver BiDi protocol.

Fixes #20136.
2026-05-17 14:47:14 +02:00
Jonas Jenwald
afa9b6ef9b Add an integration-test for the page-name fuzzy matching in the PDFDocumentProperties dialog
Also, test that closing the dialog works correctly.
2026-05-17 14:40:09 +02:00
Tim van der Meij
f290da0e4b
Merge pull request #21287 from Snuffleupagus/rm-_normalizePagePoint
Remove the unused `Outline._normalizePagePoint` method
2026-05-17 12:47:57 +02:00
Jonas Jenwald
036436a0be Remove the unused Outline._normalizePagePoint method
This method was added in PR 19093, back in 2024, however it never actually appears to have been used.
2026-05-16 23:17:10 +02:00
Tim van der Meij
600a4bb1ee
Fix missing page closing for two viewer integration tests
This caused the tab to remain open after the tests ran, which meant
that a total of ~120 MB of memory was not being freed.
2026-05-16 19:30:42 +02:00
Tim van der Meij
c66f9f2497
Reduce the protocol delay for Chrome in the integration tests
Originally we introduced a small delay for Puppeteer operations in
Chrome to avoid intermittent failures where protocol calls were
happening too quickly in succession. However, since then a number of
improvements were made, both locally and upstream, that reduce the need
for this delay:

- the integration tests have been hardened to remove (potential) sources
  of intermittent failures in many places;
- the browsers and Puppeteer have been updated to improve performance
  and support for testing infrastructure;
- the conversion to WebDriver BiDi has been completed, which replaced
  the Chrome-specific CDP protocol with a formalized protocol that could
  provide more safety guarantees.

This commit therefore reduces the Chrome-specific delay from 5 to 3
milliseconds, which should nowadays be a better value to speed up the
Chrome tests and bring them closer to Firefox in terms of runtime.
2026-05-16 19:30:42 +02:00
Tim van der Meij
62b88aa56e
Use Puppeteer's ElementHandle.boundingBox() API in the integration tests
The custom solution for obtaining the bounding box of a given element
that we have now was necessary during the original introduction of the
integration tests because at the time the `ElementHandle.boundingBox()`
API in Puppeteer didn't work correctly in Chrome.

However, `getRect`, where this is used, is a hot utility function
because most tests call it multiple times, either directly or indirectly
via other utility functions, and it turns out that the approach we use
is slower than the native `ElementHandle.boundingBox()` API.

Fortunately, most likely after a combination of Chrome/Puppeteer updates
and the conversion to the formalized WebDriver BiDi protocol the custom
solution is no longer necessary because all tests pass without it too,
so this commit converts `getRect` to use `ElementHandle.boundingBox()`
instead to speed up the tests.
2026-05-16 19:30:34 +02:00
Tim van der Meij
65b8aec420
Merge pull request #21286 from Snuffleupagus/ColorConverters-tests
Add a couple of very basic `ColorConverters` unit-tests
2026-05-16 18:11:16 +02:00
Jonas Jenwald
7f2bb0e991 Add a couple of very basic ColorConverters unit-tests
These tests could obviously be improved/extended, but it's at least a start to ensure that `ColorConverters` is tested since it's used in both the annotation-layer and the scripting-implementation.
2026-05-16 17:17:41 +02:00
calixteman
91f2facce3
Use the CFF program directly for CID fonts wrapped in OpenType FontFile3
When a CIDFontType0 descendant has its program in a FontFile3 stream with
/Subtype /OpenType, the OTF wrapper sometimes lacks a usable cmap and the
CID→GID mapping only exists inside the embedded CFF itself. In that case
the OpenType-table path produces wrong glyphs, so route the font through
CFFFont and let it consume the inner CFF directly.

The file has been found in https://issues.chromium.org/issues/471404119.
2026-05-16 16:30:55 +02:00
Tim van der Meij
3450e95179
Merge pull request #21284 from Snuffleupagus/mv-SVG_NS
Move the `SVG_NS` definition into `src/shared/util.js`
2026-05-16 16:03:10 +02:00
Jonas Jenwald
7c5087cc16 Move the SVG_NS definition into src/shared/util.js
This constant is already defined in both the `src/core/` and `src/display/` folders, and in a few spots the same string was also inlined.
2026-05-16 15:17:04 +02:00
Jonas Jenwald
d27b9ab5fa
Merge pull request #21283 from Snuffleupagus/mv-getXfaPageViewport
[api-minor] Move the `getXfaPageViewport` helper into the `XfaLayer` class
2026-05-16 14:18:22 +02:00
Jonas Jenwald
e8f07d7ca3 [api-minor] Move the getXfaPageViewport helper into the XfaLayer class
This small helper function only exists to support printing of XFA documents, in the viewer, hence it seems like a good idea to (ever so slightly) reduce the official API surface a little bit.
2026-05-16 12:31:53 +02:00
Jonas Jenwald
eda97fe8fc Move the PageViewport class into its own file
This is necessary to prevent import cycles with the next patch.

It also shouldn't hurt to reduce the size of `src/display/display_utils.js` a little bit, since utility-files have a tendency to increase in size over time.
2026-05-16 12:31:40 +02:00
Tim van der Meij
26474b09cb
Merge pull request #21277 from calixteman/issue21276
Clear the full SMask scratch canvas in compose()
2026-05-15 20:04:11 +02:00
Tim van der Meij
77a2dc8532
Merge pull request #21281 from Snuffleupagus/rm-domMatrixToTransform
Remove the `Util.domMatrixToTransform` method
2026-05-15 20:03:19 +02:00
Jonas Jenwald
367f994d94 Remove the Util.domMatrixToTransform method
This method is unused in the worker-thread and has only *a single* call-site in the main-thread, which can be trivially replaced with the `getCurrentTransform` helper function.
2026-05-15 15:07:44 +02:00
Jonas Jenwald
69efba1ca2
Merge pull request #21279 from Snuffleupagus/mv-stringToPDFString
Move the `stringToPDFString` helper function to the worker-thread
2026-05-15 15:01:15 +02:00
Jonas Jenwald
e5330f06fa Move the stringToPDFString helper function into the src/core/string_utils.js file
Given that this function is only ever used during *parsing* of the PDF document, which happens in the worker-thread, this has always added (a little bit of) dead code in the built `pdf.mjs` file.
2026-05-15 12:10:30 +02:00
Jonas Jenwald
7a7e7049c1 Shorten the isAscii helper function a tiny bit 2026-05-15 11:56:33 +02:00
Jonas Jenwald
153cef615e Move a couple of src/core/ string helper functions into their own file
Given that the various utility-files naturally increase in size over time, it shouldn't hurt to shorten `src/core/core_utils.js` a little bit by moving a few of its string helper functions to their own file.
2026-05-15 11:49:54 +02:00
calixteman
d9491ffce3
Merge pull request #21278 from mozilla/update-locales
l10n: Update locale files
2026-05-15 09:34:50 +02:00
github-actions[bot]
0fab33c2e6 l10n: Update locale files 2026-05-15 00:47:51 +00:00
calixteman
5e18cfd8f0
Clear the full SMask scratch canvas in compose()
PR #21101 narrowed `compose()`'s `clearRect` from full canvas to the
caller-supplied dirty box. That leaves pixels outside the current
dirty box on the SMask scratch canvas between `compose()` calls;
subsequent draws into scratch are then source-over-blended on top of
those leftovers, so the output depends on the cumulative draw history
rather than just the current draw.
2026-05-14 23:02:14 +02:00
calixteman
cd4fd7563c
Merge pull request #21218 from RolandWArnold/fix/text-layer-hidden-canvas-layout-neutral
Ensure TextLayer hiddenCanvasElement is layout-neutral by default
2026-05-14 22:11:06 +02:00
Tim van der Meij
d9665c4e0f
Merge pull request #21274 from calixteman/issue21273
Enable Codecov flag carryforward for accurate coverage badge
2026-05-14 18:26:11 +02:00
calixteman
195bfdcfbd
Enable Codecov flag carryforward for accurate coverage badge
It fixes #21273.
2026-05-14 18:13:11 +02:00
Tim van der Meij
b708f59d04
Merge pull request #21271 from Snuffleupagus/unittest-BrotliDecode
Add a simple API unit-test for /BrotliDecode
2026-05-14 16:05:34 +02:00
Jonas Jenwald
949497a3c4 Add a simple API unit-test for /BrotliDecode
This is a new feature in PDF documents, hence it shouldn't hurt to complement the existing ref-test with a simple unit-test as well.
This should also improve test coverage for the `external/` folder, which can't hurt since the other external decoders are already fairly well covered.
2026-05-14 15:44:42 +02:00
Roland Arnold
16d82e094f fix: inline styles for hidden helper elements
Set layout-neutral styles at the creation sites for the hidden TextLayer
canvas and PDFViewer copy element rather than relying on the shared
web/pdf_viewer.css rule.

This keeps the helper elements invisible and out of layout when viewer CSS
selectors are scoped or omitted, and removes the obsolete hiddenCanvasElement
class and shared CSS rule.
2026-05-14 14:28:41 +01:00
Tim van der Meij
7ade637449
Merge pull request #21268 from calixteman/lint_chmod
Add a lint-chmod task to catch stray executable bits
2026-05-14 15:16:08 +02:00
Calixte Denizet
f8f497a03a
Add a lint-chmod task to catch stray executable bits 2026-05-14 13:55:14 +02:00
Tim van der Meij
056837dace
Merge pull request #21173 from timvandermeij/github-actions-integration-tests-coverage
Collect coverage information for the integration tests
2026-05-14 13:40:05 +02:00
Tim van der Meij
71e9eb25f6
Merge pull request #21269 from Snuffleupagus/WORKER_THREAD-define
Avoid bundling DOM-related code in the built `pdf.worker.mjs` file
2026-05-14 13:02:08 +02:00
Calixte Denizet
94de952b65
Add a Content-Security-Policy to pdf.js' viewer.html (bug 1960363) 2026-05-14 12:50:07 +02:00
Tim van der Meij
26dc195a65
Collect coverage information for the integration tests
Note that for the integration tests the coverage information ends up
being processed in the Node.js context where `window` is not available,
so we use `globalThis` instead for the function that merges individual
test's coverage information into the global object because that is
available in all contexts we support. For clarity we also rename said
function since we're not exclusively dealing with `window` nor worker
data anymore.
2026-05-14 12:34:12 +02:00
Jonas Jenwald
204f9203bd Avoid bundling DOM-related code in the built pdf.worker.mjs file
Currently the `isCanvasFilterSupported`/`isAlphaColorInputSupported` getters, on the `FeatureTest` class, contains code that cannot run in the worker-thread since it relies on the DOM being available.
To avoid that a new DEFINE is added, in `gulpfile.mjs`, to allow skipping this sort of dead code in the built `pdf.worker.mjs` file.
2026-05-14 12:21:36 +02:00
calixteman
bf9ae7622f
Merge pull request #21267 from timvandermeij/test-pdf-executable-bit
Remove the executable bit from test PDF files
2026-05-13 09:29:02 +02:00
calixteman
7f151c777b
Merge pull request #21262 from calixteman/issue18032
Fix nested non-isolated groups in knockout rendering
2026-05-12 22:37:31 +02:00
calixteman
0e0f7b7696
Merge pull request #21263 from Snuffleupagus/editor-_l10nAlert
[Editor] Avoid "generating" the l10n-ids used for the `a11yAlert`
2026-05-12 22:07:54 +02:00
Calixte Denizet
0e335d53ee Fix nested non-isolated groups in knockout rendering
It fixes #18032.

Only use the special inner-backdrop compositing path for nested non-isolated groups that actually need isolation.
This preserves the parent/page backdrop for simple nested groups inside knockout groups, preventing later group
compositing from erasing existing backdrop content.
2026-05-12 22:00:44 +02:00
Tim van der Meij
41e47c8b6f
Remove the executable bit from test PDF files
Test PDF files should never be executable because we only read their
contents, so this commit makes sure that all test PDFs have the same
permissions, namely 0644 (read-only for all groups, and writable for the
owner), to limit their permissions for a least-privilege approach.
2026-05-12 20:59:07 +02:00
Tim van der Meij
10abe660e5
Merge pull request #21264 from calixteman/simplify_no_filter
Use FeatureTest.isCanvasFilterSupported in _bakeSMaskCanvas
2026-05-12 20:37:16 +02:00
Tim van der Meij
dc7b6c31ac
Merge pull request #21265 from mozilla/dependabot/github_actions/github/codeql-action-4.35.3
Bump github/codeql-action from 4.35.2 to 4.35.3
2026-05-12 20:28:33 +02:00
Tim van der Meij
a5027bf5e2
Merge pull request #21256 from timvandermeij/updates
Update dependencies to the most recent versions
2026-05-12 20:27:16 +02:00
dependabot[bot]
130aff4257
Bump github/codeql-action from 4.35.2 to 4.35.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.2 to 4.35.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](95e58e9a2c...e46ed2cbd0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 18:17:58 +00:00
Calixte Denizet
1dac67ff54 Use FeatureTest.isCanvasFilterSupported in _bakeSMaskCanvas 2026-05-12 20:02:06 +02:00
Jonas Jenwald
4072d3f835 [Editor] Avoid "generating" the l10n-ids used for the a11yAlert
In the `DrawingEditor.prototype.#createDrawOutlines` method the l10n-id was being "generated", which is bad for maintainability since searching for l10n-id becomes more difficult and the `gulp check_l10n` script actually warns about this.

Hence, similar to e.g. the resizer localization, let's define the `a11yAlert` l10n-ids *once* and provide shorthands for accessing them.
2026-05-12 16:41:53 +02:00
calixteman
0c66063cd4
Merge pull request #21242 from calixteman/knockout
Render knockout transparency groups
2026-05-12 12:02:10 +02:00
Jonas Jenwald
5bc5791a86
Merge pull request #21257 from Snuffleupagus/deepCompare-Refs
Update the `deepCompare` helper function to handle `Ref`s and `Name`s correctly
2026-05-12 11:53:02 +02:00
calixteman
d1e9194e1f
Render knockout transparency groups
In a knockout (KO) group each painting operator ("element") composites against
the group's initial backdrop instead of accumulating onto prior elements
of the same group. The backend renders each element to a per-group pooled
temp canvas (keyed off `#groupStackMeta`), builds a binary alpha mask via
a new `feFuncA` filter (`addKnockoutFilter`), `destination-out`s the
group canvas through that mask, restores the initial backdrop into the
cleared footprint for non-isolated groups (cropped to the same mask so
sparse groups don't bleed the whole rectangle), and finally paints the
element on top with the parent's blend mode. Path / clip / transform ops
are mirrored back to the group canvas via `mirrorContextOperations` so
graphics state stays in sync between elements; only the raster pixels
land on the temp canvas.

The temp canvas is forced to source-over for the element raster (`multiply`
on a transparent backdrop would zero the color) and the original GCO is
restored before `copyCtxState` writes back, so the parent's blend mode
survives for the final composite.

Also handled:
  - Nested KO groups (the level is incremented for KO, reset to 0 for
    non-KO subgroups so an ancestor KO doesn't leak in).
  - Non-isolated non-KO subgroups inside a KO parent (`hasInnerBackdrop`
    path: blend the elements against the subgroup's running backdrop for
    color, mask with the elements-only canvas).
  - Soft masks installed inside a KO element (`applySMaskInPlace` in
    `compose`, which runs the SMask destination-in directly on the temp
    canvas; the existing blit-to-suspended step is gated by `if (!ctx)`).
  - Type-3 text, shading fills, image-mask groups, inline images and the
    solid-color mask path: each is wrapped in `#begin/#endKnockoutElement`.
  - `endDrawing` cleanup so cancelled rendering doesn't leak pooled
    canvases or stale knockout state.
2026-05-11 23:08:06 +02:00
Tim van der Meij
4da7a9aa29
Upgrade typescript to version 6.0.3
This is a major version bump containing two breaking changes for us:

- the `baseUrl` option is removed;
- the `moduleResolution` option doesn't support `node10` (or the `node`
  alias) anymore.

The migration guide at https://github.com/microsoft/TypeScript/issues/62508
indicates that we can remove `baseUrl` and change `moduleResolution` to
`bundler` (the latter is consistent with what other projects do that are
linked to the issue, and more details on that configuration option can
be found at https://www.typescriptlang.org/tsconfig/#moduleResolution).

Note that this is enough to get `npx gulp typestest` green and that is
all validation we can do on our side, so as usual if any follow-up fixes
for types are necessary we rely on the community to provide patches and
extend the types test where possible to improve validation.
2026-05-11 21:05:11 +02:00
Tim van der Meij
c67306b435
Upgrade postcss-discard-comments to version 8.0.0
This is a major version bump, but the changelog at
https://github.com/cssnano/cssnano/blob/master/packages/postcss-discard-comments/CHANGELOG.md
doesn't indicate any breaking changes that should impact us.
2026-05-11 21:05:11 +02:00
Tim van der Meij
dd05ebad71
Upgrade @napi-rs/canvas to version 1.0.0
This is a major version bump, but the changelog at
https://github.com/Brooooooklyn/canvas/releases/tag/v1.0.0
doesn't indicate any breaking changes that should impact us.
2026-05-11 21:05:11 +02:00
Tim van der Meij
25a9196d9c
Update dependencies to the most recent versions 2026-05-11 21:05:11 +02:00
Tim van der Meij
6bbcb46db8
Merge pull request #21258 from Snuffleupagus/mv-getModificationDate
Move the `getModificationDate` helper function into `src/core/core_utils.js`
2026-05-11 20:20:05 +02:00
Jonas Jenwald
aecb571ea6 Move the getModificationDate helper function into src/core/core_utils.js
Given that this function is only ever used in `src/core/` code, let's avoid a little bit of dead code in the *built* `pdf.mjs` file.

Also, place the `AnnotationPrefix` and `AnnotationEditorPrefix` constants together in `src/shared/util.js` since that should aid readability.
2026-05-11 14:13:23 +02:00
Jonas Jenwald
326df1f711 Update the deepCompare helper function to handle Refs and Names correctly
Note that `Ref`s and `Name`s are cached globally[1], since that helps reduce object creation (a lot) during parsing.
That cache will be cleared after a period of inactivity in the viewer[2], which is why those primitives cannot *safely* be compared with just `===`/`!==` and also (partially) why abstractions such as `RefSet`/`RefSetCache` are necessary.

Currently `deepCompare` doesn't handle `Ref`s and `Name`s correctly, which may lead to future *intermittent* bugs in any code using the `deepCompare` helper function.

---

[1] This applies to `Cmd` as well, however that doesn't matter in the context of this patch.

[2] Currently, and for more than a decade, set to 30 seconds.
2026-05-11 13:18:54 +02:00
Tim van der Meij
702d60aa18
Merge pull request #21230 from calixteman/avoid_cycles
Avoid cycles when getting operator list in patterns
2026-05-10 18:15:01 +02:00
Tim van der Meij
3b58a339c8
Merge pull request #21213 from saripovdenis/perf-name-tree-getall-queue-index
perf: Avoid multi-second getDestinations stalls for PDFs with many named destinations
2026-05-10 18:13:12 +02:00
Jonas Jenwald
1079535a1e
Merge pull request #21249 from Snuffleupagus/open-filename-unconditional
Support providing a `filename` unconditionally, when passing binary data to `PDFViewerApplication.open`
2026-05-10 15:48:43 +02:00
Tim van der Meij
02c9051b64
Merge pull request #21245 from Snuffleupagus/getDocument-only-DocumentInitParameters
[api-major] Remove support for calling `getDocument` without  a parameter object, and remove the `PDFDocumentProxy.prototype.destroy` method
2026-05-10 14:30:15 +02:00
Tim van der Meij
559e2f2006
Merge pull request #21236 from calixteman/pixel_fallback_smask
Fall back to pixel-buffer SMask filtering when ctx.filter is unavailable
2026-05-10 14:27:52 +02:00
Tim van der Meij
47e32709b3
Merge pull request #21246 from Snuffleupagus/crypto_spec-fromHex
Use `Uint8Array.fromHex` in `test/unit/crypto_spec.js`
2026-05-10 14:12:33 +02:00
Tim van der Meij
33a6f3e206
Merge pull request #21238 from Snuffleupagus/PDFDataRangeTransport-unittest-faster
Make the `PDFDataRangeTransport` streaming unit-tests faster
2026-05-10 14:11:09 +02:00
Tim van der Meij
e8a051cee5
Merge pull request #21248 from mozilla/dependabot/npm_and_yarn/babel/plugin-transform-modules-systemjs-7.29.4
Bump @babel/plugin-transform-modules-systemjs from 7.29.0 to 7.29.4
2026-05-10 14:07:18 +02:00
Tim van der Meij
e511c88f11
Merge pull request #21244 from mozilla/dependabot/npm_and_yarn/fast-uri-3.1.2
Bump fast-uri from 3.1.0 to 3.1.2
2026-05-10 14:06:27 +02:00
Tim van der Meij
58ee4cd18d
Merge pull request #21243 from mozilla/dependabot/npm_and_yarn/fast-xml-builder-1.2.0
Bump fast-xml-builder from 1.1.5 to 1.2.0
2026-05-10 14:06:00 +02:00
Jonas Jenwald
0763c69b6a Support providing a filename unconditionally, when passing binary data to PDFViewerApplication.open
Previously this was only supported in Firefox, however when merging PDFs the `PDFViewerApplication.onSaveAndLoad` method will provide a `filename` unconditionally.
2026-05-10 13:51:33 +02:00
dependabot[bot]
f6e69b8a20
Bump @babel/plugin-transform-modules-systemjs from 7.29.0 to 7.29.4
Bumps [@babel/plugin-transform-modules-systemjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-systemjs) from 7.29.0 to 7.29.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.4/packages/babel-plugin-transform-modules-systemjs)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-modules-systemjs"
  dependency-version: 7.29.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 17:40:37 +00:00
Jonas Jenwald
eb184851a8 Use Uint8Array.fromHex in test/unit/crypto_spec.js
This replaces the old `hex2binary` helper function with the native `Uint8Array.fromHex` method.
2026-05-09 17:17:50 +02:00
Jonas Jenwald
43ce1bb491 [api-major] Remove the PDFDocumentProxy.prototype.destroy method
This is a left-over from very old code, which pre-dates the introduction of the `PDFDocumentLoadingTask` and it's nothing more than an alias for its `destroy` method.
Given that `PDFDocumentProxy` already provides a way to access the underlying `PDFDocumentLoadingTask` instance, it shouldn't be necessary to have an alias for one of its methods.

*Please note:* For any existing code relying on the removed method, updating it should be as simple as replacing `pdfDocument.destroy()` with `pdfDocument.loadingTask.destroy()`.

---

[1] If the `PDFDocumentProxy` class was added today, there's no chance that it'd include a `destroy` method.
2026-05-09 13:20:39 +02:00
Jonas Jenwald
2e7a2215e3 [api-major] Remove support for calling getDocument without a parameter object
This is a left-over from very old code[1], before there were a lot of `getDocument` options and when most of the library configuration was done via the (since removed) `PDFJS` global.
Given all the functionality added through the years, which require configuration[2], in practice it's now unlikely that calling `getDocument` without additional options will work except for the most trivial PDFs.

---

[1] If the `getDocument` function was added today, there's no chance that it'd support anything other than a parameter object.

[2] Note things such as CMaps, standard fonts, wasm-based image decoders, and ICC-based colour spaces.
2026-05-09 13:00:27 +02:00
dependabot[bot]
b5af8151f6
Bump fast-uri from 3.1.0 to 3.1.2
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 00:28:57 +00:00
dependabot[bot]
e94f9a9797
Bump fast-xml-builder from 1.1.5 to 1.2.0
Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.5 to 1.2.0.
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-builder/compare/v1.1.5...v1.2.0)

---
updated-dependencies:
- dependency-name: fast-xml-builder
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-08 18:32:54 +00:00
Jonas Jenwald
15921243d4 Make the PDFDataRangeTransport streaming unit-tests faster
The delay between chunks when testing streaming is necessary to avoid the entire PDF document arriving all at once, since that would render those unit-tests somewhat pointless.
However, the delay is unnecessarily large which causes these unit-tests to be slower than necessary.

Also, update the range unit-tests to check the expected number of fetches *exactly* since those values are not supposed to vary.
2026-05-08 12:44:32 +02:00
calixteman
e86e9d9465
Merge pull request #21237 from mozilla/update-locales
l10n: Update locale files
2026-05-08 08:39:19 +02:00
github-actions[bot]
80dd1b3ecc l10n: Update locale files 2026-05-08 00:45:17 +00:00
Calixte Denizet
29fcf0aa76
Avoid cycles when getting operator list in patterns 2026-05-07 22:30:51 +02:00
calixteman
a5e9940d14
Merge pull request #21231 from calixteman/simplify_extract
Simplify '#getFilteredPageIndices' and '#resolveInsertAfterIndices'
2026-05-07 22:28:48 +02:00
calixteman
b8232710c8
Fall back to pixel-buffer SMask filtering when ctx.filter is unavailable
For now OffscreenCanvas in worker threads doesn't support ctx.filter,
so we need to fall back to a more expensive pixel-buffer SMask filtering in that case.
As a side effect, this also allows to support correctly smask in Safari.
2026-05-07 22:27:04 +02:00
Calixte Denizet
b39440b6e0
Simplify '#getFilteredPageIndices' and '#resolveInsertAfterIndices' 2026-05-07 21:41:37 +02:00
Tim van der Meij
a328294713
Merge pull request #21235 from calixteman/bug2033095
Improve soft mask composition performance (bug 2033095)
2026-05-07 21:35:09 +02:00
Tim van der Meij
e81507c167
Merge pull request #21228 from calixteman/bug2027682
Place new annotations on the correct page when extracting pages (bug 2027682)
2026-05-07 21:12:15 +02:00
Tim van der Meij
9953501a0d
Merge pull request #21223 from calixteman/bug2034827
Make sure the focus moves on the first page of the added pdf after a merge (bug 2034827)
2026-05-07 21:04:29 +02:00
Tim van der Meij
4b4666e302
Merge pull request #21232 from mozilla/dependabot/npm_and_yarn/ip-address-10.2.0
Bump ip-address from 10.1.0 to 10.2.0
2026-05-07 20:54:27 +02:00
Calixte Denizet
1658a792ce Improve soft mask composition performance (bug 2033095)
Prepare reusable soft-mask canvases for filtered and backdrop-dependent masks,
and use a faster destination-in composition path where possible.
Handle Alpha SMask /BC correctly, preserve OOB alpha behavior, and mirror canvas path
operations needed while rendering inside soft-mask mode (mirrored clip was buggy).

Add reftest PDFs covering Alpha masks, transfer functions, backdrop/OOB
alpha, and the optimized composition paths.
2026-05-07 19:06:49 +02:00
dependabot[bot]
175c184956
Bump ip-address from 10.1.0 to 10.2.0
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.1.0 to 10.2.0.
- [Commits](https://github.com/beaugunderson/ip-address/commits)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-07 00:37:45 +00:00
Calixte Denizet
4c62a49483
Place new annotations on the correct page when extracting pages (bug 2027682) 2026-05-06 18:44:02 +02:00
Jonas Jenwald
cce61cb7f4
Merge pull request #21229 from Snuffleupagus/WasmImage-private
Tweak the `WasmImage` implementation a little bit (PR 21225 follow-up)
2026-05-06 18:27:44 +02:00
Jonas Jenwald
3f6a2feef6 Tweak the WasmImage implementation a little bit (PR 21225 follow-up)
This fixes two things that I overlooked in PR 21225, more specifically:

 - Use proper, rather than semi, private class fields in `WasmImage`.

 - Make tracking of `WasmImage` instances optional, to avoid keeping data alive permanently in the `IMAGE_DECODERS` build.
2026-05-06 17:52:35 +02:00
Calixte Denizet
a6cb30a9e5
Make sure the focus moves on the first page of the added pdf after a merge (bug 2034827) 2026-05-06 13:42:49 +02:00
saripovdenis
473f9b4592 Avoid quadratic traversal in NameOrNumberTree.getAll
Using Array.prototype.shift() to drain the traversal queue makes each
visited node move the remaining queued entries. For large name/number
trees this can make getAll() spend quadratic time in queue management.

Iterate over the queue with for...of instead. Children pushed while
iterating are still visited, and the queue no longer needs repeated
front removals.
2026-05-06 09:51:57 +08:00
Jonas Jenwald
cd1b5f57c7
Merge pull request #21226 from Snuffleupagus/unittestcli-coverage-external
Include the `external/` folder in the coverage report for `gulp unittestcli`
2026-05-05 22:52:39 +02:00
Jonas Jenwald
d33d9fc61d Include the external/ folder in the coverage report for gulp unittestcli
Given that the (browser) `gulp unittest` coverage includes the `external/` folder, it seems reasonable to include that folder in the coverage report when running unit-tests in Node.js as well.
2026-05-05 22:12:18 +02:00
Tim van der Meij
ac51bdf745
Merge pull request #21222 from Snuffleupagus/getPdfFilenameFromUrl-tweaks
A couple of small tweaks of the `getPdfFilenameFromUrl` helper
2026-05-05 20:27:55 +02:00
Tim van der Meij
d36e61d020
Merge pull request #21224 from Snuffleupagus/Node-26
Run unit-tests in Node.js version 26
2026-05-05 20:20:48 +02:00
Tim van der Meij
a1d9f13278
Merge pull request #21219 from calixteman/issue21217
Clear the text layer container when cancelling rendering
2026-05-05 20:19:13 +02:00
Jonas Jenwald
5967f720b9
Merge pull request #21225 from Snuffleupagus/WasmImage
Add an abstract `WasmImage` class, that `JBig2CCITTFaxImage` and `JpxImage` inherit from
2026-05-05 20:10:27 +02:00
Jonas Jenwald
6ff0f8690f Add an abstract WasmImage class, that JBig2CCITTFaxImage and JpxImage inherit from
Given that these classes are, with the exception of their `decode` methods, virtually identical this helps reduce code duplication and simplifies maintenance.

These changes reduce the size of the `gulp mozcentral` build-target by `1292` bytes, which obviously isn't a lot but still cannot hurt.
2026-05-05 17:25:18 +02:00
Jonas Jenwald
9efb4aa4aa Run unit-tests in Node.js version 26
This was just released, see https://nodejs.org/en/blog/release/v26.0.0, hence it seems like a good idea to start running unit-tests in that version.

Also, stop running the unit-tests in Node.js version 25 since it'll soon reach EOL anyway and testing in three separate Node.js versions ought to suffice.
2026-05-05 17:09:19 +02:00
Jonas Jenwald
e8d3d19f67
Merge pull request #21220 from Snuffleupagus/DataBuilder
Replace `TrueTypeTableBuilder` and `CompilerOutput` with a single class
2026-05-05 13:07:31 +02:00
Jonas Jenwald
8fc56772e8 A couple of small tweaks of the getPdfFilenameFromUrl helper
- Shorten the `getURL` function slightly, by re-factoring the try-catch blocks.
 - Change how the `decode` function looks for a decoded ".pdf" name, to skip the regular expression matching when it's not needed and to allow re-using the already defined `pdfRegex`.
2026-05-05 12:16:57 +02:00
Jonas Jenwald
ac6a9230d1 Replace TrueTypeTableBuilder and CompilerOutput with a single class
Given that both of these classes are so similar, let's replace them with a single `DataBuilder` class instead to reduce unnecessary code-duplication.
2026-05-04 15:01:53 +02:00
Calixte Denizet
82f55e7dd9
Clear the text layer container when cancelling rendering
It fixes #21217.
2026-05-04 14:36:12 +02:00
Tim van der Meij
a55cec4a0f
Merge pull request #21216 from Snuffleupagus/CFFCharset-rm-raw
Remove the unused `raw` field from the `CFFCharset` class
2026-05-03 19:31:04 +02:00
Jonas Jenwald
53fd89682c Remove the unused raw field from the CFFCharset class
This was necessary before charset compilation was implemented, however that's been supported for many years and this is just dead code now.
 - PR 9340, back in 2018, stopped using the `raw` field.
 - PR 10591, back in 2019, implemented proper charset compilation.
2026-05-03 18:51:24 +02:00
Tim van der Meij
f54f4b606d
Merge pull request #21215 from Snuffleupagus/compileFDSelect-TypedArray-set
Replace a loop with `TypedArray.prototype.set()` in the `compileFDSelect` method
2026-05-03 18:30:18 +02:00
Jonas Jenwald
027671e6dc Replace a loop with TypedArray.prototype.set() in the compileFDSelect method
Given that the `fdSelect.fdSelect` data is a regular Array, this code can simplified a tiny bit.
2026-05-03 16:32:48 +02:00
Tim van der Meij
c196fa8196
Merge pull request #21214 from Snuffleupagus/CFFFont-improvements
Remove the `CompilerOutput.prototype.finalData` getter, and a few other font improvements (PR 21053 follow-up)
2026-05-03 16:07:22 +02:00
Jonas Jenwald
e5e82b9617 Don't create a DataView for the "CFF " TrueType table in readTableEntry
Given that the "CFF " table may be replaced completely, during font-parsing, it shouldn't make sense to read and/or modify it piecewise.
2026-05-03 13:17:23 +02:00
Jonas Jenwald
b65eedc636 Set the correct data if compilation fails in the CFFFont constructor
The `CFFFont.prototype.data` should contain a `Uint8Array`, however if compilation failed it was being set to a `Stream` instance which will thus fail elsewhere in the font-code.

*Please note:* This was found by code inspection, since I don't have a PDF document that's fixed by this change.
2026-05-03 13:17:18 +02:00
Jonas Jenwald
521f4dc554 Remove the CompilerOutput.prototype.finalData getter (PR 21053 follow-up)
Return the data as-is from the `CFFCompiler.prototype.compile` method, rather than making a copy of it first.
The reason that it was implemented this way in PR 21053 was to avoid keeping a potentially large `ArrayBuffer` alive, see https://github.com/mozilla/pdf.js/pull/21053#discussion_r3045402988

Having traced all the call-sites in the font-code that directly or indirectly invoke that code, I've now managed to conclude that the compiled CFF-data is never stored on the `Font` instance and using the data as-is thus shouldn't increase permanent memory usage.
2026-05-03 13:13:50 +02:00
Tim van der Meij
6d5e8696c4
Merge pull request #21211 from Snuffleupagus/JpxStream-rm-params
Don't provide unused /DecodeParms when initializing `JpxStream`
2026-05-02 14:11:36 +02:00
Tim van der Meij
ccf9e03e18
Merge pull request #21210 from timvandermeij/unit-test-optimize-find
Optimize runtime of the find controller unit tests
2026-05-02 14:10:38 +02:00
Jonas Jenwald
a8715f6f96 Don't provide unused /DecodeParms when initializing JpxStream 2026-05-02 12:20:28 +02:00
Tim van der Meij
038ca33f8e
Optimize runtime of the find controller unit tests
The find controller tests consistently show up in the list of slowest
tests reported by Jasmine. Profiling shows that most of the time is
spent waiting for the find results to arrive, even though the find
command itself is quite fast.

It turns out that the slowdown occurs between receiving the `find` event
and actually triggering the search. The find controller has a hardcoded
delay of 250 milliseconds built in, which was introduced for viewer
performance many years ago because otherwise every keystroke would
trigger a search even though the user's query was not complete yet.

For the unit tests we don't need this delay because, contrary to the
viewer use case, we don't have to account for user interaction and
instead dispatch complete `find` events on the event bus ourselves.
However, since the unit tests were introduced well over a year after
the delay was introduced, due to an oversight it was never made
configurable so we could skip it for the unit tests.

This commit fixes the issue, which locally results in the runtime of
`npx gulp unittest --noChrome` dropping from 39.991 seconds before this
patch to 29.116 seconds afterwards, which is a 27% speedup.
2026-05-01 19:31:13 +02:00
Jonas Jenwald
091b172a22
Merge pull request #21209 from Snuffleupagus/version-6.0
Bump library version to `6.0`
2026-05-01 13:26:22 +02:00
Jonas Jenwald
2c445a2bc1 Bump library version to 6.0
See commit e6e06cf6b5307fe39e0de69c6c884f816b0cb21b
2026-05-01 13:12:29 +02:00
Jonas Jenwald
8142937ac4
Merge pull request #20961 from calixteman/use_image_decoder_chrome
[api-minor] Use the ImageDecoder by default on Chrome
2026-05-01 13:09:43 +02:00
Tim van der Meij
e6e06cf6b5
Merge pull request #21152 from Snuffleupagus/update-supported
[api-major] Update the minimum supported browsers, and remove no longer needed polyfills
2026-05-01 12:07:45 +02:00
Tim van der Meij
330ab4d066
Merge pull request #21208 from mozilla/update-locales
l10n: Update locale files
2026-05-01 12:04:06 +02:00
github-actions[bot]
35429af43e l10n: Update locale files 2026-05-01 00:48:41 +00:00
Jonas Jenwald
270b68feb9 [api-major] Update the minimum supported browsers, and remove no longer needed polyfills
By removing support for older browsers it's possible to simplify both the code and the build-scripts, in addition to removing manually implemented polyfills.
Using the PDF.js library/viewer will now require native support for the following features:
 - The `AbortSignal.any()` static method, see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static#browser_compatibility
 - The `:dir()` CSS pseudo-class, see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:dir#browser_compatibility
 - The `light-dark()` CSS function, see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/light-dark#browser_compatibility
 - The CSS `&` nesting selector, see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Nesting_selector#browser_compatibility

This patch updates the minimum supported browsers as follows:
 - Google Chrome 125, which was released on 2024-05-15; see https://chromereleases.googleblog.com/2024/05/stable-channel-update-for-desktop_15.html
 - Safari 18, which was released on 2024-09-16; see https://developer.apple.com/documentation/safari-release-notes/safari-18-release-notes
   *Note:* This version is the first with experimental support for the `CanvasRenderingContext2D.filter` property, which is a long-standing missing feature in Safari, however it must be *manually enabled*; see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter#browser_compatibility

Note that nowadays we usually try, where feasible and possible, to support browsers that are about two years old. By limiting support to only "recent" browsers we reduce the risk of holding back improvements of the *built-in* Firefox PDF Viewer, and also (significantly) reduce the maintenance/support burden for the PDF.js contributors.

*Please note:* As always, the minimum supported browser version assumes that a `legacy`-build of the PDF.js library is being used; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
2026-04-30 20:32:08 +02:00
calixteman
7ebf3a4d7c
Merge pull request #21196 from calixteman/bug2035530
Fix free highlight on pages without images (bug 2035530)
2026-04-30 19:34:02 +02:00
calixteman
4d91026178
Merge pull request #21207 from Snuffleupagus/unittest-11878-reduced
Use a reduced test-case for the "caches image resources at the document/page level as expected (issue 11878)" unit-test
2026-04-30 19:33:12 +02:00
Jonas Jenwald
3eef724d15 Use a reduced test-case for the "caches image resources at the document/page level as expected (issue 11878)" unit-test 2026-04-30 18:47:42 +02:00
Tim van der Meij
468d38e17c
Merge pull request #21206 from Snuffleupagus/unittest-11878-hash
Improve performance of the "caches image resources at the document/page level as expected (issue 11878)" unit-test
2026-04-30 16:19:59 +02:00
Jonas Jenwald
c5296986fa Improve performance of the "caches image resources at the document/page level as expected (issue 11878)" unit-test
Compare `Uint32Array`s of the image-data, since that's more efficient than comparing the `Uint8ClampedArray`s directly.
2026-04-30 16:09:56 +02:00
calixteman
1ebaa03b25
Merge pull request #21192 from calixteman/colored_logs
Add some colors in the logs in order to easily see failures and add a summary of the failures at the end
2026-04-30 14:50:20 +02:00
Tim van der Meij
87e5241ed3
Merge pull request #21203 from timvandermeij/unit-test-obsolete-pdfbug
Remove obsolete `pdfBug: true` flag in the image caching unit test
2026-04-30 14:28:39 +02:00
Tim van der Meij
55e0f7e97f
Remove obsolete pdfBug: true flag in the image caching unit test
In a previous commit the time-based checks, which were based on
statistics provided by the `pdfBug: true` flag, got replaced by
test-only property checks that don't use said statistics anymore.

Fixes b01eeaf8.
2026-04-30 14:07:39 +02:00
Calixte Denizet
46fd67a191
Add some colors in the logs in order to easily see failures and add a summary of the failures at the end 2026-04-30 14:00:54 +02:00
Tim van der Meij
8f170307ed
Merge pull request #21195 from timvandermeij/unit-test-optimizations
Optimize memory usage in the unit tests
2026-04-30 12:59:58 +02:00
Jonas Jenwald
adf07ea51c
Merge pull request #21200 from Snuffleupagus/Intersector-grid-push
Shorten how intersectors are added to the grid in the `Intersector` constructor
2026-04-30 12:56:38 +02:00
Tim van der Meij
232506f4e8
Optimize memory usage in the unit tests
This commit fixes a number of missing cleanup steps in the unit tests
that kept state alive for longer than necessary:

- the loading tasks were not all being destroyed;
- the find controllers were not being reset;
- the state set in `beforeAll`/`beforeEach` was not all being nulled in
  the correspoding `afterAll`/`afterEach` blocks.

Combined this resulted in a steady increase in memory usage of the test
process as the tests ran, climbing up to ~1.5 GB. After this patch the
memory usage remains stable at ~800 MB.
2026-04-30 12:35:59 +02:00
Tim van der Meij
b71be8a501
Merge pull request #21198 from Snuffleupagus/DecryptStream-nextChunk
Simplify the `nextChunk` handling in the `DecryptStream` class
2026-04-30 12:23:18 +02:00
Jonas Jenwald
4a5c455c0b Shorten how intersectors are added to the grid in the Intersector constructor
Thanks to modern JavaScript features this code can be simplified a tiny bit.
2026-04-30 12:06:08 +02:00
Jonas Jenwald
f26b98c7c4 Simplify the nextChunk handling in the DecryptStream class
This is old code, that can be simplified a tiny bit with modern JavaScript features.
2026-04-30 11:40:34 +02:00
calixteman
d92db130da
Merge pull request #21186 from timvandermeij/reorganize-pages-intermittents
Wait for the first page to be ready in the reorganize pages integration tests
2026-04-30 09:01:26 +02:00
calixteman
ac63d851b8
Merge pull request #21197 from Snuffleupagus/find-#extractText-more-await
Improve error handling in the `PDFFindController.prototype.#extractText` method
2026-04-30 08:57:29 +02:00
Jonas Jenwald
aa08b02a5b Avoid setting page-content for a previous document in the PDFFindController.prototype.#extractText method
Given that all of the relevant API methods are asynchronous it's possible, although quite unlikely, that the existing "is the document active" check won't catch all situations where the document was closed in the middle of searching.
2026-04-29 22:39:53 +02:00
Jonas Jenwald
a6e2a42df1 Improve error handling in the PDFFindController.prototype.#extractText method
This handles *all* errors correctly, if e.g. the document is closed in the middle of searching.
Also, replacing the "promise chains" with more `await` helps simplify the code a little bit.
2026-04-29 22:39:51 +02:00
Calixte Denizet
e7ec356be0
Fix free highlight on pages without images (bug 2035530) 2026-04-29 19:24:35 +02:00
Tim van der Meij
34c3ee16f8
Merge pull request #21194 from calixteman/improve_codecov
Slighty improve codecov stuff in gh actions
2026-04-29 17:04:14 +02:00
Calixte Denizet
c91fa7e2dd
Slighty improve codecov stuff in gh actions
disable_search == true, will avoid useless search especially because we already provide the path to the info file.
disable_telem == true, disable sending telemetry to codecov.
2026-04-29 16:48:46 +02:00
Tim van der Meij
2979253338
Merge pull request #21193 from calixteman/fix_intermittent_hangul
Fix the intermittent test failure 'performs a search in a text containing some Hangul syllables'
2026-04-29 15:50:49 +02:00
Calixte Denizet
9a247e51b4
Fix the intermittent test failure 'performs a search in a text containing some Hangul syllables'
The patch cb8055f0a changed the worker source so just set it as it was.
2026-04-29 15:36:22 +02:00
Tim van der Meij
eb97e6b2b1
Merge pull request #21191 from timvandermeij/unittestcli-merge
Move `unittestcli` coverage collection to `ci.yml`
2026-04-29 15:02:24 +02:00
Tim van der Meij
3d8a3f09c5
Move unittestcli coverage collection to ci.yml
Originally we introduced a separate `coverage.yml` workflow to
test-drive coverage collection without immediately introducing it inline
in the `ci.yml` workflow. However, now that coverage collection works
nicely and is performant enough we can simplify the workflow definitions
by removing `coverage.yml` entirely in favor of simply inlining coverage
collection into the existing `unittestcli` run in `ci.yml`. Doing so
also avoids having to a full extra `unittestcli` run just to collect
coverage information.

Moreover, this commit aligns coverage collection flags with the ones in
the other workflows to be more explicit and consistent.
2026-04-29 14:43:01 +02:00
Tim van der Meij
4021d57153
Wait for the first page to be ready in the reorganize pages integration tests
The thumbnails are only available if the first page is ready, and not
awaiting that causes the drag-and-drop action to be performed using
incorrect thumbnail viewer state (see the analysis in #21184 for more
details).

Fixes #21184.
Supersedes #20902.
Unblocks #21173.
2026-04-29 14:22:10 +02:00
Jonas Jenwald
e2591b3fbb
Merge pull request #21190 from Snuffleupagus/DecodeStream-abstract-readBlock
Add an abstract `readBlock` method in the `DecodeStream` class
2026-04-29 14:19:10 +02:00
calixteman
0c5eaeeac6
Merge pull request #21189 from calixteman/issue21185
Use Istanbul instrumentation for unittestcli code coverage
2026-04-29 13:48:04 +02:00
Jonas Jenwald
1f6bfa0890 Add an abstract readBlock method in the DecodeStream class
This avoids having to "duplicate" dummy `readBlock` methods in a couple of image-stream classes.
Also, move a few `DecodeStream` field definitions to (ever so slightly) shorten the code.
2026-04-29 13:02:15 +02:00
Calixte Denizet
47f0bdc6a5
Use Istanbul instrumentation for unittestcli code coverage 2026-04-29 11:02:51 +02:00
calixteman
08eca5213e
Merge pull request #21187 from calixteman/bug2035551
Fix HCM colors for the views-manager massive unselect button (bug 2035551)
2026-04-28 21:37:08 +02:00
Calixte Denizet
ecd154160d
Fix HCM colors for the views-manager massive unselect button (bug 2035551) 2026-04-28 19:52:53 +02:00
Tim van der Meij
a5382249db
Merge pull request #21178 from calixteman/unittest-coverage-lib
Collect worker-side coverage for browser unit tests
2026-04-28 15:25:14 +02:00
calixteman
30ea3216c9
Merge pull request #21175 from calixteman/bug1942304
Send 'Terminate' to the worker when destroy races the load-time handshake (bug 1942304)
2026-04-28 15:22:20 +02:00
Calixte Denizet
cb8055f0a9
Collect worker-side coverage for browser unit tests 2026-04-28 14:53:14 +02:00
Tim van der Meij
63e8c358df
Merge pull request #21183 from timvandermeij/github-actions-split
Split the unit/font tests into per-browser jobs
2026-04-28 14:38:09 +02:00
Tim van der Meij
c3c834f708
Merge pull request #21182 from mozilla/dependabot/github_actions/actions/setup-node-6.4.0
Bump actions/setup-node from 6.3.0 to 6.4.0
2026-04-28 14:31:54 +02:00
Tim van der Meij
485dcb7b2c
Split the unit/font tests into per-browser jobs
This commit mirrors the approach from e656b833 to the other workflows
that run multiple OS/browser combinations. This approach has multiple
advantages:

- it improves performance because each job is run in its own environment
  so we don't have two browsers competing for resources in the same
  environment anymore;
- it improves monitoring because each job is shown separately, with its
  own runtime, in e.g. the pull request checks and actions overviews,
  which makes it easier to spot bottlenecks that are specific to a
  certain OS/browser combination and enable follow-up optimizations.
2026-04-28 14:19:45 +02:00
dependabot[bot]
6ca196c69d
Bump actions/setup-node from 6.3.0 to 6.4.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](53b83947a5...48b55a011b)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 12:15:33 +00:00
Tim van der Meij
e66fdfb6db
Merge pull request #21179 from calixteman/split_unit_test-per_browser
Split integration tests into per-browser jobs
2026-04-28 13:15:00 +02:00
Tim van der Meij
f4e24f75ae
Merge pull request #21181 from Snuffleupagus/getPageIndex-async
Convert `Catalog.prototype.getPageIndex` to an asynchronous method
2026-04-28 12:55:38 +02:00
Jonas Jenwald
3475806311 Convert Catalog.prototype.getPageIndex to an asynchronous method
This simplifies/shortens a piece of old code, which shouldn't hurt.
2026-04-28 11:34:41 +02:00
Jonas Jenwald
339f755a52 Add more validation in the Catalog.prototype.getPageIndex method
- Ensure that the /Kids-entries are Arrays, before trying to iterate through them.
 - Ensure that the /Count-entries are (positive) integers.
2026-04-28 11:33:50 +02:00
calixteman
e656b8336f
Split integration tests into per-browser jobs 2026-04-27 22:24:22 +02:00
calixteman
a1b7d0feb5
Merge pull request #21169 from calixteman/speedup_lint
Improve the performances of "gulp lint"
2026-04-27 22:14:42 +02:00
Tim van der Meij
d68ef5bc36
Merge pull request #21177 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-04-27 21:31:34 +02:00
Tim van der Meij
12c96d5510
Bump the stable version in pdfjs.config 2026-04-27 21:26:50 +02:00
calixteman
7e5b36c2d5
Merge pull request #21171 from calixteman/bug2034980
Allow free-highlighting on top of image placeholders (bug 2034980)
2026-04-27 21:07:56 +02:00
Calixte Denizet
dc3c07b3e3 Allow free-highlighting on top of image placeholders (bug 2034980)
The `textLayerImagePlaceholder` canvas added in #20626 covers scanned
pages and was not recognized as a valid pointerdown target by
`#textLayerPointerDown`, so free highlights couldn't start.
2026-04-27 20:13:39 +02:00
calixteman
01b315a8f3
Merge pull request #21176 from calixteman/bug2035197
Fix merging PDFs with conflicting AcroForm /DR (bug 2035197)
2026-04-27 20:04:43 +02:00
Calixte Denizet
c9a7ff0506 Fix merging PDFs with conflicting AcroForm /DR (bug 2035197) 2026-04-27 18:54:52 +02:00
Calixte Denizet
cffb19e266 Send 'Terminate' to the worker when destroy races the load-time handshake (bug 1942304)
If `PDFDocumentLoadingTask.destroy` ran while `workerIdPromise` was
pending, the inner `.then` in `getDocument` threw "Loading aborted"
before `WorkerTransport` was constructed, so `_transport` was never set
and the "Terminate" message was never posted.
2026-04-27 17:14:45 +02:00
Tim van der Meij
d9f175d36d
Merge pull request #21174 from nicolo-ribaudo/fix-comment
Fix array type in CanvasBBoxTracker comment
2026-04-27 16:33:53 +02:00
Nicolò Ribaudo
81678f20ca
Fix array type in CanvasBBoxTracker comment
Remove the "Float32Array" mention in the comment, given that the
implementation usesa  Float64Array.

Actually using a Float32Array passes all the tests we currently have and
reduces memory usage (by 16 bytes per op), however to be sure that it
does not introduce rounding bugs we'd need to `Math.fround` all
operations we do on the clipBox and pendingBBox. It reduces the
readibilty of the code, but we can revisit if this memory usage becomes
a problem.
2026-04-27 15:52:12 +02:00
Tim van der Meij
8d3d370daa
Merge pull request #21170 from calixteman/speedup_typetest
Speed up 'gulp typestest' by removing the unused 'generic' dependency
2026-04-27 13:59:06 +02:00
calixteman
da0b99ce68
Merge pull request #20371 from timvandermeij/github-actions-integration-tests
Introduce a GitHub Actions workflow for running the integration tests
2026-04-27 09:51:22 +02:00
calixteman
3b8f55603d
Merge pull request #21154 from calixteman/bug2034804
Fix merging a PDF after a page deletion (bug 2034804)
2026-04-27 09:19:14 +02:00
calixteman
38beff5cef Speed up 'gulp typestest' by removing the unused 'generic' dependency 2026-04-27 09:14:34 +02:00
calixteman
a761dac3ea
Improve the performances of "gulp lint"
Don't format json files with Prettier: it's done by eslint.
Parallelize the linting tools and eslint.
2026-04-26 23:09:50 +02:00
Calixte Denizet
64b25a8f47
Fix merging a PDF after a page deletion (bug 2034804)
When pages carry explicit pageIndices (e.g. after a delete),
resolve insertAfter against that layout instead of the empty
base sequence. Also reject partial pageIndices combined with
insertAfter, which would race against the extraction's auto-fill.
2026-04-26 22:37:22 +02:00
calixteman
53931c5d2f
Merge pull request #21132 from calixteman/workflow_sync_pdfs
Add a gh workflow for triggering an event when some pdfs are added in test/pdfs
2026-04-26 22:15:03 +02:00
Jonas Jenwald
0ec70b0953
Merge pull request #21168 from Snuffleupagus/unittestcli-coverage-web
Include the `web/` folder in the coverage report for `gulp unittestcli`
2026-04-26 22:02:08 +02:00
Jonas Jenwald
40ea3e3acb Include the web/ folder in the coverage report for gulp unittestcli
Given that there's a few unit-tests for `web/` code that runs in Node.js, it seems reasonable to include that folder in the coverage report.
2026-04-26 21:55:09 +02:00
Calixte Denizet
65792863b9
Add a gh workflow for triggering an event when some pdfs are added in test/pdfs 2026-04-26 21:29:10 +02:00
Tim van der Meij
ce998f1d16
Introduce a GitHub Actions workflow for running the integration tests 2026-04-26 20:40:57 +02:00
Tim van der Meij
b178305a8b
Merge pull request #21167 from timvandermeij/fix-coverage-workflow
Fix the Codecov token not being usable in the unit tests GitHub Actions workflow
2026-04-26 20:40:20 +02:00
Tim van der Meij
142c581362
Fix the Codecov token not being usable in the unit tests GitHub Actions workflow
The job's environment must be `code-coverage` before it has access to
the `CODECOV_TOKEN` secret that's required for pushing coverage data to
Codecov. Without it we get an HTTP 400 response with a `Token required
because branch is protected` message if it's run from `master`.

Fixes f932a58d.
2026-04-26 20:25:57 +02:00
calixteman
f45d507302
Merge pull request #21165 from timvandermeij/github-actions-unit-tests-coverage
Include unit test coverage reporting in the GitHub Actions workflow
2026-04-26 19:55:53 +02:00
calixteman
88609becf8
Merge pull request #21166 from Snuffleupagus/internal-viewer-fixes
A couple of `internal-viewer` fixes
2026-04-26 19:54:36 +02:00
calixteman
c4afee385a
Merge pull request #21164 from timvandermeij/github-actions-font-tests-twice
Remove duplicated font tests execution in the GitHub Actions workflow
2026-04-26 19:53:47 +02:00
Jonas Jenwald
fae980a72d A couple of internal-viewer fixes
- Bundle the `web/text_layer_builder.css` file correctly, to ensure that textLayer debugging works when the code is *built*.
   Note how loading https://mozilla.github.io/pdf.js/internal-viewer/web/debugger.html currently logs the following error: `GET https://mozilla.github.io/pdf.js/internal-viewer/text_layer_builder.css [HTTP/2 404  7ms]`.

 - Import the `MathClamp` helper function from the *built* library, rather than "manually", since that's more correct.
2026-04-26 19:10:05 +02:00
Tim van der Meij
348942418c
Merge pull request #21163 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-26 17:01:06 +02:00
Tim van der Meij
f932a58d9c
Include unit test coverage reporting in the GitHub Actions workflow 2026-04-26 15:53:30 +02:00
Tim van der Meij
2d95e9964c
Remove duplicated font tests execution in the GitHub Actions workflow
The font tests have run with coverage reporting enabled for quite some
time now and the coverage information has proven to work and be stable,
so we don't have to also run the font tests without coverage reporting
anymore, thereby reducing the total runtime of the workflow.
2026-04-26 15:49:52 +02:00
Jonas Jenwald
60dcc64419
Merge pull request #21162 from Snuffleupagus/renderCommentButton-zIndex-parseInt
Get the `zIndex` correctly in `PopupElement.prototype.renderCommentButton`
2026-04-26 15:21:55 +02:00
Tim van der Meij
9afc31751a
Update dependencies to the most recent versions 2026-04-26 15:02:02 +02:00
Jonas Jenwald
72011c5088 Get the zIndex correctly in PopupElement.prototype.renderCommentButton
In practice this probably hasn't caused any bugs, however given that `DOMElement.style.zIndex` returns a string the existing code is subtly wrong.
This is also consistent with pre-existing `zIndex` code in the `PopupElement` class, see the `#show` and `#hide` methods.
2026-04-26 14:46:39 +02:00
Tim van der Meij
4aed8fd01b
Merge pull request #21161 from Snuffleupagus/getPageIndex-more-tests
Improve unit-testing for the `PDFDocumentProxy.prototype.getPageIndex` method
2026-04-26 14:46:24 +02:00
Jonas Jenwald
fc9d9e49de Improve unit-testing for the PDFDocumentProxy.prototype.getPageIndex method
Given the existing worker-thread caching it doesn't seem, based on the coverage report, that all of the `getPageIndex` code is being tested.
2026-04-26 13:38:08 +02:00
Jonas Jenwald
5c11bf15b0
Merge pull request #21160 from Snuffleupagus/more-hexNumbers
Move the `hexNumbers` Array into `Util`, to enable using it in the viewer
2026-04-26 13:08:42 +02:00
Tim van der Meij
0d7439e856
Merge pull request #21158 from Snuffleupagus/modifiedIds-proper-hash
Compute a "proper" hash in the `AnnotationStorage.prototype.modifiedIds` getter
2026-04-26 12:10:24 +02:00
Jonas Jenwald
9b238b9719 Move the hexNumbers Array into Util, to enable using it in the viewer
This reduces some code duplication, and the new `Util.hexNums` property is now computed lazily.
2026-04-26 12:05:12 +02:00
Tim van der Meij
2674a9f3e4
Merge pull request #21137 from calixteman/bug2022700
Don't decode name of the checkboxes exported values (bug 2022700)
2026-04-26 12:00:58 +02:00
Jonas Jenwald
1591ddfa8d
Merge pull request #21157 from Snuffleupagus/eslint-radix
Enable the `radix` ESLint rule
2026-04-25 22:27:21 +02:00
Jonas Jenwald
b72a229ee8 Compute a "proper" hash in the AnnotationStorage.prototype.modifiedIds getter
Currently the hash-property is just a stringified Array, which means that the hash-property can become arbitrarily long. That's not a good idea since it's used to compute a cache-key, in the API, which is then sent to the worker-thread. Hence the hash-property should be reasonably short, and its length should *not* depend on the number of modified editors, which can be achieved by using `MurmurHash3_64` here as well.
2026-04-25 12:52:29 +02:00
Jonas Jenwald
e6dba6ee34 Enable the radix ESLint rule
Many `parseInt` call-sites already provide the `radix` argument, and this rule helps improve consistency in the code-base; see https://eslint.org/docs/latest/rules/radix

*Please note:* The rule is disabled in `src/scripting_api/util.js` for now, since it's not obvious at a glance (at least to me) what the correct `radix` argument should be there.
2026-04-25 12:13:12 +02:00
calixteman
30d060c77a
Merge pull request #21151 from calixteman/bug2034568
Fix clicking on a thumbnail image not navigating to the correct page when using a screen reader (bug 2034568)
2026-04-25 08:20:25 +02:00
Tim van der Meij
f41c60ab7e
Merge pull request #21147 from Snuffleupagus/unittestcli-download-PDFs
Download linked PDFs when running `gulp unittestcli`
2026-04-24 20:29:14 +02:00
Tim van der Meij
7dc4812643
Merge pull request #21138 from calixteman/bug2034111
Fix status label mismatch after merging with a pre-existing selection (bug 2034111)
2026-04-24 20:07:50 +02:00
calixteman
2d896faa1e
Merge pull request #21142 from calixteman/input_color_alpha
[Ink] Replace the opacity slider with an alpha-enabled color input
2026-04-24 15:46:46 +02:00
Jonas Jenwald
476626eb49
Merge pull request #21153 from Snuffleupagus/rm-MIN_INT_32
Remove the unused `MIN_INT_32` constant (PR 21139 follow-up)
2026-04-24 15:01:16 +02:00
Calixte Denizet
39eb691252
Fix status label mismatch after merging with a pre-existing selection (bug 2034111) 2026-04-24 14:13:53 +02:00
calixteman
a6382ac97d
Merge pull request #21145 from calixteman/bug2034461
Prompt the user for saving a merged pdf (bug 2034461)
2026-04-24 14:11:36 +02:00
calixteman
c05d87a63f
Merge pull request #21149 from calixteman/switch_quickjs_wasm
Switch to a wasm file for the quickjs sandbox
2026-04-24 14:10:47 +02:00
Jonas Jenwald
aa7289d28b Remove the unused MIN_INT_32 constant (PR 21139 follow-up) 2026-04-24 13:29:22 +02:00
calixteman
4489c4106a
Merge pull request #21150 from mozilla/update-locales
l10n: Update locale files
2026-04-24 10:13:55 +02:00
Calixte Denizet
b669fdfc70
Fix clicking on a thumbnail image not navigating to the correct page when using a screen reader (bug 2034568)
Screen readers like NVDA fire synthetic click events on the <img> child of the button rather than on the
thumbnailImageContainer element itself, so the strict classList.contains check silently failed.
2026-04-24 10:10:59 +02:00
github-actions[bot]
e75259eff1 l10n: Update locale files 2026-04-24 00:42:13 +00:00
Calixte Denizet
987edbb646
Switch to a wasm file for the quickjs sandbox 2026-04-23 22:34:48 +02:00
calixteman
25204d359a
Merge pull request #21136 from calixteman/bug2033908
Avoid to add outlines having a deleted page which leads to clone a useless page (bug 2033908)
2026-04-23 22:24:58 +02:00
Jonas Jenwald
4e08d00466 Download linked PDFs when running gulp unittestcli
Currently a fair number of unit-tests are disabled in Node.js not because of missing functionality, but only because they use linked PDFs.
2026-04-23 21:52:08 +02:00
Calixte Denizet
f266c4d8b8
[Ink] Replace the opacity slider with an alpha-enabled color input
The alpha feature is available in Firefox nightly (with the pref `dom.forms.html_color_picker.enabled` set to `true`).
It's available in Safari but not in Chrome.
2026-04-23 21:37:37 +02:00
Tim van der Meij
865a59691b
Merge pull request #21121 from timvandermeij/github-actions-unit-tests
Introduce a GitHub Actions workflow for running the unit tests
2026-04-23 21:25:36 +02:00
Tim van der Meij
14743eef45
Introduce a GitHub Actions workflow for running the unit tests
Note that we no longer create an empty file if the download fails because
we don't want to leave traces of incorrect file contents on disk. This
has never been particularly useful because it'd require a manual user
action to remove the empty file to be able to retry in case of e.g. a
timed out connection, but especially in the context of GitHub Actions
where we cache the PDFs directory we don't want to cache invalid files
to make sure that a next run will automatically retry to fetch any
previously missed PDF files and update the cache.
2026-04-23 21:12:01 +02:00
Tim van der Meij
9f42555cfb
Merge pull request #21143 from calixteman/update_openjpeg_build
Update the openjpeg decoder compiled with the last version of emscripten
2026-04-23 20:38:09 +02:00
Tim van der Meij
654cc5df36
Merge pull request #21148 from calixteman/update_quickjs_build
Update quickjs bindings
2026-04-23 20:36:17 +02:00
Tim van der Meij
76420e5d91
Merge pull request #21140 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.7.1
Bump fast-xml-parser from 5.5.7 to 5.7.1
2026-04-23 20:33:42 +02:00
calixteman
dae7695deb
Merge pull request #21144 from calixteman/update_qcms_build
Update qcms bindings
2026-04-23 19:25:43 +02:00
Calixte Denizet
35ef6fe67a
Update quickjs bindings 2026-04-23 19:22:38 +02:00
Calixte Denizet
302bc5f4d9
Prompt the user for saving a merged pdf (bug 2034461) 2026-04-23 18:37:56 +02:00
Calixte Denizet
56a78aca06
Update qcms bindings 2026-04-23 16:43:17 +02:00
Calixte Denizet
16ad718923
Update the openjpeg decoder compiled with the last version of emscripten 2026-04-23 15:49:43 +02:00
Jonas Jenwald
bede5e5bfa
Merge pull request #21139 from Snuffleupagus/jbig2_nowasm_fallback
[api-minor] Replace the CCITT and JBig2 fallback decoders with a JS version of the PDFium decoder
2026-04-23 15:08:17 +02:00
dependabot[bot]
ae1b4796bd
Bump fast-xml-parser from 5.5.7 to 5.7.1
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.7 to 5.7.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.7...v5.7.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.7.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 06:04:13 +00:00
Jonas Jenwald
a6988582d2 [api-minor] Replace the CCITT and JBig2 fallback decoders with a JS version of the PDFium decoder
*Note:* This is similar to PR 19525, which did the same thing for the OpenJPEG decoder.

The advantages of doing this are:
 - The same JBig2 decoder is used regardless of WASM being supported or not, which means consistent rendering.
 - The old `Jbig2Image` implementation has various bugs and missing features.
 - Less code that needs to be maintained in the PDF.js project, since both the CCITT and the JBig2 decoder is replaced.

The disadvantage of doing this is:
 - Slightly larger bundle size, however the effect is limited since a fair amount of PDF.js code can be removed. For the `gulp mozcentral` target the size increase is approximately 54 kilo-bytes (which is small compared to the 452 kilo-bytes for the JS version of the OpenJPEG decoder).
2026-04-22 23:24:26 +02:00
Calixte Denizet
42ccca7ee8
Don't decode name of the checkboxes exported values (bug 2022700) 2026-04-22 18:30:43 +02:00
Calixte Denizet
a52c8334f5 Avoid to add outlines having a deleted page which leads to clone a useless page (bug 2033908) 2026-04-21 22:23:28 +02:00
Tim van der Meij
fe48736846
Merge pull request #21135 from calixteman/bug2033603
[HCM] Set the correct color for the icon in the merge button when focused with the keyboard (bug 2033603)
2026-04-21 20:21:12 +02:00
Tim van der Meij
e070944ff0
Merge pull request #21131 from Snuffleupagus/fix-CopyLocalImage-unittests
Improve the "CopyLocalImage" unit-tests
2026-04-21 20:18:40 +02:00
Calixte Denizet
9bfad05173 [HCM] Set the correct color for the icon in the merge button when focused with the keyboard (bug 2033603) 2026-04-21 19:24:21 +02:00
calixteman
56d730e975
Merge pull request #21125 from calixteman/reftest_coverage
Add code coverage support for browser/ref tests
2026-04-21 15:00:48 +02:00
calixteman
bb0a50a744
Merge pull request #21134 from mozilla/update-locales
l10n: Update locale files
2026-04-21 14:59:38 +02:00
github-actions[bot]
9f4b7f8241 l10n: Update locale files 2026-04-21 12:47:21 +00:00
calixteman
f065a91aa1
Merge pull request #21133 from calixteman/sync_l10n_app
Use a gh app for making the PR to update l10n data
2026-04-21 14:46:17 +02:00
Calixte Denizet
9eb40abbae
Use a gh app for making the PR to update l10n data
It should help to avoid having the subsequent workflows being stuck.
2026-04-21 14:40:10 +02:00
Jonas Jenwald
676f7fe6b3
Merge pull request #21130 from nicolo-ribaudo/clenaup-test
Fix unit test for dependency tracking
2026-04-21 12:36:27 +02:00
Nicolò Ribaudo
f7725254f3
Fix unit test for dependency tracking
Follow up to PR #21102
2026-04-21 11:48:18 +02:00
Jonas Jenwald
b01eeaf8e1 Improve the "CopyLocalImage" unit-tests
Rather than relying on the time it takes to parse/render the pages, which leads to intermittent failures, add a test-only property and use it to check if the "CopyLocalImage" code-path was exercised.
2026-04-21 11:43:08 +02:00
calixteman
3aab546524 Add code coverage support for browser/ref tests
Instrument JS files on-the-fly via babel-plugin-istanbul when --coverage
or --coverage-per-test is passed, producing an aggregate lcov/HTML report
at the end of the run. A persistent PDFWorker accumulates worker-thread
coverage alongside the main-thread coverage, collected via a new
GetWorkerCoverage message handler.

With --coverage-per-test, an inverted index
(build/coverage/per-test-index.json) is also built as tests run, mapping
each hit source line and function name to the numeric IDs of the tests
that exercised it, keeping the output compact. The new
`gulp test_search --code=file::line_or_function` tool queries the index,
and passing --code to browsertest pre-filters the test run to only those
tests.

Coverage output formats are selectable via --coverage-formats (default:
info; also accepts html, json, text, cobertura, clover).
2026-04-20 21:46:18 +02:00
Tim van der Meij
ab85b7f0ff
Merge pull request #21128 from calixteman/bug2025109
Remove user and password from URLs (bug 2025109)
2026-04-20 21:21:29 +02:00
Calixte Denizet
8ddbeda4a0
Remove user and password from URLs (bug 2025109) 2026-04-20 20:53:24 +02:00
Tim van der Meij
badebcca00
Merge pull request #21127 from calixteman/issue21126
Correctly compute the bbox when simplifying the path construction
2026-04-20 20:48:24 +02:00
Calixte Denizet
db89d3a0e6 Correctly compute the bbox when simplifying the path construction
It fixes #21126.
2026-04-20 18:42:09 +02:00
Tim van der Meij
3ccb263857
Merge pull request #21123 from timvandermeij/fix-unit-test-commonobjs
Fix the `gets text content, with correct properties (issue 8276)` unit test
2026-04-19 20:19:05 +02:00
Tim van der Meij
801236f8c4
Fix the gets text content, with correct properties (issue 8276) unit test
This unit test failed consistently in Firefox both locally and on GitHub
Actions (but not in Chrome or on the bots), which suggests a timing issue.

Since all other unit tests that rely on `commonObjs` actually render the
page, most likely to make sure that `commonObjs` is fully populated at
the time of the check, this commit mirrors that approach to this test,
which indeed fixes the issue.
2026-04-19 19:09:43 +02:00
calixteman
92f862bae9
Merge pull request #21115 from calixteman/improve_reftest_perfs2
Improve reftest runner memory usage and load balancing
2026-04-18 23:07:57 +02:00
Calixte Denizet
7810cee005
Improve reftest runner memory usage and load balancing
Replace manifest slicing with a dynamic task queue: drivers request tasks
on demand via WebSocket so parallel sessions self-balance naturally.

Start reading reference PNGs from disk as soon as a task is dispatched
(prefetchRefPngs) to overlap I/O with rendering. Release snapshot
buffers and task entries immediately after comparison, and copy WS
frame slices via Buffer.from() so the original frame buffer can be
GC'd.

Bump --max-old-space-size to 8192 MB as a workaround for a
Puppeteer/BiDi memory leak where data: URL strings accumulate in
BrowsingContext.#requests indefinitely:
  https://github.com/puppeteer/puppeteer/issues/14876
2026-04-18 22:33:31 +02:00
Tim van der Meij
78ba424dcf
Merge pull request #21118 from timvandermeij/actions-versions
Update GitHub workflow actions to the most recent versions
2026-04-18 19:38:27 +02:00
Tim van der Meij
657eba4139
Update GitHub workflow actions to the most recent versions
Moreover, we indicate the exact version that belongs to each commit
hash. This not only makes it easier to compare the hash against the
release tags in the actions repositories, but hopefully also makes it
easier for e.g. Dependabot to keep the comments up-to-date since not all
of them were correct and varying comment styles were in use. This commit
aligns all of them to a single `v{major}.{minor}.{patch}` style.
2026-04-18 19:01:51 +02:00
Tim van der Meij
7c2ef03202
Merge pull request #21117 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-18 18:15:54 +02:00
Tim van der Meij
a058acb34d
Fix vulnerability in the basic-ftp dependency
This patch is generated with `npm audit fix` and fixes
GHSA-rp42-5vxx-qpwr.
2026-04-18 16:09:56 +02:00
Tim van der Meij
ba2cc9c1e2
Update dependencies to the most recent versions 2026-04-18 16:07:10 +02:00
Tim van der Meij
c2a050432d
Merge pull request #21116 from Snuffleupagus/extractFontProgram-privateData-Map
Store the Type1 program `privateData` in a Map, rather than an Object
2026-04-18 13:53:47 +02:00
Jonas Jenwald
c155a86733 Store the Type1 program privateData in a Map, rather than an Object
This is nicer when checking if fields exist in `Type1Font.prototype.wrap`, and a couple of loops in that method are also "modernized" slightly.
2026-04-18 12:32:22 +02:00
calixteman
df863ae9c4
Merge pull request #21111 from calixteman/improve_reftest_perfs
Improve reftest runner performance
2026-04-17 08:54:07 +02:00
calixteman
1108c6088b
Merge pull request #21114 from mozilla/update-locales
l10n: Update locale files
2026-04-17 08:52:18 +02:00
github-actions[bot]
eb50166333 l10n: Update locale files 2026-04-17 00:39:40 +00:00
Calixte Denizet
b6fac76429 Improve reftest runner performance
- Replace base64/JSON POST image submission with binary WebSocket frames,
  avoiding base64 overhead and per-request HTTP costs; quit is also sent
  over the same WS channel to guarantee ordering
- Prefetch the next task's PDF in the worker while the current task is
  still rendering
- Use `getImageData` instead of `toBlob` for partial-test baseline
  comparison (synchronous, no encoding); only encode to PNG in master mode
- Disable bounce tracking protection in Firefox to prevent EBUSY errors
  from Puppeteer's profile cleanup on Windows
2026-04-16 22:58:50 +02:00
Jonas Jenwald
302b4cb008
Merge pull request #21112 from Snuffleupagus/createNameTable-TypedArray
Use TypedArrays in the `createNameTable` function
2026-04-16 22:48:52 +02:00
calixteman
7c5f7876e9
Merge pull request #21108 from calixteman/parallelize_browser_tests
Add an option -j XX for browser tests in order to set the number of jobs
2026-04-16 21:30:45 +02:00
Tim van der Meij
5ec6ab1ab8
Merge pull request #21104 from calixteman/fix_focus
Fix integration tests failing because the focus isn't on the right element
2026-04-16 20:02:50 +02:00
Jonas Jenwald
92a0a91046 Pre-compute the length of more intermediate tables in createCmapTable (PR 21103 follow-up)
With the exception of `glyphsIds` the length of the other segments can be trivially determined upfront, which is obvious in hindsight. This way unnecessary allocations can be avoided when building the "cmap" table.
2026-04-16 11:46:59 +02:00
Jonas Jenwald
0a4e8d024d Use TypedArrays in the createNameTable function 2026-04-16 11:46:57 +02:00
Jonas Jenwald
445cb9abf9
Merge pull request #21103 from Snuffleupagus/TrueTypeTableBuilder-2
Use TypedArrays in the `createCmapTable` function
2026-04-16 11:44:14 +02:00
calixteman
9159afd633
Merge pull request #21107 from supermar1010/fix-savedocument-jsdoc
Fix saveDocument JSDoc return type
2026-04-15 22:14:39 +02:00
Jonas Jenwald
17a397ad63
Merge pull request #20958 from Snuffleupagus/rm-sumPrecise-polyfill
Remove the basic `Math.sumPrecise` polyfill
2026-04-15 19:57:06 +02:00
Jonas Jenwald
aced833344 Remove the basic Math.sumPrecise polyfill
This is already polyfilled properly via core-js in `legacy` builds, and the only reason that it wasn't already removed is that the tests (on the bots) use the "modern" builds and Chrome didn't support `Math.sumPrecise` until now; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sumPrecise#browser_compatibility
2026-04-15 16:32:13 +02:00
Calixte Denizet
863b5d346e Add an option -j XX for browser tests in order to set the number of jobs
One browser per job is opened and will run a subset of the tests.
The goal is to make the tests significantly faster on machines with a good number of cpus.
2026-04-15 15:01:55 +02:00
Mario
9dd30474c2 Fix saveDocument JSDoc return type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:51:39 +02:00
Calixte Denizet
733a9b55a6
Fix integration tests failing because the focus isn't on the right element 2026-04-14 21:31:13 +02:00
calixteman
59908ccad3
Merge pull request #21101 from calixteman/improve_smask
Improve SMask compositing by pre-baking backdrop and filter
2026-04-14 20:57:08 +02:00
Jonas Jenwald
b2cc9ae6d5 Move the string32 helper to the src/display/font_loader.js file
After the previous patches the `string32` helper function is now only used in the `FontLoader.prototype._prepareFontLoadEvent` method, which is stubbed out in the Firefox PDF Viewer, hence move it there instead to avoid bundling dead code.
2026-04-14 20:36:34 +02:00
Jonas Jenwald
cb935c35d3 Use TypedArrays in the createCmapTable function 2026-04-14 20:36:34 +02:00
Jonas Jenwald
f9ecebe63c Add a helper class for building TrueType font tables
This helps reduce the amount of boilerplate code needed in multiple spots throughout the font code, and more importantly it'll help when building TrueType tables whose final size is non-trivial to compute upfront.
2026-04-14 20:36:34 +02:00
Jonas Jenwald
7f7ac949ff
Merge pull request #21100 from Snuffleupagus/createTables-TypedArray
Use TypedArrays when building even more TrueType tables
2026-04-14 20:35:22 +02:00
Calixte Denizet
22a4bd79af
Improve SMask compositing by pre-baking backdrop and filter
remove as much as possible some intermediate canvases and avoid to use SVG filter
at each composition.
Rendering all the pages of issue17784.pdf takes 2x less time now.
2026-04-14 20:18:03 +02:00
calixteman
ee72d8d460
Merge pull request #21102 from nicolo-ribaudo/fix-pattern-fill-deps-tracking
Fix dependency tracking in pattern fill
2026-04-14 18:04:45 +02:00
Nicolò Ribaudo
2ad6b88850
Fix dependency tracking in pattern fill
1. Record `fill` dependencies even if we early return due to `isPatternFill``
2. Isolate the `drawPattern` inner `executeOperationList` in a
   `CanvasNestedDependencyTracker` so that it does not consume pending
   dependencies from the outer list.
2026-04-14 14:16:26 +01:00
Jonas Jenwald
634ce3c163 Convert the return value in createCmapTable and createNameTable to a TypedArray
Compared to the other TrueType table building functions, see previous patches, these ones are not trivial to convert to use TypedArrays properly.
However, in order to simplify the `OpenTypeFileBuilder` implementation a little bit we can at least have these functions return TypedArray data.
2026-04-14 12:28:45 +02:00
Jonas Jenwald
e8ed6c6e24 Use a TypedArray in the createOS2Table function 2026-04-14 10:43:42 +02:00
Jonas Jenwald
aa0bc24e95 Use a TypedArray in the createPostTable function 2026-04-14 10:43:42 +02:00
calixteman
419c2652c3
Merge pull request #21094 from calixteman/issue17784
Correctly sync the transform on the scratch canvas
2026-04-13 23:58:20 +02:00
calixteman
1025af059f
Merge pull request #21099 from calixteman/no_gpu
Use the gpu for drawing meshes only when it has more than 16 triangles (bug 2030745)
2026-04-13 23:55:52 +02:00
calixteman
865b48893a
Correctly sync the transform on the scratch canvas
It fixes #17784.
2026-04-13 23:54:53 +02:00
calixteman
d1ef620541
Merge pull request #21096 from calixteman/issue13520
Fix blending issues while compositing
2026-04-13 22:40:12 +02:00
Calixte Denizet
a2c57ee69e
Use the gpu for drawing meshes only when it has more than 16 triangles (bug 2030745)
And in order to slightly improve performances, move the figure creation in the worker.
2026-04-13 22:23:03 +02:00
calixteman
22bcaf5a8a Fix blending issues while compositing
It fixes #13520.
And remove dead code.
2026-04-13 22:12:04 +02:00
calixteman
b82ceda22b
Merge pull request #21060 from calixteman/implement_merge
Add the UI for merging PDFs (bug 2028071)
2026-04-13 21:37:02 +02:00
calixteman
2417d9aecb
Merge pull request #21098 from calixteman/rm_workaround_1820511
Remove the workaround for bug 1820511
2026-04-13 21:28:49 +02:00
Tim van der Meij
7aca886f2b
Merge pull request #21097 from Snuffleupagus/convert-tables-TypedArray
Use TypedArrays when building more TrueType tables
2026-04-13 21:07:07 +02:00
Calixte Denizet
8c9b819b4e
Add the UI for merging PDFs (bug 2028071) 2026-04-13 19:38:56 +02:00
Calixte Denizet
ec35057b46
Remove the workaround for bug 1820511 2026-04-13 16:49:07 +02:00
calixteman
96debf0c81
Merge pull request #21095 from calixteman/issue19634
Take into account CharProcs keys when computing the type3 hash
2026-04-13 16:09:21 +02:00
calixteman
052e29cc56
Take into account CharProcs keys when computing the type3 hash
It fixes #19634.
2026-04-13 14:49:39 +02:00
Jonas Jenwald
2437f5f961 Use a TypedArray when building the "head" TrueType table 2026-04-13 12:41:41 +02:00
Jonas Jenwald
5096982cfc Use a TypedArray when building the "hhea" TrueType table 2026-04-13 12:41:41 +02:00
Jonas Jenwald
0c789ecc97 Use a TypedArray when building the "maxp" TrueType table 2026-04-13 12:41:41 +02:00
Jonas Jenwald
aaaf143156 Use a DataView when building the "hmtx" TrueType table (PR 21072 follow-up) 2026-04-13 12:41:38 +02:00
Jonas Jenwald
652700dac6
Merge pull request #21078 from Snuffleupagus/isTrueTypeFile-rm-readUint32
Remove `readUint32` usage from the `isTrueTypeFile` function
2026-04-12 21:34:20 +02:00
Jonas Jenwald
2e5ab9c9eb Remove unused helper functions in src/core/core_utils.js
After recent patches, that added more `DataView` usage, these helper functions are now unused.
2026-04-12 19:52:02 +02:00
Jonas Jenwald
c92d4be973 Remove readUint32 usage from the isTrueTypeFile function
This is the only `readUint32` usage in the `src/core/fonts.js` file, and it can be trivially replaced with a string comparison.
2026-04-12 19:50:53 +02:00
Jonas Jenwald
169d8c9616
Merge pull request #21077 from Snuffleupagus/FontRendererFactory-DataView
Re-factor the `FontRendererFactory` class, and related code, to use `DataView`s when reading data
2026-04-12 19:50:06 +02:00
Tim van der Meij
8cfb1f8456
Merge pull request #21093 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-12 19:39:05 +02:00
Jonas Jenwald
a24d86e1cf Re-factor the FontRendererFactory class, and related code, to use DataViews when reading data 2026-04-12 18:34:19 +02:00
Tim van der Meij
88abcefea0
Merge pull request #21080 from calixteman/recursive_glyf
Avoid infinite recursion while compiling a glyph
2026-04-12 18:32:03 +02:00
Tim van der Meij
89b195d35c
Merge pull request #21092 from Snuffleupagus/AnnotationEditorLayer-stopEvent
Use the `stopEvent` helper function in the `AnnotationEditorLayer` class
2026-04-12 18:31:31 +02:00
Tim van der Meij
0d61268875
Merge pull request #21091 from calixteman/debbuger_array_content_stream
[Debugger] Fix the content stream rendering when it's a ref to an array
2026-04-12 16:29:28 +02:00
Tim van der Meij
d3b00c3b32
Upgrade babel-plugin-istanbul to version 8.0.0
This is a major version bump, but the changelog at
https://github.com/istanbuljs/babel-plugin-istanbul/releases/tag/v8.0.0
doesn't indicate any breaking changes that should impact us (the
dependency update meant a bump of the minimal required Node.js version
to 18, but our minimal supported version is already higher than that).
2026-04-12 16:17:03 +02:00
Tim van der Meij
583c9d6b98
Update dependencies to the most recent versions
Note that the `globals` update rendered two ESLint ignore lines obsolete
because the `Sanitizer` global is now registered [1].

[1] 5d84602967
2026-04-12 16:16:21 +02:00
Calixte Denizet
b4d689ce06
Avoid infinite recursion while compiling a glyph 2026-04-12 14:55:22 +02:00
Tim van der Meij
006931f3d3
Merge pull request #21090 from calixteman/issue21089
Remove pattern fill when setting fill color before drawing a tile
2026-04-12 14:42:49 +02:00
Tim van der Meij
57acd97f6d
Merge pull request #21088 from Snuffleupagus/fonts-rm-int32-helper
Remove the `int32` helper, and replace it with `DataView` usage, in `src/core/fonts.js`
2026-04-12 14:25:14 +02:00
Jonas Jenwald
041f58f1e6 Use the stopEvent helper function in the AnnotationEditorLayer class 2026-04-12 14:23:52 +02:00
Tim van der Meij
01f5de36ad
Merge pull request #21087 from Snuffleupagus/Jbig2Image-DataView
Re-factor the `Jbig2Image` class, and related code, to use `DataView`s when reading data
2026-04-12 14:23:34 +02:00
Tim van der Meij
fbed36db00
Merge pull request #21082 from calixteman/fix_comb_ltr
Fix how the text is printed/saved in a comb field when it's a RTL one
2026-04-12 14:16:42 +02:00
Tim van der Meij
1a1e5dc296
Merge pull request #21083 from mozilla/dependabot/npm_and_yarn/basic-ftp-5.2.2
Bump basic-ftp from 5.2.1 to 5.2.2
2026-04-12 14:12:38 +02:00
calixteman
5cc5d9be45
[Debugger] Fix the content stream rendering when it's a ref to an array
It can be verified in opening stepped.pdf (see #21089).
2026-04-12 13:40:18 +02:00
calixteman
6d3034d4f9
Remove pattern fill when setting fill color before drawing a tile
It fixes #21089.
2026-04-12 13:08:45 +02:00
Jonas Jenwald
f924526f1a Remove the int32 helper, and replace it with DataView usage, in src/core/fonts.js
This helper function only had a single call-site, and it's easily replaced with a `DataView` method.
Additionally, to hopefully make future re-factoring easier, create a `DataView` for each TrueType table.
2026-04-12 10:01:14 +02:00
Jonas Jenwald
5089cceec7
Merge pull request #21086 from Snuffleupagus/JpegImage-DataView
Re-factor the `JpegImage` class, and related code, to use `DataView`s when reading data
2026-04-11 17:34:39 +02:00
Jonas Jenwald
afbded8da1 Re-factor the Jbig2Image class, and related code, to use DataViews when reading data 2026-04-11 16:44:15 +02:00
Jonas Jenwald
64e5a7021d Re-factor the JpegImage class, and related code, to use DataViews when reading data 2026-04-11 12:44:30 +02:00
dependabot[bot]
ec827e0766
Bump basic-ftp from 5.2.1 to 5.2.2
Bumps [basic-ftp](https://github.com/patrickjuchli/basic-ftp) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/patrickjuchli/basic-ftp/releases)
- [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patrickjuchli/basic-ftp/compare/v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: basic-ftp
  dependency-version: 5.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-10 22:09:53 +00:00
Calixte Denizet
fa9b2ae32c Fix how the text is printed/saved in a comb field when it's a RTL one 2026-04-10 22:48:18 +02:00
Jonas Jenwald
81c9a34fd3
Merge pull request #21079 from Snuffleupagus/CFFParser-DataView
Re-factor the `CFFParser` class to use `DataView`s when reading data
2026-04-10 19:56:46 +02:00
calixteman
7cfcafbb4b
Merge pull request #21069 from calixteman/issue21068
Take into account the alignment when printing/saving a comb field
2026-04-10 19:29:20 +02:00
Jonas Jenwald
dd9ed2040e Re-factor the CFFParser class to use DataViews when reading data 2026-04-10 17:44:19 +02:00
Jonas Jenwald
545b512e74
Merge pull request #21076 from Snuffleupagus/OpenTypeFileBuilder-DataView
Re-factor the `OpenTypeFileBuilder` class to use a `DataView` when writing data
2026-04-10 16:22:19 +02:00
Jonas Jenwald
cb3f956a11
Merge pull request #21073 from Snuffleupagus/TrueType-table-comments
Move some TrueType header comments to the correct lines
2026-04-10 15:08:24 +02:00
Jonas Jenwald
e9eabf051d Re-factor the OpenTypeFileBuilder class to use a DataView when writing data
Also, changes the `tables` field to a private `Map`.
2026-04-10 14:59:52 +02:00
calixteman
ca13d0089b
Merge pull request #21074 from mozilla/update-locales
l10n: Update locale files
2026-04-10 09:55:22 +02:00
github-actions[bot]
142f42559e l10n: Update locale files 2026-04-10 00:35:52 +00:00
Jonas Jenwald
a69b9ad033 Ensure that the built "hmtx" font table has valid widths (PR 21072 follow-up)
With the changes in PR 21072 the `string16` helper is no longer being used when building the "hmtx" table, which accidentally removed the development mode assert.
2026-04-09 23:15:02 +02:00
Jonas Jenwald
94f8934d05 Move some TrueType header comments to the correct lines
This is most likely fallout from the introduction of Prettier.
2026-04-09 22:55:38 +02:00
Tim van der Meij
ab124db046
Merge pull request #21072 from Snuffleupagus/hmtx-TypedArray
Use a TypedArray when building the "hmtx" font table
2026-04-09 21:26:45 +02:00
Tim van der Meij
27e171ea38
Merge pull request #21067 from mozilla/dependabot/npm_and_yarn/basic-ftp-5.2.1
Bump basic-ftp from 5.2.0 to 5.2.1
2026-04-09 21:23:36 +02:00
Jonas Jenwald
8f56ee2ae9 Use a TypedArray when building the "hmtx" font table
In this case it's trivial to compute the size of the data upfront, hence we can use a TypedArray which should be more efficient than a string.
2026-04-09 18:58:58 +02:00
calixteman
9efd9fa2c7
Merge pull request #21071 from Snuffleupagus/BBOX_INIT
Add constants for defining the initial BBox and Float32 BBox
2026-04-09 14:51:56 +02:00
calixteman
b5f52c49d0
Merge pull request #21070 from Snuffleupagus/ChunkedStream-getBytes-non-length-update-pos
Update the position when calling `ChunkedStream.prototype.getBytes` without a length
2026-04-09 14:00:52 +02:00
calixteman
1d48f17b98
Merge pull request #21065 from calixteman/issue19988
Dont revoke blob URLs while printing but do it after
2026-04-09 13:50:34 +02:00
Calixte Denizet
3d544294af Take into account the alignment when printing/saving a comb field
It fixes #21068.
2026-04-09 13:48:20 +02:00
Jonas Jenwald
2d8b25cd6d Update the position when calling ChunkedStream.prototype.getBytes without a length
Currently the code only updates the position when the length is defined, and it seems that this has "always" been wrong. Originally I believe that the `ChunkedStream` class was essentially a copy of the `Stream` class, and that implementation had the same problem until PR 20593.

Hopefully there's no code that relies on the current incorrect behaviour[1], since testing every aspect of the `ChunkedStream` implementation can be tricky given that these things are timing dependant.

---

[1] If there are, fixing those call-sites may be as easy calling `ChunkedStream.prototype.reset`.
2026-04-09 12:15:19 +02:00
dependabot[bot]
81644a7ee9
Bump basic-ftp from 5.2.0 to 5.2.1
Bumps [basic-ftp](https://github.com/patrickjuchli/basic-ftp) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/patrickjuchli/basic-ftp/releases)
- [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patrickjuchli/basic-ftp/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: basic-ftp
  dependency-version: 5.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 20:13:58 +00:00
Jonas Jenwald
0fd556f435 Take full advantage of the lookupRect helper in the FunctionBasedShading constructor 2026-04-08 20:30:20 +02:00
Jonas Jenwald
654985c621 Add constants for defining the initial BBox and Float32 BBox
Nowadays there's a lot of places in the code-base where we need to initialize or reset bounding boxes. Rather than spelling this out repeatedly, this patch adds new `Array`/`Float32Array` constants that can be copied or used as-is where appropriate.
2026-04-08 20:30:20 +02:00
Calixte Denizet
ea15ac31ef Dont revoke blob URLs while printing but do it after
It fixes #19988.

In Firefox, when printing, the document is cloned and use an image cache
which isn't available when there's a service worker.
2026-04-08 14:04:09 +02:00
Jonas Jenwald
a67b952118
Merge pull request #21062 from Snuffleupagus/compileIndex-TypedArray
Reduce allocations in `CFFCompiler.prototype.compileIndex` (PR 21053 follow-up)
2026-04-07 21:47:39 +02:00
calixteman
59c21e3110
Merge pull request #21061 from calixteman/pattern_perf
Avoid as much as possible to have intermediate canvases
2026-04-07 21:07:45 +02:00
Calixte Denizet
00ea8db6bf
Avoid as much as possible to have intermediate canvases
We try to detect in the worker if some patterns or groups need to be drawn or not in isolation.
When they don't, we just draw them on the main canvas instead of drawing on a new canvas.
A pattern or a group is considered as being in isolation if it has some compositing rules or some transparency.

It improves the rendering performance of the pdf in bug 1731514.
2026-04-07 21:03:43 +02:00
Tim van der Meij
70baf9cd5f
Merge pull request #21057 from mozilla/dependabot/github_actions/codecov/codecov-action-6.0.0
Bump codecov/codecov-action from 5.5.2 to 6.0.0
2026-04-07 20:41:50 +02:00
Tim van der Meij
36f63bebcc
Merge pull request #21058 from mozilla/dependabot/github_actions/actions/deploy-pages-5.0.0
Bump actions/deploy-pages from 4.0.5 to 5.0.0
2026-04-07 20:41:32 +02:00
Tim van der Meij
1f2e4adfc5
Merge pull request #21050 from Snuffleupagus/Ascii85Stream-fill
Replace a couple of loops with `TypedArray.prototype.fill()` in the `src/core/ascii_85_stream.js` file
2026-04-07 20:38:27 +02:00
Tim van der Meij
60668707fb
Merge pull request #21056 from mozilla/dependabot/github_actions/github/codeql-action-4.35.1
Bump github/codeql-action from 4.33.0 to 4.35.1
2026-04-07 20:34:12 +02:00
Jonas Jenwald
7b1b1a9153 Reduce allocations in CFFCompiler.prototype.compileIndex (PR 21053 follow-up)
It's possible to compute the final index-data size upfront, thus avoiding a bunch of intermediate allocations during index compilation.
This also means that a TypedArray can be used, rather than a plain Array, making it more efficient to insert the `objects` data.

This helps PDFs with large and complex CFF fonts the most, for example the PDFs in https://bugs.ghostscript.com/show_bug.cgi?id=706451 render ~40 percent faster (based on quick measurements in the viewer with `#pdfBug=Stats`).
2026-04-07 18:38:10 +02:00
calixteman
d6afffe8f6
Merge pull request #21059 from calixteman/bug2028193
Make sure the thumbnails positions are recomputed after a structural change but after a reflow has been done (bug 2028193)
2026-04-07 17:02:07 +02:00
calixteman
f61e00f2fa
Merge pull request #21054 from calixteman/fix_writing_numbers
Fix the way to write numbers when saving a pdf
2026-04-07 16:55:36 +02:00
calixteman
1bf1ef2939
Merge pull request #21053 from Snuffleupagus/CFFCompiler-TypedArray
Reduce allocations when compiling CFF fonts
2026-04-07 16:55:02 +02:00
Calixte Denizet
1b2e98f3ce
Make sure the thumbnails positions are recomputed after a structural change but after a reflow has been done (bug 2028193) 2026-04-07 15:48:23 +02:00
Jonas Jenwald
6f0431456c Reduce allocations when compiling CFF fonts
Currently the `CFFCompiler.prototype.compile` implementation seem a bit inefficient, since the data is stored in a plain Array that needs to grow (a lot) during compilation. Additionally, adding a lot of entries isn't very efficient either and requires special handling of the "too many elements" case.
Some of the "helper" methods that use TypedArrays internally currently need to convert their return data to plain Arrays, via the `compileTypedArray` method, which adds even more intermediate allocations.
Note also that the `OpenTypeFileBuilder` has a special-case for writing plain Array data, which is only needed because of how the CFF compilation is implemented.

To improve this situation the `CFFCompiler.prototype.compile` method is re-factored to store its data in a TypedArray, whose initial size is estimated from the "raw" file size.
This removes the need for most intermediate allocations, and it also handles adding of "many elements" more efficiently.
2026-04-07 14:27:55 +02:00
dependabot[bot]
147ce2b2d2
Bump actions/deploy-pages from 4.0.5 to 5.0.0
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 4.0.5 to 5.0.0.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](d6db90164a...cd2ce8fcbc)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-07 12:13:42 +00:00
dependabot[bot]
d936f9775b
Bump codecov/codecov-action from 5.5.2 to 6.0.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.2 to 6.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](671740ac38...57e3a136b7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-07 12:13:24 +00:00
dependabot[bot]
2ce0b5a528
Bump github/codeql-action from 4.33.0 to 4.35.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.33.0 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b1bff81932...c10b8064de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-07 12:13:16 +00:00
calixteman
959701d8e7
Merge pull request #21055 from Snuffleupagus/toggleButton-fix-l10n
Fix the l10n-id for the sidebar toggleButton, in the `ViewsManager` class
2026-04-07 13:44:42 +02:00
Jonas Jenwald
8656b4acb3 Fix the l10n-id for the sidebar toggleButton, in the ViewsManager class
Steps to reproduce:
 1. Open http://localhost:8888/web/viewer.html
 2. Open the console, and run: `PDFViewerApplication.close();`
 3. Note the warning: `[fluent] Missing translations in en-us: pdfjs-toggle-views-manager-button`
2026-04-07 11:13:35 +02:00
Calixte Denizet
3d95aab8d7
Fix the way to write numbers when saving a pdf
It'll avoid to have numbers like 1e-23.
2026-04-07 10:52:06 +02:00
Jonas Jenwald
f8d7c20a1a
Merge pull request #21051 from Snuffleupagus/writePDF-stringToBytes
Use the `stringToBytes` helper in the `PDFEditor.prototype.writePDF` method
2026-04-06 15:55:49 +02:00
Jonas Jenwald
ea12a28e2f Use the stringToBytes helper in the PDFEditor.prototype.writePDF method
This avoids effectively re-implementing an existing helper function, and the code is also simplified a tiny bit by building the final TypedArray header directly.
2026-04-06 14:58:21 +02:00
calixteman
6ac79d05d1
Merge pull request #21049 from calixteman/load_gpu
Unconditionally create a gpu device
2026-04-06 14:14:22 +02:00
calixteman
a9f142c796
Unconditionally create a gpu device
One drawback of the current implementation is that the GPU device can be
unavailable at the time of the first pattern fill, which causes the
GPU-accelerated canvas to be move on the main thread because of putImageData.

Most of the shading patterns stuff will be moved to the GPU and in order
to avoid creating some useless data we've to know if the GPU is available or not.

So in this patch we create the GPU device during the worker initialization
and pass a flag to the evaluator to know if the GPU is available or not.
2026-04-06 13:23:29 +02:00
Jonas Jenwald
dc448b3ceb Replace a couple of loops with TypedArray.prototype.fill() in the src/core/ascii_85_stream.js file 2026-04-06 11:49:25 +02:00
Tim van der Meij
dd8f0a327f
Merge pull request #21048 from Snuffleupagus/buildPostScriptJsFunction-forceInterpreter
Shorten the `src/core/postscript/` code a tiny bit
2026-04-05 18:19:33 +02:00
Jonas Jenwald
9f9be2c619 Use this more in static methods in the src/core/postscript/ folder
Inside of static methods it's possible to reference static fields with `this`, rather than having to spell out the full class name.
2026-04-05 14:22:08 +02:00
Jonas Jenwald
ccab310a39 Add an optional parameter in buildPostScriptJsFunction to force use of the PSStackBasedInterpreter code
This way the test-only function `buildPostScriptProgramFunction` can be removed.
2026-04-05 13:52:09 +02:00
calixteman
853d5436c1
Merge pull request #21046 from timvandermeij/integration-test-ai-killswitch
Replace individual AI/ML disabling preferences with the single killswitch preference in the tests
2026-04-05 13:12:48 +02:00
Jonas Jenwald
cae075e8d0
Merge pull request #21047 from Snuffleupagus/AnnotationLayer-rm-floor-borderColor
Remove unnecessary "flooring" of the components when setting the Annotation `borderColor`
2026-04-05 12:41:04 +02:00
Jonas Jenwald
5aaf30a071
Merge pull request #21018 from Snuffleupagus/Node-22
[api-minor] Update the minimum supported Node.js version to 22
2026-04-05 12:39:36 +02:00
Jonas Jenwald
d155506005 Remove unnecessary "flooring" of the components when setting the Annotation borderColor
This looks like a leftover from much older code, since all colors are now parsed with the [`getRgbColor` helper](ca85d73335/src/core/annotation.js (L558-L583)) which returns `Uint8ClampedArray` data when the color is valid.

Also, use spread syntax when calling `Util.makeHexColor` in a few more spots.
2026-04-05 11:23:32 +02:00
Tim van der Meij
de9f139963
Replace individual AI/ML disabling preferences with the single killswitch preference in the tests
Firefox 148 shipped with a single killswitch to disable current and
future AI/ML functionality. This can be controlled in the GUI via
`Settings -> AI Controls -> Block AI enhancements`, but can also be
controlled programmatically via the `browser.ai.control.default`
preference.

This commit uses this single preference to replace the multiple
preferences we had to use for this purpose before.

Extends 844681a.
2026-04-04 20:23:35 +02:00
calixteman
ca85d73335
Merge pull request #21043 from timvandermeij/integration-test-intermittents-find-count
Fix intermittent integration test failures related to checking the find count results text
2026-04-04 20:21:52 +02:00
calixteman
da83ca69ca
Merge pull request #21045 from timvandermeij/integration-test-comment-trip
Fix intermittent failure in the "must check that the comment sidebar is resizable with the keyboard" comment integration test
2026-04-04 20:19:14 +02:00
calixteman
b5dd450041
Merge pull request #21040 from Snuffleupagus/constructSampled-flat-arrays
Use the original array-data when parsing Type 0 (Sampled) Functions
2026-04-04 19:56:54 +02:00
calixteman
345329e490
Merge pull request #21041 from timvandermeij/function-type-enumeration
Introduce a function type enumeration
2026-04-04 19:55:46 +02:00
Tim van der Meij
24e5377240
Fix intermittent failure in the "must check that the comment sidebar is resizable with the keyboard" comment integration test
In PR #20887 the issue got fixed partly, but two issues remained that
unintendedly left room for intermittent failres:

- in the "Ctrl+ArrowLeft/Right" loop the `waitForBrowserTrip` call was
  placed _before_ the actual keypresses, which means that for the final
  iteration of the loop the last key presses were not properly awaited;

- in the "ArrowLeft/ArrowRight" loop the `waitForBrowserTrip` call was
  absent, which means that we didn't wait for key presses at all.

This commit fixes the issues by consistently waiting to a browser trip
_after_ each key press to make sure the sidebar got a chance to render.
2026-04-04 19:17:54 +02:00
Tim van der Meij
6dccf85a0b
Fix intermittent integration test failures related to checking the find count results text
There is generally a small amount of time between the find call being
reported as finished and the find count results text being updated with
the correct number in the DOM, so the integration tests will fail if we
check the find results count text too soon.

This commit fixes the issue by using the `waitForTextToBe` helper
function to wait until the find count results text is what we expect it
to be. Note that we already use this helper function for this exact
purpose in other integration tests (related to reorganizing pages), and
it's also a little bit shorter/easier to read which cannot hurt.
2026-04-04 16:55:12 +02:00
Tim van der Meij
68da778329
Introduce a function type enumeration
This improves readability by removing "magic" numbers, and matches what
we already have for e.g. annotation and shading types.

Note that function type 1 does not exist in the specification, but that
also applies to everything higher than 4, so we can also remove the
specific handling of function type 1 and instead just let it fall
through to throwing an exception for unknown function types, in which we
now also log the provided function type to aid debugging.
2026-04-04 14:57:59 +02:00
Jonas Jenwald
fa344c1852 Use the original array-data when parsing Type 0 (Sampled) Functions
It seems just as easy to lookup the needed data in the original arrays, rather than having to first create (and allocate) nested arrays for that purpose.
2026-04-04 14:07:21 +02:00
Tim van der Meij
e10f11bd3a
Merge pull request #21038 from Snuffleupagus/add_test-calculateMD5
Use the `calculateMD5` helper, from `test/downloadutils.mjs`, in `test/add_test.mjs`
2026-04-04 14:01:55 +02:00
Jonas Jenwald
6207116e9b Use the calculateMD5 helper, from test/downloadutils.mjs, in test/add_test.mjs
Avoid essentially duplicating that function, and make `test/add_test.mjs` async to simplify the code a little bit.
2026-04-04 12:31:14 +02:00
Tim van der Meij
bc38b633ee
Merge pull request #21035 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-04 11:33:08 +02:00
Tim van der Meij
0b9f8fa950
Merge pull request #21036 from calixteman/fix_comment
Fix comments for (is/has)Singlefile in pdf_editor
2026-04-04 11:30:12 +02:00
Jonas Jenwald
fe35a87c85
Merge pull request #21005 from Snuffleupagus/rm-PostScriptCompiler
[api-minor] Remove `PostScriptCompiler` and `PostScriptEvaluator`, since it's now dead code (PR 21023 follow-up)
2026-04-04 11:02:34 +02:00
Jonas Jenwald
c7b17ecc26
Merge pull request #21037 from Snuffleupagus/rm-compilePostScriptToIR
Remove the unused `compilePostScriptToIR` function (PR 21023 follow-up)
2026-04-04 10:59:29 +02:00
Jonas Jenwald
4cf0bf410b Remove the unused compilePostScriptToIR function (PR 21023 follow-up)
This function was added in PR 21010, and it became unused in PR 21023.
2026-04-03 22:47:12 +02:00
Jonas Jenwald
0e6903d11e Bump library version to 5.7
See commit a40b91f0bba70c65fe6ac7baba775f7e4b362a4d
2026-04-03 22:29:55 +02:00
Jonas Jenwald
58fc6026fc Add a linked test-case for PR 5134
This test-case is an especially "bad" one performance wise given its PostScript function use, when falling back to the (now removed) `PostScriptEvaluator` code.
2026-04-03 22:29:38 +02:00
calixteman
b3e4932cca
Fix comments for (is/has)Singlefile in pdf_editor 2026-04-03 22:15:34 +02:00
Jonas Jenwald
f6bac014ea [api-minor] Remove PostScriptCompiler and PostScriptEvaluator, since it's now dead code (PR 21023 follow-up)
These classes, and various related code, became unused after PR 21023 with only unit-tests actually running that code now.

Also removes the `isEvalSupported` API option, since the `PostScriptCompiler` was the only remaining code where `eval` was used.
2026-04-03 22:14:14 +02:00
calixteman
5347c22703
Merge pull request #21020 from calixteman/issue7821
Fix the annotation base transform before drawing it
2026-04-03 21:26:48 +02:00
calixteman
f8f21c0eca
Merge pull request #21030 from calixteman/eslint_math_clamp
Add an eslint plugin for using MathClamp when it's possible
2026-04-03 21:19:35 +02:00
Calixte Denizet
1e3d688a32
Add an eslint plugin for using MathClamp when it's possible 2026-04-03 21:12:52 +02:00
Calixte Denizet
9ed5eef6d7
Fix the annotation base transform before drawing it
It fixes #7821.

We do something similar for before drawing XObjects.
2026-04-03 20:59:37 +02:00
calixteman
f05bad9872
Merge pull request #21019 from calixteman/issue16091
Get the right transform for a pattern before filling some text
2026-04-03 20:57:29 +02:00
Calixte Denizet
a1b64c52a1
Get the right transform for a pattern before filling some text
It fixes #16091.
2026-04-03 20:54:22 +02:00
Tim van der Meij
a6a66c077e
Fix vulnerabilities in dependency versions
This patch is generated automatically using `npm audit fix`, and brings
the number of reported vulnerabilities to zero.
2026-04-03 20:37:53 +02:00
Tim van der Meij
b6d5f122e3
Upgrade eslint-plugin-unicorn to version 64.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v64.0.0
doesn't indicate any breaking changes that should impact us.
2026-04-03 20:34:53 +02:00
Tim van der Meij
e97c847e93
Update dependencies to the most recent versions 2026-04-03 20:34:10 +02:00
Tim van der Meij
d1a711bca3
Merge pull request #21023 from calixteman/wasm_stack_js
Add a js fallback for interpreting ps code
2026-04-03 20:09:29 +02:00
Tim van der Meij
a96fb4dbb8
Merge pull request #21014 from calixteman/issue257
Fix radial gradient when the two circles have an intersection
2026-04-03 20:00:37 +02:00
Tim van der Meij
255c3e7c14
Merge pull request #21028 from Snuffleupagus/PDFDataRangeTransport-listener
[api-minor] Change `PDFDataRangeTransport` to use a single (internal)  listener
2026-04-03 19:53:39 +02:00
Tim van der Meij
bb1033053c
Merge pull request #21029 from Snuffleupagus/Object-hasOwn
Replace all `Object.prototype.hasOwnProperty` usage with `Object.hasOwn`
2026-04-03 19:51:09 +02:00
Jonas Jenwald
477f756a76
Merge pull request #21027 from Snuffleupagus/move-MathClamp
Move the `MathClamp` helper function to its own file
2026-04-03 19:08:12 +02:00
Tim van der Meij
38981ce638
Merge pull request #21034 from Snuffleupagus/collectAnnotationsByType-fixes
A couple of small `collectAnnotationsByType` improvements
2026-04-03 18:02:32 +02:00
Tim van der Meij
264c2bf6f9
Merge pull request #21031 from calixteman/fix_font_int16
Fix wrong values when sanitizing fonts
2026-04-03 17:58:31 +02:00
Tim van der Meij
cc5e30b99c
Merge pull request #21021 from Snuffleupagus/PDFThumbnailView-unconditional-OffscreenCanvas
Use `OffscreenCanvas` unconditionally in the `web/pdf_thumbnail_view.js` file
2026-04-03 17:57:04 +02:00
Jonas Jenwald
5b6640eab3 A couple of small collectAnnotationsByType improvements
- Use the same `PartialEvaluator` instance for all annotations on the page, to reduce unnecessary object creation.

 - Use `Object.hasOwn` to check if the annotations were already parsed, to avoid having to keep a separate boolean variable in-sync with the actual code.
2026-04-03 13:20:06 +02:00
calixteman
2414f54675
Merge pull request #21033 from mozilla/update-locales
l10n: Update locale files
2026-04-03 09:18:17 +02:00
github-actions[bot]
b1cedd9daa l10n: Update locale files 2026-04-03 00:34:35 +00:00
Calixte Denizet
535c8d13c2 Fix wrong values when sanitizing fonts
NPUSHW: push signed 16-bits integer: https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions#push-n-words
indexToLocFormat: field in the 'head' table: https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6head.html#:~:text=indexToLocFormat,-0
2026-04-02 18:13:17 +02:00
Jonas Jenwald
cbfe2abc53 Replace all Object.prototype.hasOwnProperty usage with Object.hasOwn
The newer `Object.hasOwn` method is intended as a replacement for `Object.prototype.hasOwnProperty`, since that one may be problematical; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn#problematic_cases_for_hasownproperty

To ensure that `Object.hasOwn` is used in the future, the ESLint "no-restricted-syntax" rule is extended to catch the old method.
2026-04-02 13:40:10 +02:00
Jonas Jenwald
f09b03c062 Enable the prefer-object-has-own ESLint rule
Please see https://eslint.org/docs/latest/rules/prefer-object-has-own
2026-04-02 13:24:31 +02:00
Jonas Jenwald
f3a2ca08d0 [api-minor] Change PDFDataRangeTransport to use a single (internal) listener
The `PDFDataTransportStream` constructor has always registered exactly one listener for each type of data that an `PDFDataRangeTransport` instance can receive.
Given that an end-user of the `PDFDataRangeTransport` class will supply data through its `onData...` methods, it's also somewhat difficult to understand why additional end-user registered listeners would be needed (since the data is already, by definition, available to the user).
Furthermore, since TypedArray data is being transferred nowadays it's not even clear that multiple listeners (of the same kind) would generally work.

All in all, let's simplify this old code a little bit by using *a single* (internal) listener in the `PDFDataRangeTransport` class.
2026-04-02 12:38:58 +02:00
Jonas Jenwald
68366e31e4 Move the MathClamp helper function to its own file
This allows using it in the `src/scripting_api/` folder, without increasing the size of the scripting-bundle by also importing a bunch of unused code.
2026-04-02 11:22:28 +02:00
Jonas Jenwald
1bd4c4fbde
Merge pull request #21026 from Snuffleupagus/more-MathClamp
Use the `MathClamp` helper function more
2026-04-02 11:21:46 +02:00
Jonas Jenwald
c012ff6e10 Use the MathClamp helper function more
The idea with this helper function is that once https://github.com/tc39/proposal-math-clamp/ becomes stable, all its call-sites should then be replaced by the native functionality.
2026-04-02 10:10:39 +02:00
calixteman
e37709ea76
Merge pull request #21022 from calixteman/bug2028369
Encrypt pdf data when merging the same pdf (bug 2028369)
2026-04-01 22:28:59 +02:00
calixteman
8c7a5f3500
Add a js fallback for interpreting ps code
It's a basic stack based interpreter.
A wasm version will come soon.
2026-04-01 21:40:45 +02:00
Calixte Denizet
f373923170 Encrypt pdf data when merging the same pdf (bug 2028369) 2026-04-01 19:01:11 +02:00
Jonas Jenwald
579589a38a Use OffscreenCanvas unconditionally in the web/pdf_thumbnail_view.js file
Given that `OffscreenCanvas` is available in all supported browsers and that the code in the `web/` folder is only intended to run in browsers, the fallback should no longer be necessary.

Please note:
 - https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
 - https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#browser_compatibility
2026-04-01 16:32:07 +02:00
Jonas Jenwald
e0423ebbe4 [api-minor] Update the minimum supported Node.js version to 22
This patch updates the minimum supported environments as follows:
 - Node.js 22, which was initially released on 2024-04-24 and has now entered the "Maintenance"-phase; see https://github.com/nodejs/release#release-schedule

Furthermore, note also that Node.js 20 will reach end-of-life on 2026-04-30 which coincides (approximately) with the next PDF.js release.
2026-04-01 12:06:32 +02:00
Calixte Denizet
b42dd39aae
Fix radial gradient when the two circles have an intersection
Fix #257.
2026-04-01 09:43:08 +02:00
calixteman
399fce6471
Merge pull request #21010 from calixteman/ps_js
Add an interpreter for optimized ps code
2026-03-31 22:21:00 +02:00
calixteman
f33f816991
Merge pull request #21012 from calixteman/shading_function
Add support for function-based shadings (bug 1254066)
2026-03-31 22:08:17 +02:00
Calixte Denizet
9f3de1edf6
Add an interpreter for optimized ps code
It'll be used as a fallback when wasm is disabled.
And add in the debugger a view for the generated js code and one for the ps code.
2026-03-31 21:00:22 +02:00
Calixte Denizet
3727b7095a Add support for function-based shadings (bug 1254066)
It fixes #5046.
We just generate a mesh for the pattern rectangle where the color of each vertex is computed from the function.
Since the mesh is generated in the worker we don't really take into account the current transform when it's drawn.
That being said, there are maybe some possible improvements in using directly the gpu for the shading creation
which could then take into account the current transform, but it could only work with ps function we can convert
ino wgsl language and simple enough color spaces (gray and rgb).
2026-03-31 20:46:01 +02:00
Tim van der Meij
58b807d8e8
Merge pull request #21008 from calixteman/ast_cse
Avoid expressions duplication in the ps AST and use a local instead when compiling to WASM
2026-03-31 20:21:59 +02:00
Tim van der Meij
b0c0680bea
Merge pull request #18815 from calixteman/dont_always_use_pattern
Don't use an intermediate canvas when rendering a tiling pattern bigger than the rectangle to fill
2026-03-31 20:18:08 +02:00
Tim van der Meij
48228e2756
Merge pull request #21013 from calixteman/bug2026956
Add attachments when merging/reorganizing a pdf (bug 2026956)
2026-03-31 20:17:54 +02:00
Tim van der Meij
d1c3d3938e
Merge pull request #21007 from Snuffleupagus/Node-getReadableStream-simplify
[Node.js] Remove the `node-readable-to-web-readable-stream` polyfill
2026-03-31 20:03:40 +02:00
Calixte Denizet
5b8c04f383 Add attachments when merging/reorganizing a pdf (bug 2026956) 2026-03-31 14:48:06 +02:00
Calixte Denizet
4c019e7712
Don't use an intermediate canvas when rendering a tiling pattern bigger than the rectangle to fill 2026-03-30 18:38:56 +02:00
Calixte Denizet
63cf35b47f Avoid expressions duplication in the ps AST and use a local instead when compiling to WASM 2026-03-30 16:30:33 +02:00
Jonas Jenwald
bfffb6c0f0 Import fs/promises directly in a few spots in the unit-tests
Also, use the existing PDF.js helper function to fetch text-data when running the "bidi" tests in browsers.
2026-03-30 14:34:53 +02:00
Jonas Jenwald
90fe6c70ff [Node.js] Remove the node-readable-to-web-readable-stream polyfill
While `Readable.toWeb` wasn't marked as stable until more recently, the functionality itself has existed since Node.js version `17.0.0`; note https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options

Hence the polyfill shouldn't actually be necessary, which is confirmed by the unit-tests passing in Node.js version `20` in GitHub Actions.
2026-03-30 13:45:13 +02:00
calixteman
a40b91f0bb
Merge pull request #21002 from calixteman/ps_eval
[api-minor] Rewrite the ps lexer & parser and add a small Wasm compiler
2026-03-30 09:23:13 +02:00
calixteman
952952c905
[api-minor] Rewrite the ps lexer & parser and add a small Wasm compiler
The main goal is to remove the eval-based interpreter.
In order to have some good performances, the new parser performs some optimizations
on the AST (similar to the ones in the previous implementation),
and the Wasm compiler generates code for the optimized AST.
For now, in case of errors or unsupported features, the Wasm compiler returns null
and the old interpreter is used as a fallback.
Few things are still missing:
 - a wasm-based interpreter using a stack (in case the ps code isn't stack-free);
 - a better js implementation in case of disabled wasm.

 but they will be added in follow-up patches.
2026-03-30 09:22:33 +02:00
Tim van der Meij
cb2640dc33
Merge pull request #21004 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-03-29 20:48:47 +02:00
Tim van der Meij
806d071ea8
Bump the stable version in pdfjs.config 2026-03-29 20:45:34 +02:00
Tim van der Meij
ada3438039
Merge pull request #21001 from Snuffleupagus/getDestFromStructElement-unit-test
Add a unit-test for the `Catalog.#getDestFromStructElement` method
2026-03-29 16:08:21 +02:00
Tim van der Meij
9026329d3d
Merge pull request #21003 from Snuffleupagus/applyOpacity-map
Simplify the `applyOpacity` helper function
2026-03-29 16:06:28 +02:00
Tim van der Meij
80d0d7349c
Merge pull request #20997 from Snuffleupagus/StatTimer-Map
Re-factor the `StatTimer` class a little bit
2026-03-29 16:05:15 +02:00
Tim van der Meij
37f5902c3c
Merge pull request #20996 from Snuffleupagus/more-logical-assignment
Use more logical assignment in the code-base
2026-03-29 16:03:40 +02:00
Tim van der Meij
8941695fe8
Merge pull request #20998 from Snuffleupagus/statcmp-import
Use a standard import for the `ttest` package in `test/stats/statcmp.js`
2026-03-29 16:01:34 +02:00
Tim van der Meij
cdae7a9b36
Merge pull request #20993 from mozilla/update-locales
l10n: Update locale files
2026-03-29 15:59:53 +02:00
Jonas Jenwald
498daadf3c Simplify the applyOpacity helper function
This function only has a single call-site (if we ignore the unit-tests), where the colors are split into separate parameters.
Given that all the color components are modified in the exact same way, it seems easier (and shorter) to pass the colors as-is to `applyOpacity` and have it use `Array.prototype.map()` instead.
2026-03-29 14:52:06 +02:00
Jonas Jenwald
5d2c4ed211
Merge pull request #20999 from Snuffleupagus/getRGB-rgba-split-limit
Remove a tiny bit of unnecessary "rgba" parsing in the `getRGB` function
2026-03-29 14:04:52 +02:00
Jonas Jenwald
d1f15fe352 Add a unit-test for the Catalog.#getDestFromStructElement method
This code already has an integration-test, however also having a unit-test shouldn't hurt since those are often easier to run and debug (and it nicely complements the existing `outline` unit-tests).

The patch also makes the following smaller changes to the method itself:
 - Avoid creating and parsing an empty Array, when doing the `pageRef` search.
 - Use `XRef.prototype.fetch` directly, when walking the parent chain, since the check just above ensures that the value is a Reference.
 - Use the `lookupRect` helper when parsing the /BBox entry.
2026-03-29 14:01:43 +02:00
Jonas Jenwald
8121bc0dd2 Remove a tiny bit of unnecessary "rgba" parsing in the getRGB function
This obviously won't matter in practice, however it seems more "correct" to only extract the necessary number of color components rather than slicing off excess ones at the end.
2026-03-29 12:13:59 +02:00
Jonas Jenwald
545656007b Use a standard import for the ttest package in test/stats/statcmp.js
Since this code is quite old parts of it can also be simplified a little bit by using modern string methods, which removes the need for the `pad` helper function.
2026-03-29 11:53:44 +02:00
Jonas Jenwald
256be7f3a6 Remove manual loops in the StatTimer.prototype.toString method
We can use Array methods instead, which is a tiny bit shorter.
2026-03-27 15:35:25 +01:00
Jonas Jenwald
522f5f85b9 Re-factor the StatTimer class to track started times in a private Map 2026-03-27 15:35:23 +01:00
Jonas Jenwald
0060eeb726 Use more logical assignment in the code-base 2026-03-27 12:18:04 +01:00
github-actions[bot]
5836d3fc8f l10n: Update locale files 2026-03-27 00:34:30 +00:00
calixteman
a9e439bce1
Merge pull request #20977 from calixteman/bug2026037
Use non-breakable spaces in options for the choice widget (bug 2026037)
2026-03-26 23:55:49 +01:00
Calixte Denizet
013a209e77
Use non-breakable spaces in options for the choice widget (bug 2026037)
Usual white spaces are collapsed.
2026-03-26 23:52:46 +01:00
calixteman
0128ead18a
Merge pull request #20985 from calixteman/bug2023150_2
Avoid to be blocked when searching after a page move (bug 2023150)
2026-03-26 23:28:33 +01:00
calixteman
47513119e8
Merge pull request #20991 from calixteman/bug2026639
Avoid to have multiple selected pages after copy/cut operations (bug 2026639)
2026-03-26 22:26:00 +01:00
calixteman
018c1539dd
Merge pull request #20957 from calixteman/issue20956
Break text chunks only if the base font is different
2026-03-26 22:24:23 +01:00
calixteman
27e619f00d
Merge pull request #20992 from calixteman/organize_avoid_exception
Avoid exception when cloning a page with some modified annotations
2026-03-26 22:15:06 +01:00
Calixte Denizet
2e3d79e616
Break text chunks only if the base font is different
It fixes #20956.
2026-03-26 21:39:32 +01:00
calixteman
484518614d
Merge pull request #20976 from calixteman/bidi_tests
Add the bidi tests coming from BidiTest.txt and BidiCharacterTest.txt
2026-03-26 21:36:18 +01:00
Calixte Denizet
f98ce9ca85
Avoid to have multiple selected pages after copy/cut operations (bug 2026639) 2026-03-26 21:35:10 +01:00
calixteman
466c6263ad
Merge pull request #20974 from calixteman/bug2025674
Don't walk the children of a node having some attached MathML (bug 2025674)
2026-03-26 21:33:13 +01:00
Calixte Denizet
2b20e012bb
Avoid exception when cloning a page with some modified annotations
Some tests will come later.
2026-03-26 20:53:09 +01:00
Tim van der Meij
377f6d8b73
Merge pull request #20984 from calixteman/debugger_dont_update_canvas_view
Update the canvas detail view only when drawing is done
2026-03-26 20:41:22 +01:00
Tim van der Meij
a924af2e0b
Merge pull request #20990 from calixteman/bug2026564
Hide the new badge while a page is selected (bug 2026564)
2026-03-26 20:35:56 +01:00
Tim van der Meij
bf7d25b35c
Merge pull request #20975 from Snuffleupagus/AnnotationStorage-rm-typeof-function
Use optional chaining rather than `typeof` checks when invoking the `AnnotationStorage` callbacks
2026-03-26 20:35:24 +01:00
Tim van der Meij
f52a50ba09
Merge pull request #20986 from Snuffleupagus/FontInfo-readString-simplify
Reduce allocations in the `FontInfo.prototype.#readString` method (PR 20197 follow-up)
2026-03-26 20:34:03 +01:00
Tim van der Meij
8531947112
Merge pull request #20978 from calixteman/debugger_tree_whitespace
Debugger: in the tree view, display the white spaces as they're
2026-03-26 20:30:32 +01:00
Tim van der Meij
d3fd72e7e8
Merge pull request #20982 from calixteman/debugger_images_preview
Display mask in the tree view in the debugger
2026-03-26 20:29:42 +01:00
Tim van der Meij
5716b6e8b5
Merge pull request #20972 from Snuffleupagus/downloadFile-skip-duplicates
Avoid downloading test PDFs multiple times
2026-03-26 20:26:52 +01:00
Tim van der Meij
c41403cc5e
Merge pull request #20979 from mozilla/dependabot/npm_and_yarn/multi-bf05dc1ecf
Bump picomatch
2026-03-26 20:25:17 +01:00
Calixte Denizet
b1d93d0e51 Hide the new badge while a page is selected (bug 2026564) 2026-03-26 19:23:04 +01:00
Calixte Denizet
2d43ba2b67 Avoid to be blocked when searching after a page move (bug 2023150) 2026-03-26 16:49:44 +01:00
Jonas Jenwald
42566f40fb Reduce allocations in the FontInfo.prototype.#readString method (PR 20197 follow-up)
Looking at the very similar `CssFontInfo.prototype.#readString` and `SystemFontInfo.prototype.#readString` methods they decode using the data as-is, but the `FontInfo.prototype.#readString` method for some reason copies the data into a new `Uint8Array` first; fixes yet another bug/inefficiency in PR 20197.
2026-03-26 16:49:41 +01:00
calixteman
601d961fc3
Merge pull request #20900 from wooorm/wooorm/image-mask-perf
Refactor to improve performance around image masks (bug 1941562)
2026-03-26 16:10:30 +01:00
Calixte Denizet
c2ba6b0e33 Update the canvas detail view only when drawing is done
And remove the canvas from the view once it's destroyed.
2026-03-26 15:51:46 +01:00
Titus Wormer
e914326346
Refactor to improve performance around image masks (bug 1941562)
* add support for directly writing masks into `rgbaBuf` if their size matches
* add support for writing into `rgbaBuf` to `resizeImageMask` to avoid extra
  allocs/copies
* respect `actualHeight` to avoid unnecessary work on non-emitted rows
* mark more operations as `internal`

This changes the path for what I believe is the common case for masks:
a mask to add transparency to the accompanying opaque image, both being
equal in size.
The other paths are not meaninfully unchanged.
That increases my confidence as these new paths can be easily tested
with a PNG with transparency.
2026-03-26 14:39:50 +01:00
Calixte Denizet
867af5c1e5
Display mask in the tree view in the debugger 2026-03-26 14:35:31 +01:00
Jonas Jenwald
9be671dbbd
Merge pull request #20980 from Snuffleupagus/CanvasExtraState-rm-preInit
Remove unused `preInit` parameter from the `CanvasExtraState` constructor (PR 19043 follow-up)
2026-03-26 14:27:39 +01:00
Jonas Jenwald
39dd02cf32 Remove unused preInit parameter from the CanvasExtraState constructor (PR 19043 follow-up)
This parameter was added in PR 19043, however it never actually appears to have been used.
2026-03-26 11:07:47 +01:00
dependabot[bot]
5e4ca58785
Bump picomatch
Bumps  and [picomatch](https://github.com/micromatch/picomatch). These dependencies needed to be updated together.

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

Updates `picomatch` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 22:14:25 +00:00
Calixte Denizet
265de5d453
Debugger: in the tree view, display the white spaces as they're
And in the debug view, display the ltr chars in the same order as they are in showText argument.
2026-03-25 19:46:16 +01:00
Calixte Denizet
42c229c267
Add the bidi tests coming from BidiTest.txt and BidiCharacterTest.txt
Some tests were failing and has been fixed:
 - "Hello" + Alef + "(" + Bet: the "(" (neutral) was not considered as a part of the group Alef(Bet and the group wasn't reverted;
 - some intermediate neutrals were considered as strong.
2026-03-25 15:18:50 +01:00
Jonas Jenwald
fc3407cabd Use optional chaining rather than typeof checks when invoking the AnnotationStorage callbacks
This is a little bit shorter, and it should be fine considering that in the API there are no `typeof` checks when invoking user-provided callbacks (see e.g. `onPassword` and `onProgress`).
2026-03-25 13:57:00 +01:00
calixteman
eff11e88bb
Don't walk the children of a node having some attached MathML (bug 2025674)
And now Chrome has a MathML Sanitizer implementation (146), the tests related to MathML are updated to reflect that.
2026-03-25 10:21:34 +01:00
Jonas Jenwald
777251da85
Merge pull request #20968 from Snuffleupagus/getNetworkStream
Move the `NetworkStream` choice from `src/display/api.js` and into a separate file
2026-03-25 08:33:08 +01:00
Jonas Jenwald
9c857166cc Avoid downloading test PDFs multiple times
It's somewhat common for multiple test-cases to use the same PDF, for example tests for both `eq` and `text` with one PDF.
Currently the logic in `downloadManifestFiles` doesn't handle duplicate test PDFs, which leads to wasted time/resources by downloading the same PDF more than once. Naturally the effect of this is especially bad when downloading all linked PDFs.

Total number of test PDFs downloaded:
 - 507, with `master`.
 - 447, with this patch.
2026-03-25 08:18:05 +01:00
calixteman
ae84c662b8
Merge pull request #20966 from calixteman/rm_canvas_cache
Remove the canvases cache
2026-03-25 07:50:55 +01:00
calixteman
7b2901bd21
Merge pull request #20965 from calixteman/enable_hwa_default
Enable hardware acceleration by default
2026-03-25 07:49:36 +01:00
Calixte Denizet
f608d5682c Enable hardware acceleration by default 2026-03-24 23:41:05 +01:00
Calixte Denizet
c0e3977321 Remove the canvases cache
The cache has been added in #3312 in 2013 and a lot of things changed since.
Having too many cached accelerated canvases can lead to have to move their data from the GPU to the RAM
which is costly.
So this patch:
 - removes all the cached canvases;
 - destroys the useless canvases in order to free their associated memory asap;
 - slightly rewrite canvas.js::_scaleImage to avoid too much canvas creation.
2026-03-24 23:39:44 +01:00
calixteman
ae70a5d123
Merge pull request #20969 from calixteman/fix_test_comparaison
Strip private ancillary PNG chunks before comparing images in ref tests
2026-03-24 22:59:12 +01:00
Calixte Denizet
385028005b
Strip private ancillary PNG chunks before comparing images in ref tests
This regression is because of:
 - https://bugzilla.mozilla.org/show_bug.cgi?id=1980264 which added the random ID;
 - https://bugzilla.mozilla.org/show_bug.cgi?id=1990514 which re-enabled EfficientCanvasRandomization
2026-03-24 22:48:20 +01:00
Tim van der Meij
2bcf2bb911
Merge pull request #20955 from calixteman/bug2025247
Remove the selection after the pages have been extracted (bug 2025247)
2026-03-24 21:24:51 +01:00
Tim van der Meij
7035459c05
Merge pull request #20960 from Snuffleupagus/rm-PDFWorker-fromPort
Remove the deprecated `PDFWorker.fromPort` method (PR 19943 follow-up)
2026-03-24 21:23:00 +01:00
Tim van der Meij
b792f229d7
Merge pull request #20857 from mschoettle/build-add-legacy
Copy webpack.mjs to legacy in dist task
2026-03-24 21:21:44 +01:00
Tim van der Meij
1120b3d345
Merge pull request #20952 from timvandermeij/github-actions-caching
Implement Node.js caching, and fix Python caching, in the GitHub Actions workflows
2026-03-24 21:15:09 +01:00
Tim van der Meij
3e651dd690
Merge pull request #20971 from Snuffleupagus/downloadFile-fetch
Download test PDFs with the Fetch API
2026-03-24 21:13:47 +01:00
Jonas Jenwald
3e0571cd9c Download test PDFs with the Fetch API
Using the Fetch API simplifies and shortens the `downloadFile` function considerably, since among other things it handles redirects[1] by default.

Also, the regular expression in `downloadManifestFiles` can be replaced with a simple string function now.

---

[1] Implementations of the Fetch API should already prevent e.g. redirect loops and limit the total number of redirects allowed.
2026-03-24 21:01:42 +01:00
Jonas Jenwald
a0102abe76 Move the NetworkStream choice from src/display/api.js and into a separate file
This code already isn't used (or even bundled) in the Firefox PDF Viewer, and it also slightly reduces the number of import maps that need to be maintained.
2026-03-24 17:08:04 +01:00
Calixte Denizet
f578c7e299 Use the ImageDecoder by default on Chrome
The two mentioned bugs have been fixed a while back. So it should be fine to use this feature now.
2026-03-23 18:02:12 +01:00
Jonas Jenwald
ca8f8074a2 Remove the deprecated PDFWorker.fromPort method (PR 19943 follow-up)
This has been deprecated in ten releases, so let's just remove it now.
2026-03-23 17:24:54 +01:00
Matthias Schoettle
5c3878be25 Copy webpack.mjs to legacy in dist task 2026-03-23 14:40:34 +00:00
Calixte Denizet
12a4fc6893
Remove the selection after the pages have been extracted (bug 2025247) 2026-03-23 10:27:44 +01:00
calixteman
2643125a12
Merge pull request #20951 from calixteman/bug2021392
Correctly scroll the search result in the viewport with rotated pdfs (bug 2021392)
2026-03-22 21:36:46 +01:00
Tim van der Meij
1756b48417
Merge pull request #20949 from Snuffleupagus/BinaryDataFactory-2
[api-minor] Replace the `CMapReaderFactory`, `StandardFontDataFactory`, and `WasmFactory` API options with a single factory/option
2026-03-22 21:20:49 +01:00
calixteman
243659380a
Correctly scroll the search result in the viewport with rotated pdfs (bug 2021392) 2026-03-22 21:08:49 +01:00
Tim van der Meij
8d4151cfbb
Fix Python caching in the GitHub Actions workflows
For the Python-based workflows we were already using `pip` caching [1],
but sadly this isn't fully functional at the moment because the caching
functionality uses `requirements.txt` to determine when to create or
invalidate the cache. However, we have two different `pip` install
commands but only a `requirements.txt` for one of them (the Fluent
linter), which means that the other job (the font tests) will not
populate the cache with its dependencies.

This can be seen by opening any font tests or Fluent linting build and
noticing that they report the exact same cache key even though their
dependencies are different. In the installation step the dependencies
are reported as "Downloading [package].whl" instead of the expected
"Using cached [package].whl".

This commit fixes the issue by explicitly defining a `requirements.txt`
file for both jobs and pointing the caching functionality to the
specific file paths to make sure that unique caches with the correct
package data are used. While we're here we also align the syntax and
step titles in the files for consistency.

[1] https://github.com/actions/setup-python?tab=readme-ov-file#caching-packages-dependencies
2026-03-22 20:01:32 +01:00
Tim van der Meij
a3b19875ec
Implement Node.js caching in the GitHub Actions workflows
The `setup-node` action contains built-in support for caching [1], so
this commit makes sure we use it for all Node.js-based workflows to
reduce workflow execution time.

Note that, contrary what one might expect [2], the `node_modules`
directory is deliberately not cached because it can conflict with
differing Node.js versions and because it's not useful in combination
with `npm ci` usage which wipes the `node_modules` folder
unconditionally. Therefore, the action instead caches the global `npm`
cache directory instead which does not suffer from these problems and
still provides a speed-up at installation time.

[1] https://github.com/actions/setup-node?tab=readme-ov-file#caching-global-packages-data
[2] https://github.com/actions/setup-node/issues/416
[3] https://github.com/actions/cache/issues/67
2026-03-22 19:40:10 +01:00
Tim van der Meij
0a6894d28b
Merge pull request #20948 from calixteman/issue20914
Interpret empty annotation border as [0, 0, 0]
2026-03-22 19:08:19 +01:00
Jonas Jenwald
3a372fde94 [api-minor] Replace the CMapReaderFactory, StandardFontDataFactory, and WasmFactory API options with a single factory/option
Currently we have no less than three different, but very similar, factories for reading built-in CMap files, standard font files, and wasm files on the main-thread.[1]
These factories were added at different points in time, since I cannot imagine that we'd add essentially three copies of the same code otherwise.

Nowadays these factories are often not even used[2], since worker-thread fetching is used whenever possible to improve performance. In particular, they will *only* be used when either:
 - The PDF.js library runs in Node.js environments.
 - The user manually sets `useWorkerFetch = false` when calling `getDocument`.
 - The user provides custom `CMapReaderFactory`, `StandardFontDataFactory`, and/or `WasmFactory` instances when calling `getDocument`.

By replacing these factories with *a single* new `BinaryDataFactory` factory/option the number of `getDocument` options are thus reduced, which cannot hurt.
This also reduces the total bundle-size of the Firefox PDF Viewer a little bit, and it slightly reduces the number of import maps that need to be maintained.

*Please note:* For users that provide custom `CMapReaderFactory`, `StandardFontDataFactory`, and `WasmFactory` instances when calling `getDocument` this will be a breaking change, however it's unlikely that (many) such users exist.
(The *internal* format data-format of `CMapReaderFactory` was changed in PR 18951, and there hasn't been a single question/complaint about it in well over a year.)

---

[1] Any new functionality could easily lead to more such factories being added in the future, which wouldn't be great.

[2] Note that the Firefox PDF Viewer no longer use these factories, since it "forcibly" sets `useWorkerFetch = true` during building.
2026-03-22 15:49:06 +01:00
calixteman
de48af76d4
Interpret empty annotation border as [0, 0, 0]
It fixes #20914.
2026-03-22 15:49:04 +01:00
Tim van der Meij
56fe5fb622
Merge pull request #20950 from timvandermeij/revert-locale-stuck-actions
Revert "Avoid to have stuck actions when running update_locales task"
2026-03-22 15:42:30 +01:00
Tim van der Meij
921e258d35
Revert "Avoid to have stuck actions when running update_locales task"
This reverts commit d618a2bc7ebe550cfcef31df8ddd0c8a12cf6bf1.
Unfortunately it did not fix the hanging actions for the locale update
job; fixing the issue is tracked in #20813.
2026-03-22 15:38:25 +01:00
Tim van der Meij
9fa5cb9b30
Merge pull request #20947 from calixteman/fix_superscript
Don't add an EOL after a superscript
2026-03-22 15:30:30 +01:00
Tim van der Meij
6c197529e8
Merge pull request #20941 from calixteman/simple_viewer_test
Add an integration test for the simple viewer
2026-03-22 15:18:51 +01:00
calixteman
ec24053ddf
Don't add an EOL after a superscript 2026-03-22 14:20:18 +01:00
calixteman
741649c31d
Add an integration test for the simple viewer 2026-03-22 12:44:15 +01:00
Tim van der Meij
869f25a489
Merge pull request #20940 from calixteman/issue20872
Fix the group bbox when the numbers are too big
2026-03-22 12:27:43 +01:00
Tim van der Meij
1aa95d28d0
Merge pull request #20944 from Snuffleupagus/PDFObjects-resolve-once
Avoid resolving an `objId` more than once in the `PDFObjects` class
2026-03-22 12:25:08 +01:00
Tim van der Meij
4900bd80f0
Merge pull request #20939 from Snuffleupagus/BaseCMapReaderFactory-filename
[api-minor] Simplify `BaseCMapReaderFactory` by having the worker-thread create the `filename`
2026-03-22 12:14:27 +01:00
calixteman
c0f3627973
Merge pull request #20945 from mozilla/update-locales
l10n: Update locale files
2026-03-22 12:13:17 +01:00
github-actions[bot]
523d87259f l10n: Update locale files 2026-03-22 11:12:19 +00:00
Tim van der Meij
68663bba7f
Merge pull request #20942 from calixteman/fix_update_local
Make persist-credentials: true in the update_locale action
2026-03-22 12:00:50 +01:00
Jonas Jenwald
e3564deefa Remove the internal #ensureObj method in the PDFObjects class
With the introduction of `Map.prototype.getOrInsertComputed()` usage this method is no longer necessary, and the code can just be inlined instead.
2026-03-22 11:34:30 +01:00
Jonas Jenwald
cb2ae021ca Avoid resolving an objId more than once in the PDFObjects class
Trying to resolve the same `objId` more than once would be a bug elsewhere in the code-base, since that should never happen, hence update the `resolve` method to prevent that.
2026-03-22 11:34:20 +01:00
calixteman
60de323514
Make persist-credentials: true in the update_locale action 2026-03-21 22:08:02 +01:00
calixteman
5992d0f097
Fix the group bbox when the numbers are too big
It fixes #20872.
2026-03-21 19:37:42 +01:00
Jonas Jenwald
262aeef3fa [api-minor] Simplify BaseCMapReaderFactory by having the worker-thread create the filename
The `BaseCMapReaderFactory`, `BaseStandardFontDataFactory`, and `BaseWasmFactory` classes are all very similar, and the only difference is really in their respective `fetch` methods.
By have the worker-thread "compute" the complete `filename` it's possible to simplify the `BaseCMapReaderFactory.prototype.fetch` method, which will allow future improvements to all of these classes.

A couple of things to note:
 - This code is unused, and it's not even bundled, in the Firefox PDF Viewer.
 - In browsers it's unused by default, and worker-thread fetching will always be used when possible since that's more efficient.

*Please note:* For users that provide a custom `CMapReaderFactory` instance when calling `getDocument` this could be a breaking change, however it's unlikely that any such users exist.
(The *internal* format of this data was changed previously in PR 18951, and there hasn't been a single question/complaint about it in well over a year.)
2026-03-21 15:54:40 +01:00
calixteman
918a319de6
Merge pull request #20885 from calixteman/gouraud_gpu
Implement Gouraud-based shading using WebGPU.
2026-03-21 15:18:56 +01:00
calixteman
86441e9eb8
Implement Gouraud-based shading using WebGPU.
The WebGPU feature hasn't been released yet but it's interesting to see how
we can use it in order to speed up the rendering of some objects.
This patch allows to render mesh patterns using WebGPU.

I didn't see any significant performance improvement on my machine (mac M2)
but it may be different on other platforms.
2026-03-21 14:34:32 +01:00
Tim van der Meij
5cb8f222d8
Merge pull request #20882 from timvandermeij/remove-xfatest
Remove the `xfatest` command
2026-03-21 14:07:32 +01:00
Tim van der Meij
a90215da48
Merge pull request #20933 from calixteman/issue20930
Fix charSpacing in vertical mode
2026-03-21 13:56:05 +01:00
Tim van der Meij
d66629376e
Merge pull request #20934 from Snuffleupagus/fix-TextLayerBuilder-abortSignal
Ensure that `TextLayerBuilder` works correctly without the `abortSignal` parameter (PR 20928 follow-up)
2026-03-21 13:48:02 +01:00
calixteman
b6c9b12de0
Merge pull request #20936 from Snuffleupagus/debugger-getPageIndex
[Debugger] Allow debugging page-rendering from the /Ref, in addition to the page number
2026-03-21 13:45:39 +01:00
Jonas Jenwald
4c0504460f [Debugger] Allow debugging page-rendering from the /Ref, in addition to the pageNumber
Currently it's only possible to trigger page-render debugging through the page number, but when looking at the /Pages tree it's often not immediately obvious what the page number actually is.
However, the /Ref of the page is directly available and it's thus handy to be able to use that one instead to enable page-render debugging.
2026-03-21 12:06:30 +01:00
Jonas Jenwald
ba796a3441 Ensure that TextLayerBuilder works correctly without the abortSignal parameter (PR 20928 follow-up)
After the changes in PR 20928 the code no longer works correctly unless the `abortSignal` parameter is provided, which completely breaks text-selection in e.g. the standalone viewer-components with errors such as:
```
 #renderTextLayer: TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
    #bindMouse http://localhost:8888/web/text_layer_builder.js:173
    render http://localhost:8888/web/text_layer_builder.js:128
    #renderTextLayer http://localhost:8888/web/pdf_page_view.js:532
    resultPromise http://localhost:8888/web/pdf_page_view.js:1184
    promise callback*draw http://localhost:8888/web/pdf_page_view.js:1174
    renderView http://localhost:8888/web/pdf_rendering_queue.js:219
    forceRendering http://localhost:8888/web/pdf_viewer.js:2081
    promise callback*forceRendering http://localhost:8888/web/pdf_viewer.js:2080
    renderHighestPriority http://localhost:8888/web/pdf_rendering_queue.js:84
    update http://localhost:8888/web/pdf_viewer.js:1895
    onScaleChanging http://localhost:8888/web/app.js:2755
    dispatch http://localhost:8888/web/event_utils.js:115
    #setScaleUpdatePages http://localhost:8888/web/pdf_viewer.js:1555
    #setScale http://localhost:8888/web/pdf_viewer.js:1640
    set currentScaleValue http://localhost:8888/web/pdf_viewer.js:592
    setInitialView http://localhost:8888/web/app.js:1969
    load http://localhost:8888/web/app.js:1570
    promise callback*load/< http://localhost:8888/web/app.js:1518
    promise callback*load http://localhost:8888/web/app.js:1507
    open http://localhost:8888/web/app.js:1255
    promise callback*open http://localhost:8888/web/app.js:1253
    run http://localhost:8888/web/app.js:895
    webViewerLoad http://localhost:8888/web/viewer.js:366
    <anonymous> http://localhost:8888/web/viewer.js:377
pdf_page_view.js:547:15
```
2026-03-20 23:22:11 +01:00
Calixte Denizet
eaa5eca73d Fix charSpacing in vertical mode
It fixes #20930.
And use the defaultVMetrics (coming from DW2 property) in the font.
2026-03-20 23:09:03 +01:00
calixteman
e577141154
Merge pull request #20906 from calixteman/debugger_text
Add the possibility to debug only text rendering by filtering the op list.
2026-03-20 22:39:18 +01:00
calixteman
cf3b3fa900 Add the possibility to debug only text rendering by filtering the op list.
And a specific view for inspecting font information and the text layer on top of the canvas.
2026-03-20 22:28:34 +01:00
Tim van der Meij
f51419854f
Remove the xfatest command
The XFA development work has been completed, with mostly regular
maintance/bugfixing remaining, so while this special-casing for the
tests made sense at the time we should now be able to remove it (see also
https://github.com/mozilla/pdf.js/issues/11851#issuecomment-2419790237).
2026-03-20 20:17:13 +01:00
Tim van der Meij
ab228da9ce
Merge pull request #20931 from Snuffleupagus/rm-factory-name-validation
Remove explicit `name`/`filename` validation in the `BaseCMapReaderFactory`, `BaseStandardFontDataFactory`, and `BaseWasmFactory` classes
2026-03-20 20:15:23 +01:00
Tim van der Meij
0dd1556f47
Merge pull request #20880 from timvandermeij/disable-reorder-test
Skip the "should reorder thumbnails after dropping two adjacent pages" integration test
2026-03-20 20:13:36 +01:00
calixteman
977e4f2c4a
Merge pull request #20928 from calixteman/pass_global_signal_text_layer
Pass the global signal the text layer builder in order to remove all the listeners defined here
2026-03-20 18:36:25 +01:00
calixteman
5a240f7802
Merge pull request #20932 from calixteman/bug2023150
Trigger the current find after a page has been moved (bug 2023150)
2026-03-20 18:07:24 +01:00
Calixte Denizet
e1f02be670
Pass the global signal the text layer builder in order to remove all the listeners defined here
The goal of this patch is to remove the noice we've in the logs:
```
 0:09.36 INFO Console message: [JavaScript Warning: "Script terminated by timeout at:
reset@resource://pdf.js/web/viewer.mjs:11773:7
EventListener.handleEvent*#enableGlobalSelectionListener@resource://pdf.js/web/viewer.mjs:11787:12
render@resource://pdf.js/web/viewer.mjs:11716:20
async*#renderTextLayer@resource://pdf.js/web/viewer.mjs:12108:28
draw/resultPromise<@resource://pdf.js/web/viewer.mjs:12575:53
promise callback*draw@resource://pdf.js/web/viewer.mjs:12570:8
renderView@resource://pdf.js/web/viewer.mjs:7872:14
forceRendering/<@resource://pdf.js/web/viewer.mjs:13963:29
" {file: "resource://pdf.js/web/viewer.mjs" line: 11773}]
```
2026-03-20 18:06:39 +01:00
calixteman
5bdeb79b09
Merge pull request #20926 from calixteman/bug2022516
Correctly focus the pasted page (bug 2022516)
2026-03-20 17:47:02 +01:00
calixteman
dabb2b960d
Merge pull request #20927 from Snuffleupagus/Firefox-enforce-worker-binary-fetch
[Firefox] Ensure that worker-thread fetching is used for built-in CMap, standard font, and wasm data
2026-03-20 17:45:43 +01:00
calixteman
2c5812006a
Merge pull request #20929 from calixteman/bug2022481
Add the basic telemetry for Organize feature (bug 2022481)
2026-03-20 17:44:19 +01:00
Jonas Jenwald
652822bef0 [Firefox] Ensure that worker-thread fetching is used for built-in CMap, standard font, and wasm data
Given that we "forcibly" set `useWorkerFetch = true` for the MOZCENTRAL build-target there's a small amount of dead code as a result, which we can thus remove during building.
2026-03-20 16:58:57 +01:00
calixteman
16aee06aac
Merge pull request #20925 from calixteman/reorganize_save_annotations
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086)
2026-03-20 16:32:10 +01:00
calixteman
504505b8c3
Merge pull request #20924 from calixteman/fix_null_ref
Avoid getting null value in RefSet when cloning
2026-03-20 16:31:01 +01:00
calixteman
0617e3e95f
Merge pull request #20923 from calixteman/bug2023138
Make sure the menuitems are readable when hovering them (bug 2023138)
2026-03-20 16:30:34 +01:00
Calixte Denizet
118228480b Trigger the current find after a page has been moved (bug 2023150) 2026-03-20 16:22:53 +01:00
Jonas Jenwald
5299eb2b83 Remove explicit name/filename validation in the BaseCMapReaderFactory, BaseStandardFontDataFactory, and BaseWasmFactory classes
Given that these classes are only used from the "FetchBinaryData" message handler, the `name`/`filename` parameters should never actually be missing and if they are that's a bug elsewhere in the code-base.
Furthermore a missing `name`/`filename` parameter would result in a "nonsense" URL and the actual data fetching would then fail instead, hence keeping this old validation code just doesn't seem necessary.
2026-03-20 15:50:26 +01:00
Calixte Denizet
008181a43e
Add the basic telemetry for Organize feature (bug 2022481) 2026-03-20 14:33:55 +01:00
Calixte Denizet
4aee2e8f2c Correctly focus the pasted page (bug 2022516) 2026-03-20 11:39:57 +01:00
Calixte Denizet
04272de41d
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086) 2026-03-20 10:55:47 +01:00
Calixte Denizet
c17801b77e Avoid getting null value in RefSet when cloning 2026-03-20 10:41:58 +01:00
Calixte Denizet
1db3774540 Make sure the menuitems are readable when hovering them (bug 2023138)
Simplify a bit the html for the menu: remove the li elements.
Make sure the the menuitems are exposed when disabled.
2026-03-20 10:01:45 +01:00
Tim van der Meij
da1f42c03c
Skip the "should reorder thumbnails after dropping two adjacent pages" integration test
This is a temporary measure to reduce noise until #20814 is fixed.
2026-03-19 21:48:33 +01:00
Tim van der Meij
ff1af5a058
Merge pull request #20916 from calixteman/fix_co
When merging pdfs, fix the CO after the fields have been cloned
2026-03-19 21:22:43 +01:00
Tim van der Meij
6245bb201c
Merge pull request #20915 from calixteman/fix_pageindice
Avoid to use a used slot when looking for a new page position
2026-03-19 21:22:32 +01:00
Tim van der Meij
8cae5d17f2
Merge pull request #20917 from calixteman/fix_dup_name_dest
Fix the destination names when they're duplicated
2026-03-19 21:22:19 +01:00
Tim van der Meij
746e6b419d
Merge pull request #20901 from Snuffleupagus/Dict-private-map
Convert the internal `Map` to a properly private field in the `Dict` class
2026-03-19 20:57:13 +01:00
Tim van der Meij
083735b40f
Merge pull request #20920 from Snuffleupagus/Jasmine-toBeInstanceOf
Use `toBeInstanceOf` consistently in the unit-tests
2026-03-19 20:54:36 +01:00
Tim van der Meij
9151b69665
Merge pull request #20922 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.5.7
Bump fast-xml-parser from 5.5.6 to 5.5.7
2026-03-19 20:53:30 +01:00
Tim van der Meij
ed02b7313c
Merge pull request #20921 from mozilla/dependabot/npm_and_yarn/flatted-3.4.2
Bump flatted from 3.4.1 to 3.4.2
2026-03-19 20:52:57 +01:00
dependabot[bot]
281761d07d
Bump fast-xml-parser from 5.5.6 to 5.5.7
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.6 to 5.5.7.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.6...v5.5.7)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.5.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 19:47:38 +00:00
dependabot[bot]
9cf2718a69
Bump flatted from 3.4.1 to 3.4.2
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.4.1 to 3.4.2.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.4.1...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 19:44:37 +00:00
Tim van der Meij
cdb476b3ab
Merge pull request #20908 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.5.6
Bump fast-xml-parser from 5.5.5 to 5.5.6
2026-03-19 20:43:23 +01:00
Jonas Jenwald
7609a42209 Use toBeInstanceOf consistently in the unit-tests
There's currently a lot of unit-tests that manually check `instanceof`, let's replace that with the built-in Jasmine matcher function; see https://jasmine.github.io/api/edge/matchers.html#toBeInstanceOf
2026-03-19 17:18:25 +01:00
Calixte Denizet
cf67c1ef1e
Fix the destination names when they're duplicated 2026-03-19 10:52:39 +01:00
Calixte Denizet
b7da4b80a9
When merging pdfs, fix the CO after the fields have been cloned 2026-03-19 10:09:40 +01:00
Calixte Denizet
0bee641fed
Avoid to use a used slot when looking for a new page position 2026-03-19 09:40:16 +01:00
Jonas Jenwald
e52f2d1d67 Convert the internal Map to a properly private field in the Dict class 2026-03-19 09:36:29 +01:00
Jonas Jenwald
6c6bb19324 Use proper access methods in Dict.merge, rather than modifying the _map field manually 2026-03-19 09:36:29 +01:00
calixteman
bda7456724
Merge pull request #20892 from Snuffleupagus/Dict-get-helper
Reduce duplication in the `Dict.prototype.{get, getAsync, getArray}` methods
2026-03-18 21:40:30 +01:00
calixteman
a98449510c
Merge pull request #20913 from calixteman/new_badge
Add a new badge close to the Manage button in the sidebar.
2026-03-18 21:38:47 +01:00
calixteman
e65d643af5
Merge pull request #20907 from calixteman/fix_bad_bugs
Fix various bug around copy/paste/delete/undo (bug 2022586, bug 2022824, bug 2022884, bug 2023171, bug 2023176)
2026-03-18 21:38:15 +01:00
Calixte Denizet
85d88e59f3
Add a new badge close to the Manage button in the sidebar. 2026-03-18 21:05:00 +01:00
Jonas Jenwald
8f8bd6a0bc
Merge pull request #20909 from Snuffleupagus/getDocument-check-data
Ensure that `getDocument` is called with one of the `data`, `range`, or `url` parameters provided
2026-03-18 18:29:56 +01:00
calixteman
c545df4215
Merge pull request #20912 from calixteman/fix_zizmor_failures
Fix the error in gh actions found by zizmor
2026-03-18 17:56:11 +01:00
Calixte Denizet
b6634dddd8 Fix the error in gh actions found by zizmor
To install zizmor: https://docs.zizmor.sh/installation/
and just run `zizmor .`
2026-03-18 17:42:12 +01:00
Jonas Jenwald
b1172bbede
Merge pull request #20911 from Snuffleupagus/CompiledFont-fix-NOOP
Change the `NOOP` fallback, in `CompiledFont`, to return a TypedArray
2026-03-18 15:28:33 +01:00
Jonas Jenwald
4b1f64f914 Change the NOOP fallback, in CompiledFont, to return a TypedArray
In PR 20367 the `CompiledFont.prototype.getPathJs` method was changed to return TypedArray data, however the `NOOP` fallback was (likely accidentally) left an empty string.
The compilation of font-paths in PR 20346 was then implemented such that an empty string just happened to be ignored silently, however the assert added in PR 20894 allowed me to spot this return value inconsistency.

*Please note:* Since this only applies to missing or broken glyphs, that wouldn't be rendered anyway, this doesn't show up in reference tests.
2026-03-18 14:01:51 +01:00
calixteman
a398a55ac0
Merge pull request #20910 from calixteman/bug2024156
Fix the outline of the deselect button in the sidebar (bug 2024156)
2026-03-18 13:58:58 +01:00
Calixte Denizet
75cb69eef2
Fix various bug around copy/paste/delete/undo (bug 2022586, bug 2022824, bug 2022884, bug 2023171, bug 2023176)
Those bugs are more or less related so it's why they're all fixed together in the same patch.
2026-03-18 13:57:20 +01:00
Calixte Denizet
bab17136ed Fix the outline of the deselect button in the sidebar (bug 2024156)
I noticed a typo in class name (hiddden for hidden) and I found few others I fixed.
2026-03-18 12:53:48 +01:00
calixteman
979d9c3091
Merge pull request #20895 from calixteman/issue20893
Fix the position of 'Attachments' in the sidebar
2026-03-18 11:24:22 +01:00
calixteman
d224bec9e2
Merge pull request #20852 from calixteman/bug2019550
Allow to collapse/expand all the outlines in double clicking somewhere on the header bar (bug 2019550)
2026-03-18 11:20:42 +01:00
Jonas Jenwald
f4aadea001 Reduce duplication in the Dict.prototype.{get, getAsync, getArray} methods
These methods are all very similar, so let's introduce a private helper method to reduce unnecessary code duplication.
2026-03-18 11:15:23 +01:00
Jonas Jenwald
bdc16f8999
Merge pull request #20868 from Snuffleupagus/exportData-compileFontInfo
Move the `compileFontInfo` call into the `Font.prototype.exportData` method (PR 20197 follow-up)
2026-03-18 11:14:46 +01:00
Jonas Jenwald
1cd7e481ce Ensure that getDocument is called with one of the data, range, or url parameters provided
Providing one of these parameters is necessary when calling `getDocument`, since otherwise there's nothing to actually load. However, we currently don't enforce that properly and if there's more than one of these parameters provided the behaviour isn't well defined.[1]

The new behaviour is thus, in order:
 1. Use the `data` parameter, since the PDF is already available and no additional loading is necessary.
 2. Use the `range` parameter, for custom PDF loading (e.g. the Firefox PDF Viewer).
 3. Use the `url` parameter, and have the PDF.js library load the PDF with a suitable `networkStream`.
 4. Throw an error, since there's no way to load the PDF.

---

[1] E.g. if both `data` and `range` is provided, we'd load the document directly (since it's available) and also initialize a pointless `PDFDataTransportStream` instance.
2026-03-18 11:09:46 +01:00
Calixte Denizet
96d1465aab Allow to collapse/expand all the outlines in double clicking somewhere on the header bar (bug 2019550) 2026-03-18 10:26:04 +01:00
Calixte Denizet
44f4627600 Fix the position of 'Attachments' in the sidebar
It fixes #20893.
2026-03-18 10:09:23 +01:00
dependabot[bot]
15bb5fcebb
Bump fast-xml-parser from 5.5.5 to 5.5.6
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.5 to 5.5.6.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.5...v5.5.6)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.5.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-18 02:53:38 +00:00
calixteman
0ee557cd60
Merge pull request #20905 from calixteman/reorganize_outlines
Add support for saving outlines after reorganize/merge (bug 2009574)
2026-03-17 22:33:49 +01:00
Calixte Denizet
e67892d035
Add support for saving outlines after reorganize/merge (bug 2009574) 2026-03-17 22:22:13 +01:00
Tim van der Meij
76bd6dc0dd
Merge pull request #20903 from calixteman/fix_intermittent_setCaret
Wait to have all the spans in the text layer before trying to set the caret in integration tests
2026-03-17 21:58:10 +01:00
Tim van der Meij
83f06b4cf3
Merge pull request #20897 from calixteman/empty_shading
Don't throw when a mesh shading is degenerated
2026-03-17 21:18:24 +01:00
Tim van der Meij
feea0e2f00
Merge pull request #20904 from calixteman/rm_useless_op_gettextcontent
Remove some useless operations when getting the text content
2026-03-17 20:34:51 +01:00
Tim van der Meij
18a2f60469
Merge pull request #20864 from calixteman/fix_intermittent_reorg
Try to fix few intermittents bug in reorganize_pages_spec integration tests
2026-03-17 20:16:56 +01:00
Calixte Denizet
fd1fea5f6a
Remove some useless operations when getting the text content
The removed code has been added in #20624 and it's useless since these
operations (i.e. save/restore) are already handled in preprocessor.read.
2026-03-17 16:00:29 +01:00
Calixte Denizet
32dc2a5894 Wait to have all the spans in the text layer before trying to set the caret in integration tests 2026-03-17 15:30:57 +01:00
calixteman
1f94023d42
Merge pull request #20898 from calixteman/issue20847
Don't throw when printing with pdfBug enabled
2026-03-17 12:39:48 +01:00
calixteman
b7d71eb7f8 Don't throw when printing with pdfBug enabled
It fixes #20847.
2026-03-17 10:54:32 +01:00
calixteman
085ab36680
Don't throw when a mesh shading is degenerated
The problem of throwing an error is that it removes an operation
from drawing list which can cause a rendering issue.
2026-03-16 23:23:14 +01:00
Calixte Denizet
5493585b54
Try to fix few intermittents bug in reorganize_pages_spec integration tests 2026-03-16 22:00:42 +01:00
Tim van der Meij
394727a28c
Merge pull request #20887 from calixteman/fix_intermittent_comment_sidebar
Wait a little between each key press in the test 'must check that the comment sidebar is resizable with the keyboard'
2026-03-16 21:12:25 +01:00
Tim van der Meij
0a2c030c8b
Merge pull request #20888 from calixteman/debugger_skip_ops
Add the possibility to skip some ops in the debug view
2026-03-16 20:36:48 +01:00
Tim van der Meij
481a0cbe62
Merge pull request #20889 from calixteman/debugger_search_btns
(Debugger) Replace checkboxes in the search bar by toggle buttons
2026-03-16 20:35:17 +01:00
Tim van der Meij
109f6a9b49
Merge pull request #20890 from calixteman/debugger_mv_checkerboard
(Debugger) Don't draw the checkerboard on the canvas but add it behind
2026-03-16 20:34:15 +01:00
Tim van der Meij
0e964c248a
Merge pull request #20894 from Snuffleupagus/compileFontPathInfo-slice
Simplify compilation of font paths (PR 20346 follow-up)
2026-03-16 20:32:05 +01:00
Tim van der Meij
87c1231669
Merge pull request #20896 from Snuffleupagus/CachedCanvases-Map
Re-factor the `CachedCanvases` class to use a `Map` internally
2026-03-16 20:30:36 +01:00
Jonas Jenwald
2cc53270f3 Re-factor the CachedCanvases class to use a Map internally 2026-03-16 18:59:46 +01:00
Jonas Jenwald
fa7ddbb9bc Simplify compilation of font paths (PR 20346 follow-up)
Given that `CompiledFont.prototype.getPathJs` already returns data in the desired TypedArray format, we should be able to directly copy the font-path data which helps shorten the code a little bit (rather than the "manual" handling in PR 20346).

To ensure that this keeps working as expected, a non-production `assert` is added to prevent any future surprises.
2026-03-16 14:51:36 +01:00
Jonas Jenwald
7d963ddc7c Move the compileFontInfo call into the Font.prototype.exportData method (PR 20197 follow-up)
After the changes in PR 20197 the code in the `TranslatedFont.prototype.send` method is not all that readable[1] given how it handles e.g. the `charProcOperatorList` data used with Type3 fonts.
Since this is the only spot where `Font.prototype.exportData` is used, it seems much simpler to move the `compileFontInfo` call there and *directly* return the intended data rather than messing with it after the fact.

Finally, while it doesn't really matter, the patch flips the order of the `charProcOperatorList` and `extra` properties throughout the code-base since the former is used with Type3 fonts while the latter (effectively) requires that debugging is enabled.

---

[1] I had to re-read it twice, also looking at all the involved methods, in order to convince myself that it's actually correct.
2026-03-16 09:29:17 +01:00
calixteman
fc286aac4e
(Debugger) Don't draw the checkerboard on the canvas but add it behind 2026-03-15 23:20:18 +01:00
calixteman
c7837580b9
(Debugger) Replace checkboxes in the search bar by toggle buttons 2026-03-15 22:46:13 +01:00
Jonas Jenwald
d38cddf2b6
Merge pull request #20869 from Snuffleupagus/FontFaceObject-rm-bbox-setter
Remove the unused `bbox` setter in the `FontFaceObject` class (PR 20427 follow-up)
2026-03-15 22:46:12 +01:00
calixteman
e85c30e08a
Add the possibility to skip some ops in the debug view
The user has to click in the space before an op to add a breakpoint
and click again in order to skip it.
2026-03-15 22:25:45 +01:00
calixteman
3ff52e415f
Merge pull request #20862 from calixteman/bug2023106
Check for having Ref before adding them in a RefSet (bug 2023106)
2026-03-15 22:15:58 +01:00
Calixte Denizet
0fca64f01e
Check for having Ref before adding them in a RefSet (bug 2023106) 2026-03-15 22:03:39 +01:00
Calixte Denizet
2ac42392f0 Wait a little between each key press in the test 'must check that the comment sidebar is resizable with the keyboard' 2026-03-15 21:55:38 +01:00
Jonas Jenwald
f1e1973e6f Remove the unused bbox setter in the FontFaceObject class (PR 20427 follow-up)
The commit message for the patch in PR 20427 is pretty non-descriptive, being only a single line, however there's a bit more context in https://github.com/mozilla/pdf.js/pull/20427#issue-3597370951 but unfortunately the details there don't really make sense.
Note that the PR only changed main-thread code, but all the links are to worker-thread code!?

The `FontFaceObject` class is only used on the main-thread, and when encountering a broken font we fallback to the built-in font renderer; see 820b70eb25/src/display/font_loader.js (L135-L143)
Hence the `FontFaceObject` class *only* needs a way to set the `disableFontFace` property, however nowhere on the main-thread do we ever update the `bbox` of a font.
2026-03-15 21:16:18 +01:00
Tim van der Meij
1192e5e921
Merge pull request #20884 from calixteman/fix_extract_text
Fix the issue in the ref test tracemonkey-extract_0_2_12
2026-03-15 20:41:00 +01:00
Tim van der Meij
c2acab55d9
Merge pull request #20765 from calixteman/update_eslint
Update eslint to version 10
2026-03-15 20:26:09 +01:00
Tim van der Meij
1b88960ead
Merge pull request #20883 from Snuffleupagus/PatternInfo-pointBoundingBox
Use the `Util.pointBoundingBox` helper in the `PatternInfo` class (PR 20340 follow-up)
2026-03-15 19:46:58 +01:00
Tim van der Meij
665a631bdc
Merge pull request #20879 from Snuffleupagus/increase-MAX_SCALE
Increase the maximum viewer scale to 2500 percent
2026-03-15 19:46:36 +01:00
Tim van der Meij
6ca9389d25
Merge pull request #20878 from timvandermeij/exit-code
Use a non-zero exit code if the tests failed
2026-03-15 19:44:18 +01:00
calixteman
d5ac981d62
Update eslint to version 10
Unfortunately, eslint-plugin-import depends on eslint 9. This plugin doesn't seem to be
actively maintained (lot of open issues and PRs).
Fortunately there's a fork of the plugin that doesn't support eslint 10 yet but is actively maintained.
So this PR changes the eslint version to 10 and replaces eslint-plugin-import with eslint-plugin-import-x.
2026-03-15 19:36:54 +01:00
Calixte Denizet
dde0beafc6
Fix the issue in the ref test tracemonkey-extract_0_2_12
When getting the extracted document, the url for the wasms wasn't passed
and consequently the icc-based color wasn't rendered as expected because of the wasm for qcms.
2026-03-15 19:26:24 +01:00
Tim van der Meij
f49877ae95
Merge pull request #20877 from timvandermeij/updates
Update dependencies to the most recent versions
2026-03-15 19:07:04 +01:00
Jonas Jenwald
d0ee35470b Use the Util.pointBoundingBox helper in the PatternInfo class (PR 20340 follow-up)
Rather than computing the `bounds` manually, as done in PR 20340, we can shorten/simplify the code by using an existing helper instead.
2026-03-15 18:26:15 +01:00
Jonas Jenwald
e05df11e98 Increase the maximum viewer scale to 2500 percent
After PR 19128 huge zoom levels should no longer be an issue, so let's increase the maximum viewer scale a bit.
2026-03-15 15:45:34 +01:00
Tim van der Meij
c798f88bdb
Use a non-zero exit code if the tests failed
The bots currently detect if the tests failed or not by checking the
output text, but this is error-prone as it would break if the text gets
changed (which is rather unexpected) and it's non-standard as usually
processes report success/failure via their exit code.

This commit makes sure that the test process fails with a non-zero exit
code if the tests failed, and a zero exit code otherwise. Note that we
keep the same output text as before, so this change should not impact
the bots, but it does form another step to unlock usage in GitHub
Actions (which uses the exit code of commands to determine the status of
the workflow run).
2026-03-15 15:13:56 +01:00
Tim van der Meij
534a199d18
Fix vulnerability in the flatted dependency
This patch is generated with `npm audit fix` and fixes CVE-2026-32141.
2026-03-15 14:54:11 +01:00
Tim van der Meij
b7ebd80db8
Update dependencies to the most recent versions 2026-03-15 14:53:11 +01:00
Tim van der Meij
3127492a38
Merge pull request #20875 from Snuffleupagus/version-5.6
Bump library version to `5.6`
2026-03-15 14:36:01 +01:00
calixteman
a3a205d69b
Merge pull request #20871 from calixteman/refactor_debugger
Split the new debugger into multiple files
2026-03-15 14:29:13 +01:00
Jonas Jenwald
f54c0b1619 Bump library version to 5.6 2026-03-15 14:03:10 +01:00
calixteman
7bac644731
Split the new debugger into multiple files
Instead of having all the code for the new debugger in a single file,
split it into multiple files.
This makes it easier to navigate and maintain the codebase.
It'll be make hacking and fixing bugs in the debugger easier.
2026-03-15 13:21:26 +01:00
Tim van der Meij
315491dd32
Merge pull request #20840 from Snuffleupagus/getDocument-rm-length
[api-minor] Remove the `length` parameter from `getDocument`
2026-03-15 11:48:02 +01:00
Tim van der Meij
b5c55002ef
Merge pull request #20870 from mozilla/dependabot/npm_and_yarn/undici-7.24.2
Bump undici from 7.21.0 to 7.24.2
2026-03-15 11:44:42 +01:00
calixteman
8f7a615455
Merge pull request #20860 from calixteman/radial_gradients
Fix the rendering of the radial gradient when a center is outside of the other circle and there's no extend
2026-03-14 16:07:39 +01:00
dependabot[bot]
85fe14ac94
Bump undici from 7.21.0 to 7.24.2
Bumps [undici](https://github.com/nodejs/undici) from 7.21.0 to 7.24.2.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.21.0...v7.24.2)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.24.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 10:34:32 +00:00
Jonas Jenwald
09a9a7bd0b [api-minor] Remove the length parameter from getDocument
This is an old API-parameter that is now unused within the PDF.js project itself, and its description says that it's (partly) being used for "range requests operations".
Note that the `length` API-parameter is used to set the *initial* `contentLength` in various `BasePDFStreamReader` implementations, however it's always overridden by the "Content-Length" header (sent by the server) when that one exists *and* is a valid number. While we currently fallback to the keep the initial `contentLength` otherwise, note however how in that case range requests will always be *disabled* and thus the only spot in the code-base [where `fullReader.contentLength` is necessary](873378b718/src/core/worker.js (L230-L236)) cannot actually be reached.

Hence the only possible reason to use the `length` API-parameter would be for improved progress reporting[1] during streaming of PDF data in rare cases where the "Content-Length" header is missing/invalid, but the user *somehow* has information from another source about the correct `length` of the PDF document.
That situation feels very much like an edge-case, but it's obviously impossible to know if someone is depending on it. However, please note that there's a work-around available for users affected by this removal:
 - Implement a `PDFDataRangeTransport` instance together with custom data-fetching[2], since in that case its `length`-parameter will always be used as-is.

Finally, updates various `BasePDFStreamReader` implementations to only set the `_isRangeSupported` field once the headers are available (since previously we'd just overwrite the "initial" value anyway).

---

[1] I.e. to avoid the "indeterminate" loadingBar being displayed in the viewer.

[2] This is what e.g. the Firefox PDF Viewer uses.
2026-03-13 23:42:45 +01:00
Tim van der Meij
820b70eb25
Merge pull request #20858 from calixteman/move_save_as_to_export_selected
Move 'Save as...' menu to 'Export selected...'
2026-03-13 22:04:12 +01:00
Tim van der Meij
94b7f8f998
Merge pull request #20863 from calixteman/fix_intermittent_undo_bar
Only focus the undo bar when the focus isn't inside
2026-03-13 22:03:45 +01:00
Tim van der Meij
23926ee948
Merge pull request #20861 from Snuffleupagus/split-obj-bin-transform
Split the `src/shared/obj-bin-transform.js` file into separate files for the main/worker threads (PR 20197 follow-up)
2026-03-13 21:07:50 +01:00
Tim van der Meij
f4c6fff759
Merge pull request #20865 from Snuffleupagus/internal-viewer-urls
Bundle the necessary files and set the correct `cMapUrl`, `iccUrl`, and `standardFontDataUrl` when building `gulp internal-viewer`
2026-03-13 21:02:30 +01:00
Jonas Jenwald
75739a173b Bundle the necessary files and set the correct cMapUrl, iccUrl, and standardFontDataUrl when building gulp internal-viewer
Without these changes none of the relevant functionality would work in the *built* internal-viewer.
2026-03-13 18:16:10 +01:00
calixteman
1d25607b9c
Move 'Save as...' menu to 'Export selected...' 2026-03-13 17:29:12 +01:00
calixteman
a7083d08ff
Merge pull request #20854 from calixteman/bug2022769
Add a button for unchecking all the checked thumbnails (bug 2022769)
2026-03-13 15:58:24 +01:00
Calixte Denizet
df4a5638d0
Add a button for unchecking all the checked thumbnails (bug 2022769) 2026-03-13 14:18:51 +01:00
calixteman
fbfccebb81
Merge pull request #20850 from calixteman/bug2021828
Don't let the user delete/cut all the pages (bug 2021828)
2026-03-13 14:06:01 +01:00
Calixte Denizet
bbf178c5ee Only focus the undo bar when the focus isn't inside
It should fix the test "must work properly when selecting undo by keyboard"
which calls focus() but it can be steal by fixed callback in setTimeout.
2026-03-13 13:53:51 +01:00
Jonas Jenwald
67f3972bf0 Add a private FontInfo helper method for reading array-data (PR 20197 follow-up)
Currently the `bbox`, `fontMatrix`, and `defaultVMetrics` getters duplicate almost the same code, which we can avoid by adding a new helper method (similar to existing ones for reading numbers and strings).

The added `assert` in the new helper method also caught a bug in how the `defaultVMetrics` length was compiled.
2026-03-13 11:21:37 +01:00
Jonas Jenwald
3842936edf Split the src/shared/obj-bin-transform.js file into separate files for the main/worker threads (PR 20197 follow-up)
On the worker-thread only the static `write` methods are actually used, and on the main-thread only class instances are being created.
Hence this, after PR 20197, leads to a bunch of dead code in both of the *built* `pdf.mjs` and `pdf.worker.js` files.

This patch reduces the size of the `gulp mozcentral` output by `21 419` bytes, i.e. `21` kilo-bytes, which I believe is way too large of a saving to not do this.
(I can't even remember the last time we managed to reduce build-size this much with a single patch.)
2026-03-13 11:21:24 +01:00
Calixte Denizet
c610f44952 Fix the rendering of the radial gradient when a center is outside of the other circle and there's no extend
It fixes #20851.
2026-03-13 10:23:58 +01:00
calixteman
b7698d617d
Merge pull request #20859 from mozilla/update-locales
l10n: Update locale files
2026-03-13 09:42:50 +01:00
github-actions[bot]
8b86f7bb16 l10n: Update locale files 2026-03-13 00:30:37 +00:00
calixteman
ea949b9a0a
Merge pull request #20845 from calixteman/new_debugger
Update the internal viewer to use a new debugger.
2026-03-12 22:41:47 +01:00
calixteman
2381ac6b16
Update the internal viewer to use a new debugger.
It has few cool features:
 - all the canvas used during the rendering can be viewed;
 - the different properties in the graphics state can be viewed;
 - the different paths can be viewed.
2026-03-12 22:38:08 +01:00
Tim van der Meij
d8a40d9372
Merge pull request #20849 from Snuffleupagus/viewer-rm-enableHWA-opts
Remove the `enableHWA` option from viewer components (PR 20016 follow-up)
2026-03-12 20:40:38 +01:00
Tim van der Meij
decbce7b9b
Merge pull request #20856 from Snuffleupagus/fix-font-clearData
Fix the `FontInfo.prototype.clearData` method to actually remove the data as intended (PR 20197 follow-up)
2026-03-12 20:39:02 +01:00
calixteman
2177c4bc00
Merge pull request #20848 from Snuffleupagus/mv-PagesMapper
Move the `PagesMapper` class into its own file
2026-03-12 18:26:33 +01:00
Jonas Jenwald
e88a5652de Fix the FontInfo.prototype.clearData method to actually remove the data as intended (PR 20197 follow-up)
The purpose of PR 11844 was to reduce memory usage once fonts have been attached to the DOM, since the font-data can be quite large in many cases.

Unfortunately the new `clearData` method added in PR 20197 doesn't actually remove *anything*, it just replaces the font-data with zeros which doesn't help when the underlying `ArrayBuffer` itself isn't modified.
The method does include a commented-out `resize` call[1], but uncommenting that just breaks rendering completely.

To address this regression, without having to make large or possibly complex changes, this patch simply changes the `clearData` method to replace the internal buffer/view with its contents *before* the font-data.
While this does lead to a data copy, the size of this data is usually orders of magnitude smaller than the font-data that we're removing.

---

[1] Slightly off-topic, but I don't think that patches should include commented-out code since there's a very real risk that those things never get found/fixed.
At the very least such cases should be clearly marked with `// TODO: ...` comments, and should possibly also have an issue filed about fixing the TODO.
2026-03-12 18:15:42 +01:00
Calixte Denizet
1291f5a32b
Don't let the user delete/cut all the pages (bug 2021828)
And dispatch an event only when the context menu is displayed.
2026-03-11 17:23:56 +01:00
Jonas Jenwald
63b4874b39 Remove the enableHWA option from viewer components (PR 20016 follow-up)
In PR 20016 the actual uses of the `enableHWA` option was removed from the viewer, but for some reason it's still being provided when initializing `PDFViewer` and `PDFThumbnailViewer` despite the fact that it's now dead code.
2026-03-11 15:28:43 +01:00
Jonas Jenwald
9aa1ce8f14 Move the PagesMapper class into its own file
The `PagesMapper` class currently makes up one third of the `src/display/display_utils.js` file size, and since its introduction it's grown (a fair bit) in size.
Note that the intention with files such as `src/display/display_utils.js` was to have somewhere to place functionality too small/simple to deserve its own file.
2026-03-11 12:28:13 +01:00
Jonas Jenwald
79df166e06
Merge pull request #20846 from Snuffleupagus/internal-viewer-followup
A couple of small improvements of the new internal viewer
2026-03-11 12:01:11 +01:00
calixteman
9d093d9607
Merge pull request #20626 from nicolo-ribaudo/images-right-click
Add support for right-clicking on images (bug 1012805)
2026-03-11 11:45:51 +01:00
calixteman
98f7e859ac
Merge pull request #20837 from calixteman/bug2021934
Disable dragging a thumbnail when the user has to paste what they copied (bug 2021934)
2026-03-11 09:13:25 +01:00
Jonas Jenwald
60d6abdf4f A couple of small improvements of the new internal viewer
- Mention the internal viewer in the README, such that it's easier to find.

 - Implement a new `INTERNAL_VIEWER` define, such that it's easier to limit code to only the "internal-viewer" gulp target.

 - Only include the "GetRawData" message-handler when needed. Note that the `MessageHandler` [already throws](eb159abd6a/src/shared/message_handler.js (L121-L123)) for any missing handler.

 - Move the various new helper functions from `src/core/document.js` and into their own file. The reasons for doing this are:
    - That file is already quite large and complex as-is, and these helper functions are slightly orthogonal to its main functionality.
    - Babel isn't able to remove all of the new code, and by moving this into a separate file we can guarantee that no extra code ends up in e.g. Firefox.
2026-03-10 23:41:35 +01:00
Tim van der Meij
eb159abd6a
Merge pull request #20822 from mozilla/update-locales
l10n: Update locale files
2026-03-10 21:39:05 +01:00
Tim van der Meij
654190366f
Merge pull request #20828 from timvandermeij/refactor-reporter
Refactor the custom reporters for testing
2026-03-10 21:31:00 +01:00
Tim van der Meij
5fb9f12d3e
Ignore pending tests in the custom reporters
Similar to excluded tests pending tests should not count towards runs or
result in console logging because they are effectively not (fully) run.
This reduces visual noise and helps to get the tests running on GitHub
Actions where non-passed tests will count towards a non-zero exit code.
2026-03-10 20:51:08 +01:00
Tim van der Meij
8a5f6f5157
Use the status property of Jasmine's result object in the custom reporters
This improves readability of the code and makes it consistent with the
recently added check for excluded tests.
2026-03-10 20:51:08 +01:00
Tim van der Meij
9c21d7016b
Check for passed tests first in test/integration/jasmine-boot.js
This makes the order of checks consistent with the one in
`test/reporter.js` and improves safety because now any status other
than passed will be treated as a failure (also if Jasmine adds more
statuses later on).
2026-03-10 20:51:02 +01:00
Tim van der Meij
44a63549b0
Merge pull request #20831 from calixteman/internal_viewer
Add a new internal viewer to explore the structure of PDF files.
2026-03-10 20:48:40 +01:00
Tim van der Meij
15e58f3912
Merge pull request #20830 from Snuffleupagus/validateRangeRequestCapabilities-fix-tests
Improve the `validateRangeRequestCapabilities` unit-tests
2026-03-10 20:23:14 +01:00
Tim van der Meij
bf20d3c7e8
Merge pull request #20838 from calixteman/bug2021886
Avoid to have a thumbnail with two paste buttons (bug 2021886)
2026-03-10 20:21:34 +01:00
Tim van der Meij
99dcb88dac
Merge pull request #20834 from calixteman/update_context_menu
Update the context menu after copying thumbnails
2026-03-10 20:15:51 +01:00
Tim van der Meij
3f75c4e511
Merge pull request #20829 from Snuffleupagus/Blob-bytes
Start using `Blob.prototype.bytes()` in the code-base
2026-03-10 20:14:49 +01:00
Tim van der Meij
0dce6f40d2
Merge pull request #20839 from calixteman/bug2020698
Fix the border & background colors of the placeholder for a dragged thumbnail (bug 2020698)
2026-03-10 20:14:05 +01:00
Tim van der Meij
27db42d6bc
Merge pull request #20841 from Snuffleupagus/misc-improvements
A couple of small improvements
2026-03-10 20:06:35 +01:00
Jonas Jenwald
51cde824ec
Merge pull request #20844 from nicolo-ribaudo/fix-lint-licenses-windows
Fix `lint-licenses` task on windows
2026-03-10 18:05:58 +01:00
Nicolò Ribaudo
f11d12dcc2
Fix lint-licenses task on windows 2026-03-10 17:49:52 +01:00
Jonas Jenwald
e6f32f2d3b Remove the "check_l10n.mjs" entry from the ESLint config
Linting works fine with this removed, since there's apparently no top-level file with that name.
2026-03-10 16:02:27 +01:00
Jonas Jenwald
bfa2753f3c Remove the "abort" listener, on the globalAbortSignal, in the web/sidebar.js file
This is consistent with a bunch of other viewer code, since an `AbortSignal` can only be aborted once any "abort" listeners can thus be removed when invoked.
2026-03-10 15:51:10 +01:00
Jonas Jenwald
5ef582fb20 Use optional chaining a little bit more in the src/display/api.js file
That format is preferred where possible, since it leads to ever so slightly shorter code overall.
2026-03-10 15:51:05 +01:00
Nicolò Ribaudo
4f7a025e21
Separate bbox tracking from dependencies tracking
When recording bboxes for images, it's enough to record their
clip box / bounding box without needing to run the full bbox
tracking of the image's dependencies.
2026-03-10 14:51:03 +01:00
Nicolò Ribaudo
886c90d1a5
Add support for right-clicking on images
This patch adds right-click support for images in the PDF, allowing
users to download them. To minimize memory consumption, we:
- Do not store the images separately, and instead crop them out of the
  PDF page canvas
- Only extract the images when needed (i.e. when the user right-clicks
  on them), rather than eagery having all of them available.

To do so, we layer one empty 0x0 canvas per image, stretched to cover
the whole image, and only populate its contents on right click.
These images need to be inside the text layer: they cannot be _behind_
it, otherwise they would be covered by the text layer's container and
not be clickable, and they cannot be in front of it, otherwise they
would make the text spans unselectable.

This feature is managed by a new preference, `imagesRightClickMinSize`:
- when it's set to `-1`, right-click support is disabled
- when set to `0`, all images are available for right click
- when set to a positive integer, only images whose width and height are
  greater than or equal to that value (in the PDF page frame of
  reference) are available for right click.

This features is disabled by default outside of MOZCENTRAL, as it
significantly degrades the text selection experience in non-Firefox
browsers.
2026-03-10 14:51:03 +01:00
Calixte Denizet
ad7a415220
Fix the border & background colors of the placeholder for a dragged thumbnail (bug 2020698) 2026-03-09 20:47:39 +01:00
Jonas Jenwald
873378b718
Merge pull request #20836 from Snuffleupagus/FontFaceObject-fix-asserts
Fix the `disableFontFace` and `fontExtraProperties` asserts in the `FontFaceObject` constructor (PR 20197 follow-up)
2026-03-09 20:08:58 +01:00
Jonas Jenwald
4bae676af1
Merge pull request #20835 from Snuffleupagus/return-iterators
Use iterators a little bit more, to avoid creating temporary Arrays
2026-03-09 20:07:19 +01:00
Calixte Denizet
645ef08764
Avoid to have a thumbnail with two paste buttons (bug 2021886) 2026-03-09 19:10:12 +01:00
Calixte Denizet
7010086cd5
Disable dragging a thumbnail when the user has to paste what they copied (bug 2021934) 2026-03-09 18:10:33 +01:00
Jonas Jenwald
9f69617109 Fix the disableFontFace and fontExtraProperties asserts in the FontFaceObject constructor (PR 20197 follow-up)
In PR 19548 these checks were added to ensure that the font-data sent from the worker-thread *always* include correct `disableFontFace` and `fontExtraProperties` data.

For some reason PR 20197 then changed the code such that these checks became effectively pointless, since these properties are now checked after the fact *and* the new getters provide fallback values.
2026-03-09 18:00:11 +01:00
Jonas Jenwald
dbb6ffb8d5 Change the Font.prototype.glyphCacheValues method to return an iterator
This method is only used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through the underlying data to create a temporary `Array` that we finally iterate through at the call-site.

*Please note:* As port of these changes the chars/glyph caches, on the `Font` instances, are changed to use `Map`s rather than Objects.
2026-03-09 16:18:48 +01:00
Jonas Jenwald
8bbb7c88d3 Change the AnnotationLayer.prototype.getEditableAnnotations method to return an iterator
This method is only used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through the underlying `Map` to create a temporary `Array` that we finally iterate through at the call-site.
2026-03-09 16:11:21 +01:00
Calixte Denizet
210b859a54
Update the context menu after copying thumbnails 2026-03-09 15:36:22 +01:00
calixteman
cc680f68c3
Merge pull request #20832 from calixteman/fix_labels
Fix the label and tooltip on the paste buttons
2026-03-09 15:20:59 +01:00
calixteman
c7d1a48f5e
Merge pull request #20833 from nicolo-ribaudo/claude-ignore-eslint
Do not lint folders for project-level AI coding agents
2026-03-09 15:02:44 +01:00
Nicolò Ribaudo
e69432cd89
Do not lint folders for project-level AI coding agents 2026-03-09 14:57:54 +01:00
Calixte Denizet
18a05354fb
Fix the label and tooltip on the paste buttons 2026-03-09 14:21:15 +01:00
calixteman
9d81fafa8c
Add a new internal viewer to explore the structure of PDF files.
The one from pdf.js.utils is a bit too old: a lot of bugs have been fixed
in the code that parses PDF files since then.
It's just an internal development tool, so it doesn't need to be perfect,
but it should be good enough to be useful.
2026-03-09 14:16:12 +01:00
calixteman
d5653a1f7c
Merge pull request #20646 from nicolo-ribaudo/allow-any-host
Add option allow external connections to `npx gulp server`
2026-03-09 11:37:22 +01:00
calixteman
4ef5ea9681
Merge pull request #20810 from calixteman/bug2010832
Add a UI to undo cut/delete and cancel a copy (bug 2021352, bug 2010832)
2026-03-09 11:36:37 +01:00
Nicolò Ribaudo
384f1af067
Add --host option npx gulp server
Using `0.0.0.0` instead of `localhost` allows connecting from other
devices, significantly simplifying testing on mobile devices.

This is controlled by the `--host` CLI flag and not enabled by
default, since allowing external connections comes with security
implications (e.g. when on a public network without a properly
configured firewall).

There might be reasons to want to listen on custom hostnames, but as
the most common usage will probably be `--host 0.0.0.0`, there is a
shorter alias `--host 0` for it.
2026-03-09 11:03:20 +01:00
Calixte Denizet
0e48c16c3c
Add a UI to undo cut/delete and cancel a copy (bug 2021352, bug 2010832)
This happens in a bar on top of the thumbnails sidebar.
The label depending on the selected thumbnails is fixed.
2026-03-09 10:44:11 +01:00
Jonas Jenwald
a1b769caea Improve the validateRangeRequestCapabilities unit-tests
A number of these unit-tests didn't actually cover the intended code-paths, since many of them *accidentally* matched the "file size is smaller than two range requests"-check.

The patch also updates `validateRangeRequestCapabilities` to use return-value names that are consistent with the class fields used in the various stream implementations.
2026-03-08 18:28:50 +01:00
Jonas Jenwald
2598b0dcdd Start using Blob.prototype.bytes() in the code-base
Note that this isn't motivated by the miniscule reduction in code-size, but rather by wanting to unblock using this newer feature; see https://developer.mozilla.org/en-US/docs/Web/API/Blob/bytes
2026-03-08 14:06:03 +01:00
Tim van der Meij
46f4bc805e
Merge pull request #20826 from calixteman/outline_se
Handle outline with Structure Element (SE) destination
2026-03-08 13:16:11 +01:00
calixteman
253ce6e323
Handle outline with Structure Element (SE) destination 2026-03-08 12:28:24 +01:00
Tim van der Meij
2ffd2e65dd
Merge pull request #20827 from Snuffleupagus/worker-DocProgress-contentLength
Ensure that `percent === NaN` is consistently reported by the `onProgress` callback
2026-03-08 10:58:29 +01:00
Tim van der Meij
43fd680f6a
Merge pull request #20825 from timvandermeij/updates
Update dependencies to the most recent versions
2026-03-08 10:56:33 +01:00
Jonas Jenwald
ddd69ce4e0 Remove the "DocProgress" loaded fallback from the getPdfManager function
Falling back to use the `loaded` byteLength if the server `contentLength` is unknown doesn't make a lot of sense, since it'd lead to the `onProgress` callback reporting `percent === 100` repeatedly while the document is loading despite that being obviously wrong.
Instead we'll now report `percent === NaN` in that case, thus showing the indeterminate progressBar, which seems more correct if the `contentLength` is unknown.

Please note that this code-path is normally not even reached, since streaming is enabled by default (applies e.g. to the Firefox PDF Viewer).
2026-03-08 10:22:01 +01:00
Jonas Jenwald
1f69cf964c Ensure that percent === NaN is consistently reported by the onProgress callback
With these changes `0`, `NaN`, `null`, and `undefined` in the `total`-property all result in `percent === NaN` being reported by the callback, since previously e.g. `0` would result in `percent === 100` being reported unconditionally which doesn't make a lot of sense.

Also, remove the "indeterminate" loadingBar (in the viewer) if the `PDFDocumentLoadingTask` fails since there won't be any more data arriving and displaying the animation thus seems wrong.
2026-03-08 10:21:55 +01:00
Tim van der Meij
98dc351cfa
Merge pull request #20824 from calixteman/bug2015853
Add the possibility to merge/update acroforms when merging/extracting (bug 2015853)
2026-03-07 20:12:02 +01:00
calixteman
baf8647b1f
Add the possibility to merge/update acroforms when merging/extracting (bug 2015853) 2026-03-07 19:03:02 +01:00
Tim van der Meij
c7d345db76
Fix vulnerability in the underscore dependency
This patch is generated with `npm audit fix` and fixes CVE-2026-27601.
2026-03-07 19:02:23 +01:00
Tim van der Meij
57a8028ee2
Update dependencies to the most recent versions 2026-03-07 19:00:26 +01:00
Tim van der Meij
897e53838d
Merge pull request #20823 from Snuffleupagus/Response-bytes-more
Use `Response.prototype.bytes()` more in the code-base (PR 20651 follow-up)
2026-03-07 18:40:00 +01:00
Jonas Jenwald
0c514b008b Use Response.prototype.bytes() more in the code-base (PR 20651 follow-up) 2026-03-07 15:50:36 +01:00
Jonas Jenwald
aaf9b3bad0
Merge pull request #20821 from Snuffleupagus/scripting-sumPrecise-upsert
Use `Math.sumPrecise` and `Map.prototype.getOrInsertComputed` in the scripting implementation
2026-03-07 14:09:23 +01:00
github-actions[bot]
1b8878d2d8 l10n: Update locale files 2026-03-07 12:46:58 +00:00
Jonas Jenwald
49e8240c19 Use Map.prototype.getOrInsertComputed in the scripting implementation
This adds a basic non-MOZCENTRAL polyfill for now, which we should be able to remove once the next QuickJS version is released; note the pending changelog at f1139494d1/Changelog (L7)
2026-03-07 13:19:40 +01:00
Jonas Jenwald
ca428aadae Use Math.sumPrecise in the scripting implementation
This adds a *very basic* non-MOZCENTRAL polyfill for now, which we should be able to remove once the next QuickJS version is released; note the pending changelog at f1139494d1/Changelog (L8)
2026-03-07 13:19:40 +01:00
Tim van der Meij
d34a15e03f
Merge pull request #20662 from Snuffleupagus/getPdfManager-async-read
Convert the data reading in `getPdfManager` to be asynchronous
2026-03-07 13:16:22 +01:00
Tim van der Meij
d08e90b051
Merge pull request #20819 from calixteman/avoid_stuck_actions
Avoid to have stuck actions when running update_locales task
2026-03-07 13:11:08 +01:00
Tim van der Meij
a3a13f6041
Merge pull request #20820 from Snuffleupagus/createActionsMap-shorten
Shorten the `createActionsMap` helper in the `src/scripting_api/common.js` file
2026-03-07 13:09:16 +01:00
Jonas Jenwald
d236b517fe Shorten the createActionsMap helper in the src/scripting_api/common.js file 2026-03-07 11:22:21 +01:00
Jonas Jenwald
d9b81b5199
Merge pull request #20818 from Snuffleupagus/JBig2-fixes
A couple of small JBig2 fixes
2026-03-06 16:04:03 +01:00
calixteman
99f1109d67
Merge pull request #20815 from mozilla/update-locales
l10n: Update locale files
2026-03-06 15:04:43 +01:00
calixteman
d618a2bc7e
Avoid to have stuck actions when running update_locales task
The task update_locales is using the GITHUB_TOKEN to push the changes to
the update-locales branch, but this token doesn't trigger other workflows (see [1]),
so we need to explicitly dispatch the required ones.

[1] https://github.com/orgs/community/discussions/26970#discussioncomment-3254152
2026-03-06 14:51:45 +01:00
Jonas Jenwald
efa13c5e2a Don't duplicate the Jbig2Error exception
Let `src/core/jbig2_ccittFax_wasm.js` import the existing exception, rather than duplicate its code.
2026-03-06 12:04:08 +01:00
Jonas Jenwald
29362e6afb Remove the JBig2CCITTFaxWasmImage instance when running clean-up
This follows the same pattern as the existing handling for the `JpxImage` instance.
2026-03-06 12:04:03 +01:00
Jonas Jenwald
7f4e29ed22 Change the "Terminate" worker-thread handler to an asynchronous function
This is a tiny bit shorter, which cannot hurt.
2026-03-06 11:24:12 +01:00
github-actions[bot]
182a2c7bad l10n: Update locale files 2026-03-06 00:35:13 +00:00
Jonas Jenwald
e8ab3cb335 Convert the data reading in getPdfManager to be asynchronous
This is not only shorter, but (in my opinion) it also simplifies the code.

*Note:* In order to keep the *five* different `BasePDFStreamReader` implementations consistent, we purposely don't re-factor the `PDFWorkerStreamReader` class to support `for await...of` iteration.
2026-03-05 22:50:26 +01:00
calixteman
a4fcd830cc
Merge pull request #20774 from calixteman/rm_gulp_sourcemaps
Remove gulp-sourcemaps dependency which is unmaintained
2026-03-05 22:49:16 +01:00
calixteman
3a80ae47f9
Merge pull request #20800 from calixteman/bug2020731
Once a page has been deleted or pasted, make sure the focus stays in the sidebar (bug 2020731)
2026-03-05 22:47:27 +01:00
Calixte Denizet
064e6a8b1c
Remove gulp-sourcemaps dependency which is unmaintained 2026-03-05 22:28:44 +01:00
Tim van der Meij
688ae9b3e5
Merge pull request #20811 from calixteman/fix_xref
Add fetch** functions in the XRefWrapper
2026-03-05 22:02:08 +01:00
Calixte Denizet
d489ad0b5b
Once a page has been deleted or pasted, make sure the focus stays in the sidebar (bug 2020731) 2026-03-05 21:52:12 +01:00
Tim van der Meij
55fe04657b
Merge pull request #20812 from calixteman/context_menu_follow_up
Fix the event name in some integration tests (follow-up of #20788)
2026-03-05 21:20:15 +01:00
Tim van der Meij
d3e04d29ac
Merge pull request #20798 from calixteman/bug2016437
Fix the position of the thumbnails on the last line (bug 2016437)
2026-03-05 21:19:39 +01:00
Tim van der Meij
01bc76e681
Merge pull request #20806 from Snuffleupagus/BinaryCMapStream-extends-Stream
Let `BinaryCMapStream` extend the `Stream` class
2026-03-05 20:43:37 +01:00
Tim van der Meij
7e48938009
Merge pull request #20799 from Snuffleupagus/readPostScriptTable-getString
Use `BaseStream.prototype.getString` in the `readPostScriptTable` function
2026-03-05 20:40:59 +01:00
Tim van der Meij
874ba23afc
Merge pull request #20802 from calixteman/rm_sidebar_resize_observer
Remove the sidebar resize observer when killing the UI
2026-03-05 20:39:28 +01:00
Tim van der Meij
f18f1ca119
Merge pull request #20778 from mozilla/dependabot/github_actions/actions/upload-artifact-7
Bump actions/upload-artifact from 6 to 7
2026-03-05 20:34:52 +01:00
Tim van der Meij
60a0e24605
Merge pull request #20792 from calixteman/bug2020758
Add some aria-labels to the paste button in order to know where the buttons are (bug 2020758)
2026-03-05 20:32:20 +01:00
Tim van der Meij
a8d1aa9db8
Merge pull request #20797 from calixteman/bug2020774
Fix few colors in the Manage menu in HCM (bug 2020774)
2026-03-05 20:29:44 +01:00
Tim van der Meij
2463f4dc73
Merge pull request #20794 from calixteman/bug2020737
Move the heading role on the sidebar label (bug 2020737)
2026-03-05 20:29:07 +01:00
Calixte Denizet
8540897e54
Fix the event name in some integration tests (follow-up of #20788) 2026-03-05 20:24:35 +01:00
Tim van der Meij
cbc0362357
Merge pull request #20787 from Snuffleupagus/improve-PdfTextExtractor
Improve and simplify the `PdfTextExtractor` implementation
2026-03-05 20:23:23 +01:00
Calixte Denizet
150c1e80c2
Add fetch** functions in the XRefWrapper
It could fail to not have them if they're used during writing.
2026-03-05 19:21:12 +01:00
calixteman
9f8f303b1f
Merge pull request #20803 from calixteman/fix_saving
Fix downloading the current pdf
2026-03-05 15:01:08 +01:00
Calixte Denizet
dd52343d58
Fix downloading the current pdf 2026-03-05 13:05:03 +01:00
Jonas Jenwald
fccee4bffd Let BinaryCMapStream extend the Stream class
Looking at the `BinaryCMapStream` implementation, it's basically a "regular" `Stream` but with added functionality for reading compressed CMap data.
Hence, by letting `BinaryCMapStream` extend `Stream`, we can remove an effectively duplicate method and simplify/shorten the code a tiny bit.
2026-03-05 11:45:29 +01:00
Calixte Denizet
1ac5dfeba8 Remove the sidebar resize observer when killing the UI 2026-03-05 09:51:35 +01:00
Jonas Jenwald
aa445877a9 Use BaseStream.prototype.getString in the readPostScriptTable function
Currently the `customNames` are read one byte at a time, in a loop, and at every iteration converted to a string.
This can be replaced with the `BaseStream.prototype.getString` method, which didn't exist back when this function was written.
2026-03-04 18:34:07 +01:00
Jonas Jenwald
4d0709c174
Merge pull request #20795 from Snuffleupagus/Dict-more-iterators
Change the `Dict.prototype.{getKeys, getRawValues}` methods to return iterators
2026-03-04 18:26:42 +01:00
Calixte Denizet
7f76a111c4
Fix the position of the thumbnails on the last line (bug 2016437)
The original issue can only be reproduce when the thumbnails are on two lines.
The fix is just a matter of computing the number of elements on the last line once we've
finished the first line.
2026-03-04 17:30:10 +01:00
calixteman
7384359a41
Merge pull request #20781 from pengkunbin/fix/chinese-font-names-gbk
Fix missing Chinese font name variants (SimFang and XiaoBiaoSong) in GBK encoding detection
2026-03-04 16:49:44 +01:00
Calixte Denizet
f9c50bb7ce
Fix few colors in the Manage menu in HCM (bug 2020774) 2026-03-04 16:47:48 +01:00
calixteman
c41be4fd88
Merge pull request #20796 from nicolo-ribaudo/fix-license-lint
Ignore directories in lint-licenses task
2026-03-04 16:29:10 +01:00
Nicolò Ribaudo
ad91f3abc8
Ignore directories in lint-licenses task
The glob pattern will include directories that have a name ending,
for example, with `.js`.
2026-03-04 16:24:28 +01:00
Jonas Jenwald
229e3642be Change the Dict.prototype.getRawValues method to return an iterator
This method is usually used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through ` Map`-values to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getRawValues` method is old code, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 16:07:49 +01:00
Jonas Jenwald
58996f21b2 Change the Dict.prototype.getKeys method to return an iterator
This method is usually used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through ` Map`-keys to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getKeys` method is old code, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 16:07:49 +01:00
Jonas Jenwald
40bd73551c
Merge pull request #20793 from Snuffleupagus/more-getRawEntries
Use the `Dict.prototype.getRawEntries` method more
2026-03-04 16:05:57 +01:00
Jonas Jenwald
2c78b745af
Merge pull request #20791 from Snuffleupagus/l10n-README
Update l10n related information in various READMEs
2026-03-04 16:04:33 +01:00
Calixte Denizet
f6401e4344
Move the heading role on the sidebar label (bug 2020737) 2026-03-04 15:25:11 +01:00
calixteman
ce5f34ba13
Merge pull request #20780 from wooorm/wooorm/dismiss-popups
Add support for dismissing comment popups with click outside
2026-03-04 15:24:29 +01:00
calixteman
72f98d4e00
Merge pull request #20788 from calixteman/organize_context_menu
Add the pages organization actions in the Firefox context menu (bug 2018138)
2026-03-04 15:20:00 +01:00
Jonas Jenwald
ece03f9960
Merge pull request #20782 from nicolo-ribaudo/license-header-lint
Add script to check license headers
2026-03-04 13:01:24 +01:00
Jonas Jenwald
50d66d7d34 Use the Dict.prototype.getRawEntries method more
This changes a number of loops currently using `Dict.prototype.{getKeys, getRaw}`, since it should be a tiny bit more efficient to use an iterator directly rather than first iterating through `Map`-keys to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getKeys` method is much older than `getRawEntries`, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 12:46:25 +01:00
Nicolò Ribaudo
2f2d5c9e27
Add script to check license headers 2026-03-04 10:40:39 +01:00
Calixte Denizet
18bafeb1c6
Add some aria-labels to the paste button in order to know where the buttons are (bug 2020758) 2026-03-04 10:32:57 +01:00
Jonas Jenwald
4ea89f49e7 Update l10n related information in various READMEs
In practice we've not accepted PRs with "manual" changes of any non `en-US` locales for many years, however some (older) README/FAQ entries can perhaps be seen as actually inviting such PRs.

Now that l10n updates are running automatically via GitHub Actions, see PR 20749, we're definitely not going to accept any "manual" translation patches so it cannot hurt to de-emphasize localization in various README files.

(Also, since all relevant Fluent files have license headers it doesn't seem meaningful to mention that in the l10n README.)
2026-03-04 09:55:09 +01:00
Calixte Denizet
d90530b86c
Add the pages organization actions in the Firefox context menu (bug 2018138) 2026-03-04 09:02:39 +01:00
calixteman
68cca32e20
Merge pull request #20785 from calixteman/extract_pages
Add a way to extract some pages from a pdf (bug 2019682)
2026-03-04 08:44:13 +01:00
calixteman
286b0cc536
Merge pull request #20789 from calixteman/fix_paste_button_layout
Fix the paste button position and add a button before the first thumbnail
2026-03-04 08:43:00 +01:00
Calixte Denizet
27aea732a2
Fix the paste button position and add a button before the first thumbnail 2026-03-03 21:46:51 +01:00
Calixte Denizet
a474e81b8a
Add a way to extract some pages from a pdf (bug 2019682)
The user has to select some pages and then click on the "Save As" menu item in the Manage menu.
If they modify the structure of the pdf (deleted, moved, copied pages), they have to use the usual
save button.
2026-03-03 21:39:13 +01:00
calixteman
ecb0f578ae
Merge pull request #20773 from calixteman/try_to_fix_intermittent
Fix intermittent issue with a unit test
2026-03-03 19:39:37 +01:00
calixteman
973add845f
Merge pull request #20779 from calixteman/fix_sidebar_css
Fix layout of thumbnails when split/merge is disabled
2026-03-03 16:19:03 +01:00
Jonas Jenwald
c70ff5a7c0 Improve and simplify the PdfTextExtractor implementation
Working on PR 20784, I couldn't help noticing that this code can be improved a little bit.

 - Only initialize `PdfTextExtractor` in development mode and MOZCENTRAL builds, since it's unused elsewhere.

 - Re-factor how `PdfTextExtractor` waits for the viewer to be available/ready, by using existing (internal) events.
   This simplifies the `PdfTextExtractor` class and removes its `setViewer` method, which improves general consistency since normally the viewer-components don't use such a method in that way (here it was effectively used as a stand-in for a `setDocument` method).

 - Finally, while slightly unrelated, rename the `#getAllTextInProgress` field in the `PDFViewer` class to `#copyAllInProgress` to clearly indicate what it's for since the `getAllText` method is used more generally now.
2026-03-03 15:51:08 +01:00
pengkunbin
ead2a6e675 Add reference tests for SimFang variant and XiaoBiaoSong fonts
Add eq tests for the two newly supported Chinese font name variants
(仿宋体 and 小标宋) to verify correct GBK encoding detection.
2026-03-03 22:46:11 +08:00
Jonas Jenwald
ae507c49b3
Merge pull request #20784 from Snuffleupagus/PdfTextExtractor-fix-intermittent
Prevent `PdfTextExtractor.prototype.extractTextContent` from failing intermittently
2026-03-03 15:10:26 +01:00
Jonas Jenwald
54a8c049fd Prevent PdfTextExtractor.prototype.extractTextContent from failing intermittently
Given that extracting all text can take a while to complete, especially in long PDF documents[1], it's technically possible for the user to "select all", copy, and finally abort copying (with the `Esc` key) while `PdfTextExtractor.prototype.extractTextContent` is still running.
If that happens the `PDFViewer.prototype.getAllText` code would be interrupted, and text-extraction would thus fail in an intermittent and (likely) hard to debug way. To avoid this we replace the current "global" interrupt handling with an optional `AbortSignal` instead.

---

[1] See e.g. `pdf.pdf` in the test-suite.
2026-03-03 11:55:33 +01:00
Titus Wormer
8b4f9048cf
Add support for dismissing comment popups with click outside
This solves [bug 1989406](https://bugzilla.mozilla.org/show_bug.cgi?id=1989406).
(“The user should be able to dismiss the in-content message displayed by clicking somewhere else in the PDF”)
There’s a good gif there that shows the problematic behavior.

In the thread, there are also mentions of 2 similar but slightly separate problems:

* clicking on another highlight should also dismiss
* the mention that hitting the escape key does not dismiss

I found the last point, the escape key, to work already (first test case here).
But this PR solves the main bug (second test case) and the adjacent one
(third test case).
It works by using the existing `unselectAll` handling.
2026-03-03 11:14:22 +01:00
jizou
0e1b5cd7bb Fix missing Chinese font name variants (SimFang and XiaoBiaoSong) in GBK encoding detection 2026-03-03 17:04:59 +08:00
Calixte Denizet
cdc1c8af40
Fix layout of thumbnails when split/merge is disabled 2026-03-02 15:16:16 +01:00
calixteman
d859d78bb5
Merge pull request #20775 from Snuffleupagus/hide-select-pages
Hide the "Select pages" label, in the thumbnails sidebar, when split-merge is disabled
2026-03-02 14:53:15 +01:00
calixteman
0c29cc5887
Merge pull request #20776 from Snuffleupagus/commentManager-l10n-getDirection
Use `L10n.prototype.getDirection` rather than querying the DOM, when initializing the `CommentManager` instance
2026-03-02 14:45:36 +01:00
calixteman
3cb32b6ab2
Merge pull request #20772 from calixteman/babel_plugin_strip_src_path
Use a babel plugin in order to strip /src/ from the import paths
2026-03-02 14:44:49 +01:00
dependabot[bot]
d939a3dedc
Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 12:59:39 +00:00
Jonas Jenwald
0d131f0957 Use L10n.prototype.getDirection rather than querying the DOM, when initializing the CommentManager instance
Hopefully I'm not misunderstanding why it was written like that, however using an existing method should be a tiny bit more efficient than querying the DOM.
2026-03-02 11:33:34 +01:00
Jonas Jenwald
a0e70eb6aa Hide the "Select pages" label, in the thumbnails sidebar, when split-merge is disabled
Currently there's a "pointless" label displayed, thus taking up vertical space, when `enableSplitMerge = false` is set.
2026-03-02 11:19:02 +01:00
calixteman
afa8a07a2b
Merge pull request #20760 from calixteman/avoid_noise
Just output in the console the results for the integrations which ran
2026-03-02 10:15:12 +01:00
calixteman
ed390c06a1
Fix intermittent issue with a unit test
Avoid to rely on timing in the test, which can cause intermittent failures.
Instead, we check that the image is cached at the document/page level.
2026-03-01 22:59:04 +01:00
calixteman
2eb145f3f1
Use a babel plugin in order to strip /src/ from the import paths 2026-03-01 22:17:30 +01:00
Calixte Denizet
6b3331f47b
Just output in the console the results for the integrations which ran 2026-03-01 21:55:23 +01:00
Tim van der Meij
55c371d97c
Merge pull request #20771 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-03-01 21:28:56 +01:00
Tim van der Meij
4230ba19df
Bump the stable version in pdfjs.config 2026-03-01 21:25:24 +01:00
Tim van der Meij
5279646985
Merge pull request #20751 from calixteman/bug2016693
Avoid to scroll too much when the thumbnail is at the bottom of the sidebar (bug 2016693)
2026-03-01 21:14:44 +01:00
calixteman
98d0332a9f
Merge pull request #20767 from calixteman/followup_20742
Add an integration test for the issue fixed in #20742
2026-03-01 21:11:50 +01:00
calixteman
c1fe547a05
Add an integration test for the issue fixed in #20742 2026-03-01 20:55:59 +01:00
Tim van der Meij
62ceac6e97
Merge pull request #20769 from timvandermeij/updates
Update dependencies to the most recent versions
2026-03-01 20:55:40 +01:00
Tim van der Meij
3d2d145329
Fix vulnerabilities in dependency versions
This patch is generated automatically using `npm audit fix`.
2026-03-01 20:44:42 +01:00
Tim van der Meij
ced9b4717f
Upgrade c8 to version 11.0.0
This is a major version bump, but the changelog at
https://github.com/bcoe/c8/releases/v11.0.0 doesn't indicate any
breaking changes that should impact us.
2026-03-01 20:43:20 +01:00
Tim van der Meij
4cb0d504b0
Update dependencies to the most recent versions 2026-03-01 20:42:19 +01:00
Tim van der Meij
5cbb8413cb
Merge pull request #20768 from calixteman/rm_yargs
Remove dependency to yargs and use node:utils parseArgs
2026-03-01 20:19:11 +01:00
Tim van der Meij
1861a4c4ad
Merge pull request #20756 from Snuffleupagus/PDFDataRangeTransport-tests
Improve the `PDFDataRangeTransport` unit-tests
2026-03-01 20:10:34 +01:00
Tim van der Meij
f32b9d2677
Merge pull request #20738 from Snuffleupagus/function-shorten
Slightly shorten some code in the `src/core/function.js` file
2026-03-01 20:06:29 +01:00
Tim van der Meij
e0ea84fdac
Merge pull request #20761 from calixteman/tweak_dims
Tweak few elements: dimensions and the checkbox color in the new sidebar
2026-03-01 20:01:07 +01:00
Tim van der Meij
9dfcc62bb9
Merge pull request #20758 from calixteman/fix_sidebar_height
Fix the page sidebar height
2026-03-01 19:58:18 +01:00
Tim van der Meij
6299bf7fd6
Merge pull request #20762 from mozilla/dependabot/npm_and_yarn/multi-f5f34deeac
Bump minimatch
2026-03-01 19:56:30 +01:00
Tim van der Meij
2bc9a59acc
Merge pull request #20766 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.4.1
Bump fast-xml-parser from 5.3.5 to 5.4.1
2026-03-01 19:56:03 +01:00
calixteman
f57b73d881
Remove dependency to yargs and use node:utils parseArgs 2026-03-01 15:01:31 +01:00
calixteman
00d9d3a6ea
Merge pull request #20742 from Snuffleupagus/tree-viewer-scrollIntoView
Fix scrolling of outline item into view (PR 20495 follow-up)
2026-03-01 13:01:21 +01:00
dependabot[bot]
73bd5c35da
Bump fast-xml-parser from 5.3.5 to 5.4.1
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.5 to 5.4.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.3.5...v5.4.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.4.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 00:12:36 +00:00
dependabot[bot]
7a8571459a
Bump minimatch
Bumps  and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together.

Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 10.1.1 to 10.2.4
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 10.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 03:47:33 +00:00
Jonas Jenwald
86573cc995
Merge pull request #20757 from Snuffleupagus/getPdfFilenameFromUrl-fix-decode-regex
Fix the broken regular expression in the `decode` helper in the `getPdfFilenameFromUrl` function (issue 20664)
2026-02-27 23:14:18 +01:00
calixteman
b4f98e8a9b
Merge pull request #20747 from calixteman/check__l10n
Add a script for searching the unused fluent ids
2026-02-27 22:19:50 +01:00
Calixte Denizet
82fdeaaac0 Add a script for searching the unused fluent ids 2026-02-27 19:16:15 +01:00
calixteman
4dd51a20a5
Merge pull request #20736 from jrmuizel/scientific
Remove scientific notation parsing.
2026-02-27 18:51:15 +01:00
calixteman
9c3a752388
Merge branch 'master' into scientific 2026-02-27 18:39:44 +01:00
Calixte Denizet
c272cbdf5a
Tweak few elements: dimensions and the checkbox color in the new sidebar 2026-02-27 18:36:38 +01:00
calixteman
bd260b2d15
Merge pull request #20746 from calixteman/bug2019714
Fix tooltips on thumbnails and checkbox (bug 2019714)
2026-02-27 18:20:37 +01:00
Calixte Denizet
aa928105b4
Fix tooltips on thumbnails and checkbox (bug 2019714)
And fix an issue with some integration tests where the manage button was disabled (hence not in the tab cycle).
2026-02-27 17:43:27 +01:00
calixteman
45b0f8b05e
Merge pull request #20748 from calixteman/add_file_button
Make the 'add file' button not hidden but just not visible in order to fix the layout
2026-02-27 17:34:53 +01:00
calixteman
123ed241e6
Merge pull request #20750 from calixteman/pr20740_followup
Add an integration test for PR 20740
2026-02-27 17:34:20 +01:00
Calixte Denizet
2572285827 Add an integration test for PR 20740 2026-02-27 17:07:44 +01:00
Calixte Denizet
a251b99e2b
Make the 'add file' button not hidden but just not visible in order to fix the layout
The feature will be plugged later.
2026-02-27 16:53:30 +01:00
Calixte Denizet
79942b7720
Fix the page sidebar height
It has to be the viewer height but with a padding of 8px.
2026-02-27 16:13:14 +01:00
Jonas Jenwald
e3a7c0779d Fix the broken regular expression in the decode helper in the getPdfFilenameFromUrl function (issue 20664)
This will ignore filenames that become effectively empty, i.e. ones that are only ".pdf" and nothing more.

*Please note:* While this passes all existing unit-tests, I don't know if this is necessarily the "correct" solution here.
2026-02-27 15:19:43 +01:00
Jonas Jenwald
fecb0aab1d Improve the PDFDataRangeTransport unit-tests
- Add a new test using only streaming, since that was missing and the lack of which most likely contributed to previous bugs in the `PDFDataRangeTransport` implementation (see PR 10675 and 20634).

 - Improve the "ranges and streaming" test, to utilize both ranges *and* streaming properly, since the way it was written seemed somewhat unrealistic given how data will normally arrive when `PDFDataRangeTransport` is being used.

 - Provide more `initialData`, in relevant tests, since a length smaller than `rangeChunkSize` seem pretty pointless.

 - Test the `contentDispositionFilename`, and `contentLength`, handling in the `PDFDataRangeTransport` implementation.
2026-02-27 14:55:39 +01:00
Jonas Jenwald
218a687a3b
Merge pull request #20755 from Snuffleupagus/rm-unmaintained-locales
Automatically remove unmaintained locales when running `gulp importl10n`
2026-02-27 14:52:01 +01:00
Jonas Jenwald
24fe94206a Automatically remove unmaintained locales when running gulp importl10n
It's not particularly common for locales to be removed from Firefox, but it has happened occasionally in the past.
Currently the `downloadL10n` function logs a message about any unmaintained locales, but after PR 20749 that code is running in GitHub Actions (rather than locally by a contributor) which makes it much less likely for the message to be seen.
2026-02-27 10:46:57 +01:00
calixteman
e5656e4303
Merge pull request #20752 from mozilla/update-locales
l10n: Update locale files
2026-02-27 09:07:59 +01:00
Jeff Muizelaar
8fa6ef36e4 Remove scientific notation parsing.
This behaviour comes from the initial pdf.js commit but is wrong and
doesn't match other PDF readers like muPDF or pdfium.

From PDF Spec 7.3.3:

A PDF writer shall not use the PostScript language syntax for numbers with non-decimal radices (such
as 16#FFFE) or in exponential format (such as 6.02E23).
2026-02-26 20:22:34 -05:00
github-actions[bot]
a541428363 l10n: Update locale files 2026-02-27 00:31:45 +00:00
Calixte Denizet
4b7fa1c003 Avoid to scroll too much when the thumbnail is at the bottom of the sidebar (bug 2016693) 2026-02-26 22:30:13 +01:00
calixteman
e37fbcbe00
Merge pull request #20749 from calixteman/gh_action_locale
Add a gh action in order to create a PR containing a m-c l10n update
2026-02-26 22:28:15 +01:00
calixteman
aa5abda419 Add a gh action in order to create a PR containing a m-c l10n update 2026-02-26 22:13:00 +01:00
Tim van der Meij
f626a368a5
Merge pull request #20743 from calixteman/bug2010822
Tweak the background color of the sidebar (bug 2010822)
2026-02-26 22:01:50 +01:00
Tim van der Meij
52efe65f12
Merge pull request #20741 from calixteman/fix_resizer_position
Slightly move the resizer on the sidebar (bug 2019585)
2026-02-26 22:00:32 +01:00
Tim van der Meij
f05caaf5e9
Merge pull request #20731 from calixteman/remove_page_id
Remove useless page-id attribute in thumbnails
2026-02-26 21:58:36 +01:00
Tim van der Meij
dc2b4c8e9a
Merge pull request #20737 from mozilla/dependabot/npm_and_yarn/basic-ftp-5.2.0
Bump basic-ftp from 5.1.0 to 5.2.0
2026-02-26 21:51:59 +01:00
Jonas Jenwald
2bab2a87a4
Merge pull request #20745 from calixteman/issue20744
Don't check for surrogates when verifying the chars to normalize
2026-02-26 19:08:02 +01:00
calixteman
881f9779e6
Don't check for surrogates when verifying the chars to normalize 2026-02-26 16:46:34 +01:00
Calixte Denizet
b263841584
Tweak the background color of the sidebar (bug 2010822)
And tweak its position as required by UX/UI.
2026-02-26 15:39:08 +01:00
Jonas Jenwald
e89335e776 Fix scrolling of outline item into view (PR 20495 follow-up)
Clicking on the "Find Current Outline Item" button is (obviously) supposed to scroll that outline item into view, however that seems to have broken accidentally in PR 20495.
2026-02-26 14:52:20 +01:00
Jonas Jenwald
3ae6cdc7c2
Merge pull request #20740 from Snuffleupagus/tree-viewer-shift-toggle
Don't expand/collapse the entire outline when shift-clicking on the triangles (PR 20508 follow-up)
2026-02-26 14:51:08 +01:00
Calixte Denizet
241e8c18b9
Slightly move the resizer on the sidebar (bug 2019585)
And add a white border to the resizer in order to make it visible whatever the background is.
2026-02-26 14:35:13 +01:00
Jonas Jenwald
b07d14c88c Don't expand/collapse the entire outline when shift-clicking on the triangles (PR 20508 follow-up) 2026-02-26 13:00:06 +01:00
Jonas Jenwald
8ced999803 Slightly shorten some code in the src/core/function.js file 2026-02-26 10:42:56 +01:00
Jonas Jenwald
17a4d2e123
Merge pull request #20734 from Snuffleupagus/GetOperatorList-fix-transfers
Include transfers correctly in the "GetOperatorList" message (PR 16588 follow-up)
2026-02-26 09:44:16 +01:00
dependabot[bot]
77702fc916
Bump basic-ftp from 5.1.0 to 5.2.0
Bumps [basic-ftp](https://github.com/patrickjuchli/basic-ftp) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/patrickjuchli/basic-ftp/releases)
- [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patrickjuchli/basic-ftp/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: basic-ftp
  dependency-version: 5.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-25 23:30:41 +00:00
Jonas Jenwald
82fc2c94f0 Include transfers correctly in the "GetOperatorList" message (PR 16588 follow-up)
Currently the transfers aren't actually being used with the "GetOperatorList" message, since the placement of the parameter is wrong; note the method signature: 909a700afa/src/shared/message_handler.js (L219-L229)
This goes back to PR 16588, which added the transfers parameter, and unfortunately we all missed that :-(

Simply fixing the parameter isn't enough however, since that broke printing of Stamp-editors (and possibly others). The solution here is to *not* transfer data during printing, given that a single `PrintAnnotationStorage` instance is being used for all pages.
2026-02-25 15:55:43 +01:00
Jonas Jenwald
3c434140ea
Merge pull request #20733 from Snuffleupagus/LZWStream-rm-lastCode
Remove unused `lastCode` property from the `LZWStream` class (PR 324 follow-up)
2026-02-25 15:20:36 +01:00
Calixte Denizet
a48118db41 Remove useless page-id attribute in thumbnails
And make sure that the sidebar is fully open before starting the tests in
order to have an intermittent exception when finishing the test.
2026-02-25 15:15:41 +01:00
Jonas Jenwald
80db3609f4 Remove unused lastCode property from the LZWStream class (PR 324 follow-up)
This appear to have been unused already in PR 324 all the way back in 2011.
2026-02-25 13:31:44 +01:00
calixteman
bc8efa190c
Merge pull request #20719 from calixteman/update_jasmine
Update Jasmine to version 6.0.0
2026-02-25 09:56:54 +01:00
Tim van der Meij
4ecbd0cbe2
Merge pull request #20726 from Snuffleupagus/getOrInsertComputed-fewer-functions
Reduce allocations and function creation when using `getOrInsert` and `getOrInsertComputed`
2026-02-24 23:32:36 +01:00
calixteman
ab7629871a
Update Jasmine to version 6.0.0
It fixes #20715.

`failedExpectations` was removed from `suiteStarted` and `specStarted` events.
HtmlReporter and HtmlSpecFilter have been deprecated and removed.
2026-02-24 23:30:48 +01:00
Tim van der Meij
b43c8eab73
Merge pull request #20725 from calixteman/bug2018162
After cut & paste, the thumbnail must be correctly rendered (bug 2018162)
2026-02-24 23:27:07 +01:00
Tim van der Meij
943810a9ca
Merge pull request #20727 from calixteman/issue20722
Reset transfer functions when entering in a new group
2026-02-24 23:22:45 +01:00
Tim van der Meij
5259abb1ed
Merge pull request #20720 from calixteman/update_json
Use @eslint/json in order to lint the json files
2026-02-24 23:08:06 +01:00
Jonas Jenwald
185fee680a Use Map.prototype.getOrInsertComputed() in the web/struct_tree_layer_builder.js file 2026-02-24 09:04:37 +01:00
Jonas Jenwald
0d4e587a5f Reduce allocations when using Map.prototype.getOrInsert() with Arrays
Change all these cases to use `Map.prototype.getOrInsertComputed()` instead, in combination with a helper function for creating the `Array`s (similar to the previous patch).
2026-02-24 09:03:32 +01:00
Jonas Jenwald
2e07715c9d Reduce function creation when using Map.prototype.getOrInsertComputed()
With the exception of the first invocation the callback function is unused, which means that a lot of pointless functions may be created.
To avoid this we introduce helper functions for simple cases, such as creating `Map`s and `Objects`s.
2026-02-24 08:58:28 +01:00
calixteman
15e7a551ab
Reset transfer functions when entering in a new group
It fixes #20722.
2026-02-23 22:37:20 +01:00
Calixte Denizet
97d973ce09
After cut & paste, the thumbnail must be correctly rendered (bug 2018162) 2026-02-23 18:38:33 +01:00
calixteman
81479fe942
Use @eslint/json in order to lint the json files 2026-02-22 23:52:54 +01:00
Jonas Jenwald
c2f5e19eb0 Use Map.prototype.getOrInsertComputed() in the src/core/xfa/ folder 2026-02-22 22:57:50 +01:00
Jonas Jenwald
909a700afa
Merge pull request #20717 from Snuffleupagus/api-getOrInsertComputed
Use `Map.prototype.getOrInsertComputed()` in the `src/display/api.js` file
2026-02-22 22:57:01 +01:00
calixteman
c91de765e0
Merge pull request #20697 from calixteman/bug2018139
Add keyboard shortcuts for copying/cutting/deleting the pages (bug 2018139, bug 2010831)
2026-02-22 22:42:31 +01:00
Calixte Denizet
63c340fa35
Add keyboard shortcuts for copying/cutting/deleting the pages (bug 2018139, bug 2010831) 2026-02-22 22:17:59 +01:00
calixteman
176e085420
Merge pull request #20712 from calixteman/issue20689
Correctly generate the NormalizeWithNFKC string in generic build
2026-02-22 21:33:57 +01:00
Jonas Jenwald
e2c8fc6140 Use Map.prototype.getOrInsertComputed() in the src/display/api.js file 2026-02-22 21:01:13 +01:00
Jonas Jenwald
7b451f6a89
Merge pull request #20716 from Snuffleupagus/src-display-getOrInsert
Use `Map.prototype.getOrInsert()` more in the `src/display/` folder
2026-02-22 21:00:38 +01:00
calixteman
fb902c16e1
Correctly generate the NormalizeWithNFKC string in generic build
It fixes #20689.
2026-02-22 19:50:42 +01:00
Jonas Jenwald
c81904ac0a Use Map.prototype.getOrInsertComputed() in the src/display/canvas.js file 2026-02-22 17:55:51 +01:00
Jonas Jenwald
ab8e67ecff Use Map.prototype.getOrInsert() in the src/display/annotation_layer.js file 2026-02-22 17:54:17 +01:00
Tim van der Meij
5bb35eeb35
Merge pull request #20711 from Snuffleupagus/editorStats-getOrInsertComputed
Use `Map.prototype.getOrInsertComputed()` in the `editorStats` getter
2026-02-22 16:02:32 +01:00
Jonas Jenwald
bfe265ad31 Use Map.prototype.getOrInsertComputed() in the editorStats getter 2026-02-22 15:10:02 +01:00
Tim van der Meij
cc516d0dd4
Merge pull request #20709 from Snuffleupagus/scripting-unconditional-FinalizationRegistry
Use `FinalizationRegistry` unconditionally in the `src/scripting_api/app.js` file
2026-02-22 14:59:03 +01:00
calixteman
1df6367ef9
Merge pull request #20710 from calixteman/normalize_path
Remove the leading slash in windows file path when instrumenting js files for ccov
2026-02-22 13:40:13 +01:00
calixteman
a8b1c8bd70
Remove the leading slash in windows file path when instrumenting js files for ccov 2026-02-22 13:32:49 +01:00
Tim van der Meij
a5a27a5ca7
Merge pull request #20705 from Snuffleupagus/#collectParents-getOrInsert
Use `Map.prototype.getOrInsert()` in the `#collectParents` method
2026-02-22 12:55:41 +01:00
Tim van der Meij
8189ca358c
Merge pull request #20703 from Snuffleupagus/#collectFieldObjects-getOrInsert
Use `Map.prototype.getOrInsert()` in the `#collectFieldObjects` method
2026-02-22 12:39:54 +01:00
Jonas Jenwald
ad0a310394
Merge pull request #20706 from Snuffleupagus/ensureDebugMetadata-getOrInsertComputed
Use `Map.prototype.getOrInsertComputed()` in the `ensureDebugMetadata` helper
2026-02-22 10:35:44 +01:00
Jonas Jenwald
e62a990ae2
Merge pull request #20704 from Snuffleupagus/getPageAdvance-getOrInsert
Use `Map.prototype.getOrInsert()` in the `_getPageAdvance` method
2026-02-22 10:32:44 +01:00
Jonas Jenwald
2631750038
Merge pull request #20702 from Snuffleupagus/getNewAnnotationsMap-getOrInsert
Use `Map.prototype.getOrInsert()` in the `getNewAnnotationsMap` helper
2026-02-22 10:29:33 +01:00
calixteman
1118050231
Merge pull request #20696 from calixteman/bug2016656
Only show the status bar in the views manager when it's in thumbnails mode (bug 2016656)
2026-02-21 23:00:54 +01:00
Jonas Jenwald
956eb10329 Use FinalizationRegistry unconditionally in the src/scripting_api/app.js file
After the QuickJS update in PR 20708 this code can now be simplified.
2026-02-21 22:37:30 +01:00
Jonas Jenwald
b798fd8771
Merge pull request #20699 from Snuffleupagus/scripting-shorter
Slightly shorten some code in the `src/scripting_api/` folder
2026-02-21 22:35:15 +01:00
calixteman
62054ae0a2
Merge pull request #20708 from calixteman/update_quickjs
Update quickjs to fa628f8c523ecac8ce560c081411e91fcaba2d20
2026-02-21 21:59:29 +01:00
calixteman
32b49e99f0
Update quickjs to fa628f8c523ecac8ce560c081411e91fcaba2d20 2026-02-21 15:34:24 +01:00
Jonas Jenwald
0d8bc689b9 Add missing license header in src/display/canvas_dependency_tracker.js 2026-02-21 13:26:20 +01:00
Jonas Jenwald
c7bdf5b508 Use Map.prototype.getOrInsertComputed() in the ensureDebugMetadata helper
Also, shorten the function by using optional chaining.
2026-02-21 12:02:45 +01:00
Jonas Jenwald
3e7ad8d6bf Use Map.prototype.getOrInsert() in the #collectParents method 2026-02-21 11:42:42 +01:00
Jonas Jenwald
3940855511 Use Map.prototype.getOrInsert() in the _getPageAdvance method
Also, change the method to an actually private one.
2026-02-21 11:31:03 +01:00
Jonas Jenwald
210c969c4c Use Map.prototype.getOrInsert() in the #collectFieldObjects method 2026-02-21 11:23:32 +01:00
Jonas Jenwald
76a5aed05f Use Map.prototype.getOrInsert() in the getNewAnnotationsMap helper 2026-02-21 11:03:00 +01:00
calixteman
f548a159d6
Merge pull request #20698 from calixteman/image_utils_test
Add some unit tests for functions in image_utils.js
2026-02-20 22:58:22 +01:00
Jonas Jenwald
350f3fa7e5 Slightly shorten some code in the src/scripting_api/ folder
- Use nullish coalescing assignment more.
 - Use ternary expressions more.
2026-02-20 22:47:22 +01:00
Calixte Denizet
0bb59f15cb
Add some unit tests for functions in image_utils.js 2026-02-20 22:43:42 +01:00
Calixte Denizet
5f9a9f58ce
Only show the status bar in the views manager when it's in thumbnails mode (bug 2016656) 2026-02-20 22:33:34 +01:00
Tim van der Meij
aaf3ad5a4e
Merge pull request #20688 from calixteman/coverage_font_test
Add code coverage for font tests
2026-02-20 22:13:57 +01:00
Tim van der Meij
e07e8ed172
Merge pull request #20690 from Snuffleupagus/getPdfFilenameFromUrl-searchParams-findLast
Reduce duplication when parsing `searchParams` in the `getPdfFilenameFromUrl` function
2026-02-20 21:42:48 +01:00
Tim van der Meij
6f0d8d561f
Merge pull request #20695 from calixteman/bug2018125
Update the page count in the UI when some changes are done (bug 2018125)
2026-02-20 21:40:16 +01:00
Tim van der Meij
82de22428a
Merge pull request #20660 from Snuffleupagus/ChunkedStream-async-sendRequest
Convert `ChunkedStreamManager.prototype.sendRequest` to an asynchronous method
2026-02-20 21:39:26 +01:00
Tim van der Meij
b2cf54353c
Merge pull request #20693 from calixteman/bug2016321
Fix the style of the thumbnails in HCM (bug 2016491, bug 2016321, bug 2016323, bug 2016827)
2026-02-20 20:44:53 +01:00
Tim van der Meij
12ec25c9a7
Merge pull request #20694 from calixteman/bug2018134
Fix the menu dimensions when on of the item is too long (bug 2018134)
2026-02-20 20:41:43 +01:00
Tim van der Meij
f395042b8d
Merge pull request #20692 from Snuffleupagus/debugger-findIndex
Replace the `getStatIndex` helper, in `web/debugger.mjs`, with native functionality
2026-02-20 20:33:00 +01:00
Tim van der Meij
e87019ec04
Merge pull request #20686 from calixteman/bug2016311
Fix the color of the arrow on buttons when hovering in HCM (bug 2016311)
2026-02-20 20:31:25 +01:00
Calixte Denizet
bd3f14f62d
Update the page count in the UI when some changes are done (bug 2018125) 2026-02-20 18:06:48 +01:00
calixteman
a5c62b7489
Merge pull request #20691 from Snuffleupagus/rm-unnecessary-Map-entries
Remove unnecessary `Map.prototype.entries()` usage
2026-02-20 17:44:19 +01:00
calixteman
970717a732
Merge pull request #20684 from Snuffleupagus/src-rm-constructors
Remove unnecessary class constructors in the `src` folder
2026-02-20 17:43:18 +01:00
calixteman
34ba2064e6
Merge pull request #20661 from timvandermeij/updates
Update dependencies and translations to the most recent versions, and upgrade most packages to new major versions
2026-02-20 17:41:58 +01:00
Calixte Denizet
bff6f4cc01
Fix the style of the thumbnails in HCM (bug 2016491, bug 2016321, bug 2016323, bug 2016827) 2026-02-20 17:30:40 +01:00
Calixte Denizet
55448fd01c
Fix the menu dimensions when on of the item is too long (bug 2018134) 2026-02-20 17:19:31 +01:00
Jonas Jenwald
06e7f308fd Replace the getStatIndex helper, in web/debugger.mjs, with native functionality
This code is old enough that it predates the existence of `Array.prototype.findIndex()`, hence why a helper function was originally needed.
2026-02-20 14:09:20 +01:00
Jonas Jenwald
374f524c29 Remove unnecessary Map.prototype.entries() usage
A `Map` instance can be iterated directly with a `for...of` loop, hence using its `entries` method is not actually necessary.
2026-02-20 13:44:00 +01:00
Jonas Jenwald
34f27187f8 Reduce duplication when parsing searchParams in the getPdfFilenameFromUrl function
Currently we essentially "duplicate" the same code for parsing the `values` and `keys` of the `searchParams`, which seems a little unnecessary.

To be able to parse the `searchParams` from the end, we currently create an Array (from the Iterator) and then reverse it before finally looping through it. Here the latter two steps can be replaced with the `Array.prototype.findLast()` method instead.

*Please note:* I completely understand if this patch is rejected, on account of being less readable than the current code.
2026-02-19 17:37:12 +01:00
Jonas Jenwald
7fd939763e Remove unnecessary class constructors in the src folder
There's a number of classes where the constructors can be removed completely by instead using class fields, which help to slightly shorten the code.

It seems that `unicorn/prefer-class-fields` ESLint plugin, see PR 20657, unfortunately isn't able to detect all of these cases.
2026-02-19 00:08:57 +01:00
Jonas Jenwald
74ab1a98a6
Merge pull request #20685 from Snuffleupagus/Annotation-set-annotationType
Set the `annotationType` automatically in the `Annotation` constructor
2026-02-19 00:03:37 +01:00
calixteman
e2af2b83c3
Add code coverage for font tests 2026-02-18 22:00:45 +01:00
Calixte Denizet
0dcc96a09d
Fix the color of the arrow on buttons when hovering in HCM (bug 2016311) 2026-02-18 20:04:44 +01:00
calixteman
30ed527a80
Merge pull request #20677 from calixteman/bug2016007
Add the possibility to navigate with the keyboard to go from a checkbox to an other in the thumbnail view (bug 2016007)
2026-02-18 19:56:09 +01:00
Calixte Denizet
0149527a4b
Add the possibility to navigate with the keyboard to go from a checkbox to an other in the thumbnail view (bug 2016007) 2026-02-18 18:35:54 +01:00
calixteman
f609ee8a0c
Merge pull request #20670 from calixteman/reorg_delete
Add support for deleting, cutting, copying and pasting pages (bug 2010830, 2010831)
2026-02-18 17:52:35 +01:00
Calixte Denizet
d755fba96a
Add support for deleting, cutting, copying and pasting pages (bug 2010830, 2010831) 2026-02-18 16:43:00 +01:00
calixteman
e331d458cb
Merge pull request #20679 from calixteman/bug2016142
Add an aria-label to the sidebar resizer (bug 2016142)
2026-02-18 16:33:53 +01:00
calixteman
6b1b94e7d4
Merge pull request #20681 from calixteman/bug2016212
Correctly handle tab/page down when on a menu (bug 2016212)
2026-02-18 15:39:53 +01:00
Jonas Jenwald
e1cc24c595 Set the annotationType automatically in the Annotation constructor
Rather than assigning it manually in every extending class, we can utilize the fact that the `AnnotationType`-entries are simply the upper-case version of the `/Subtype` (when it exists) in the Annotation dictionary.
2026-02-18 14:47:42 +01:00
Calixte Denizet
5290534c53
Correctly handle tab/page down when on a menu (bug 2016212) 2026-02-18 10:17:39 +01:00
calixteman
61de56440a
Merge pull request #20678 from calixteman/bug2016136
Add an aria-label to the checkboxes in the thumbnails view (bug 2016136)
2026-02-18 10:14:36 +01:00
Jonas Jenwald
3a32ca7e69
Merge pull request #20682 from Snuffleupagus/CanvasGraphics-rm-unused-props
Remove unused `CanvasGraphics` properties (PR 700 follow-up)
2026-02-17 22:38:33 +01:00
Jonas Jenwald
336cda0c64 Remove unused CanvasGraphics properties (PR 700 follow-up)
These are probably a copy-and-paste mistake, since they appear to have been unused already in PR 700 all the way back in 2011.
2026-02-17 21:36:08 +01:00
Calixte Denizet
65f1b9b95b
Add an aria-label to the checkboxes in the thumbnails view (bug 2016136) 2026-02-17 20:58:10 +01:00
Tim van der Meij
cfc93e2606
Merge pull request #20665 from calixteman/fix_coverage
Fix code coverage line mapping
2026-02-17 20:16:41 +01:00
Tim van der Meij
178261a813
Merge pull request #20463 from matt-atticus/fix-text-selection-under-search-highlight
fix: support text selection under search highlights
2026-02-17 20:03:42 +01:00
Tim van der Meij
5084e3d0ec
Merge pull request #20675 from calixteman/bug2015916
Fix the keyboard accessibility of the manage button in the thumbnails view (bug 2015916)
2026-02-17 20:03:19 +01:00
Calixte Denizet
f4a2fd60db
Fix the keyboard accessibility of the manage button in the thumbnails view (bug 2015916) 2026-02-17 19:00:20 +01:00
Jonas Jenwald
fe44bac6ef
Merge pull request #20673 from Snuffleupagus/PDFObjects-Map
Convert the `PDFObjects` class to use a `Map` internally
2026-02-17 13:54:48 +01:00
Calixte Denizet
167dc5a415
Add an aria-label to the sidebar resizer (bug 2016142) 2026-02-17 13:38:56 +01:00
Jonas Jenwald
6323afab46 Convert the PDFObjects class to use a Map internally
This patch also adds unconditional `Map.prototype.getOrInsertComputed()` usage, which should be fine since it's [supported in the latest browsers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/getOrInsertComputed#browser_compatibility) and it'll be polyfilled (via core-js) in the `legacy` builds.
2026-02-17 09:42:27 +01:00
Matthew Lawrence
f01e4d477e fix: prevent search highlights from interfering with drag-selection 2026-02-17 13:46:02 +11:00
Jonas Jenwald
62ac1b844a
Merge pull request #20669 from Snuffleupagus/decode-truncate
Truncate too long /Decode map entries (issue 20668)
2026-02-16 20:39:12 +01:00
Jonas Jenwald
8319fff9b6
Merge pull request #20663 from Snuffleupagus/xref-rm-Object-hasOwn
Remove `Object.hasOwn` usage from the `src/core/xref.js` file
2026-02-16 20:38:18 +01:00
Jonas Jenwald
31b4612ac0 Truncate too long /Decode map entries (issue 20668) 2026-02-16 16:22:00 +01:00
calixteman
2b57ef4b56
Fix code coverage line mapping
When checking the code coverage report, it was noticed that the line numbers were off.
It was due to the fact that the files used for coverage were the transpiled ones,
when the ones used by Codecov were the original ones.
So this patches adds the source maps to the transpiled files, and also updates
the license header in the original files in using a babel plugin in order
to make sure the line numbers are correct.
As a side effect of this work, it's now possible to have the correct line
numbers in the stack traces when running tests with the transpiled files.
2026-02-15 23:03:07 +01:00
Jonas Jenwald
0a9176422e Remove Object.hasOwn usage from the src/core/xref.js file
This should not be necessary, given the following checks done early during the worker initialization: c5746949ac/src/core/worker.js (L124-L141)
2026-02-15 16:39:39 +01:00
Tim van der Meij
b27caa0f7b
Upgrade @csstools/postcss-light-dark-function to version 3.0.0
This is a major version bump, but the changelog at
https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-light-dark-function/CHANGELOG.md
doesn't indicate any breaking changes that should impact us.

We only have to list `@csstools/postcss-light-dark-function` in
`eslint.config.js` similar to e.g. commit a2909f9b.
2026-02-14 20:15:30 +01:00
Tim van der Meij
5875cddbf0
Upgrade postcss-dir-pseudo-class to version 10.0.0
This is a major version bump, but the changelog at
https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-dir-pseudo-class/CHANGELOG.md
doesn't indicate any breaking changes that should impact us.

We only have to list `postcss-dir-pseudo-class` in `eslint.config.js`
similar to e.g. commit a2909f9b.
2026-02-14 20:12:43 +01:00
Tim van der Meij
e6c85537c6
Upgrade postcss-nesting to version 14.0.0
This is a major version bump, but the changelog at
https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-nesting/CHANGELOG.md
doesn't indicate any breaking changes that should impact us.

We only have to list `postcss-nesting` in `eslint.config.js` similar
to e.g. commit a2909f9b.
2026-02-14 20:10:09 +01:00
Tim van der Meij
ebc8946298
Upgrade stylelint to version 17.3.0
This is a major version bump, but the changelog at
https://github.com/stylelint/stylelint/releases/tag/17.0.0
doesn't indicate any breaking changes that should impact us.

We only have to list `stylelint` in `eslint.config.js` similar to e.g.
commit a2909f9b.
2026-02-14 20:05:41 +01:00
Tim van der Meij
0888b85a46
Upgrade eslint-plugin-unicorn to version 63.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v63.0.0
doesn't indicate any breaking changes that should impact us.

Note that this version supports ESLint 10, which is a prerequisite for
being able to upgrade ESLint itself in a follow-up later.
2026-02-14 19:55:56 +01:00
Tim van der Meij
6bce7a3abc
Update translations to the most recent versions 2026-02-14 19:55:50 +01:00
Tim van der Meij
41e2f4e6c6
Fix moderate-severity vulnerability in the markdown-it dependency
This patch is generated automatically using `npm audit fix`.
2026-02-14 19:55:50 +01:00
Tim van der Meij
9edfeb0d33
Update dependencies to the most recent versions 2026-02-14 19:49:26 +01:00
Tim van der Meij
c5746949ac
Merge pull request #20659 from calixteman/codecov_badge
Add a Codecov badge
2026-02-14 19:35:28 +01:00
Jonas Jenwald
59fbad617b Convert ChunkedStreamManager.prototype.sendRequest to an asynchronous method
This is not only shorter, but (in my opinion) it also simplifies the code.

*Note:* In order to keep the *five* different `BasePDFStreamRangeReader` implementations consistent, we purposely don't re-factor the `PDFWorkerStreamRangeReader` class to support `for await...of` iteration.
2026-02-14 15:49:31 +01:00
calixteman
f975a95cc4
Add a Codecov badge 2026-02-14 15:48:16 +01:00
Tim van der Meij
b6d028419b
Merge pull request #20658 from calixteman/node_coverage
Add code coverage for unit tests running in node
2026-02-14 15:41:17 +01:00
Tim van der Meij
1d6307f5d4
Merge pull request #20657 from Snuffleupagus/unicorn-prefer-class-fields
Enable the `unicorn/prefer-class-fields` ESLint plugin rule
2026-02-14 15:26:28 +01:00
calixteman
07dbda2d80
Add code coverage for unit tests running in node
It's a first step to add code coverage.
In order to get the code coverage report locally, you can run the following command:
```bash
npx gulp unittestcli --coverage
```
The code coverage report will be generated in the `./build/coverage` directory.
And the report can be consulted by opening:
  http://localhost:8888/build/coverage/index.html

A GitHub workflow has also been added to run the unit tests with code coverage
on each push and pull request. The report will be uploaded to Codecov.
2026-02-14 15:22:35 +01:00
Tim van der Meij
f22fb6bbfb
Merge pull request #20652 from Snuffleupagus/ChunkedStream-sendRequest-skip-empty
Avoid parsing skipped range requests in `ChunkedStreamManager` (PR 10694 follow-up)
2026-02-14 13:55:31 +01:00
Jonas Jenwald
170599f1e7 Enable the unicorn/prefer-class-fields ESLint plugin rule
This leads to slightly shorter code[1] when initializing classes, and in some cases we can even remove the constructors, which shouldn't hurt; see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md

It's probably possible to also change a lot of these class fields to private ones[2], however it's often difficult to tell at a glance if that's safe hence this patch only does this for the `PDFRenderingQueue`.

---

[1] This reduces the size of the `gulp mozcentral` output by 999 bytes, for a mostly mechanical code change.

[2] That sort of re-factoring should generally be done separately, on a class-by-class basis, to reduce the risk of regressions.
2026-02-14 12:33:34 +01:00
calixteman
fa908e452c
Merge pull request #20641 from calixteman/fix_ts
Fix types to make "gulp typestest" succeeding
2026-02-13 22:37:16 +01:00
calixteman
45c7805daf
Fix types to make "gulp typestest" succeeding 2026-02-13 22:34:04 +01:00
Tim van der Meij
63110e34a7
Merge pull request #20654 from Snuffleupagus/eslint-unicorn-rules
Enable a couple of additional `eslint-plugin-unicorn` rules
2026-02-13 19:51:42 +01:00
Tim van der Meij
b8a091107d
Merge pull request #20655 from calixteman/pdfium_update
Update jbig2 decoder (pdfium@0455e822ded1a5537d826703988e986a33d2d4a1)
2026-02-13 19:50:35 +01:00
Tim van der Meij
3302b3d5b6
Merge pull request #20656 from Snuffleupagus/mv-stripPath
Move and re-use the `stripPath` helper function more
2026-02-13 19:49:57 +01:00
Jonas Jenwald
520928719c Move and re-use the stripPath helper function more
There's a couple of spots that essentially re-implement that function.
2026-02-13 17:38:21 +01:00
Calixte Denizet
5a146a8d2f
Update jbig2 decoder (pdfium@0455e822ded1a5537d826703988e986a33d2d4a1) 2026-02-13 14:40:32 +01:00
Jonas Jenwald
d595b09d01 Enable a couple of additional eslint-plugin-unicorn rules
- `no-useless-collection-argument` which required no code changes, see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md
 - `prefer-classlist-toggle` which required one change (done automatically with `gulp lint --fix`), see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md
2026-02-13 11:25:58 +01:00
calixteman
fa28ca1468
Merge pull request #20651 from Snuffleupagus/Response-bytes
Start using `Response.prototype.bytes()` in the code-base
2026-02-13 10:31:54 +01:00
calixteman
ae9fc13d8f
Merge pull request #20649 from calixteman/bug2015385
Ends the current drawing session when closing the tab (bug 2015385)
2026-02-13 08:27:16 +01:00
calixteman
1b20ba5c3f
Ends the current drawing session when closing the tab (bug 2015385) 2026-02-12 22:21:55 +01:00
Jonas Jenwald
b3c07f4b3d Avoid parsing skipped range requests in ChunkedStreamManager (PR 10694 follow-up)
While we don't dispatch the actual range request after PR 10694 we still parse the returned data, which ends up being an *empty* `ArrayBuffer` and thus cannot affect the `ChunkedStream.prototype._loadedChunks` property.
Given that no actual data arrived, it's thus pointless[1] to invoke the `ChunkedStreamManager.prototype.onReceiveData` method in this case (and it also avoids sending effectively duplicate "DocProgress" messages).

---
[1] With the *possible* exception of `disableAutoFetch === false` being set, see f24768d7b4/src/core/chunked_stream.js (L499-L517) however that never happens when streaming is being used; note f24768d7b4/src/core/worker.js (L237-L238)
2026-02-12 18:01:54 +01:00
calixteman
f24768d7b4
Merge pull request #20648 from Snuffleupagus/api-async-getTextContent
Convert `PDFPageProxy.prototype.getTextContent` to an asynchronous method
2026-02-12 13:47:04 +01:00
Jonas Jenwald
722f1ffbc6 Remove type === "arraybuffer" support from the fetchData helper function
After the previous patch there's no longer any call-site using that type.
2026-02-12 11:23:28 +01:00
Jonas Jenwald
8ba83e73fa Start using Response.prototype.bytes() in the code-base
In all cases where we currently use `Response.prototype.arrayBuffer()` the result is immediately wrapped in a `Uint8Array`, which can be avoided by instead using the newer `Response.prototype.bytes()` method; see https://developer.mozilla.org/en-US/docs/Web/API/Response/bytes
2026-02-12 11:20:05 +01:00
Jonas Jenwald
c1b824f2e5 Convert PDFPageProxy.prototype.getTextContent to an asynchronous method
This is a tiny bit shorter, which cannot hurt.
2026-02-11 19:14:10 +01:00
calixteman
7077b2a998
Merge pull request #20644 from marco-c/mcp
Add firefox-devtools-mcp to let AI agents test and debug in Firefox
2026-02-10 09:58:05 +01:00
Tim van der Meij
96dbe92b53
Merge pull request #20643 from calixteman/fix_integration_test2
Fix a 'FreeText accessibility' integration test
2026-02-09 20:46:05 +01:00
calixteman
0b5f402158
Merge pull request #20639 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2026-02-09 17:48:10 +01:00
Jonas Jenwald
4f40a5427c
Merge pull request #20645 from Snuffleupagus/Chrome-118
[api-minor] Update the minimum supported Google Chrome version to 118
2026-02-09 13:59:51 +01:00
Jonas Jenwald
385c936318 [api-minor] Update the minimum supported Google Chrome version to 118
This patch updates the minimum supported browsers as follows:
 - Google Chrome 118, which was released on 2023-10-10; see https://chromereleases.googleblog.com/2023/10/stable-channel-update-for-desktop_10.html

We haven't made any changes to the supported Google Chrome version for a year, and this change allows us to remove "hacks" needed to support `float: inline-start/inline-end` in old browsers; see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/float#browser_compatibility.

Note that nowadays we usually try, where feasible and possible, to support browsers that are about two years old. By limiting support to only "recent" browsers we reduce the risk of holding back improvements of the *built-in* Firefox PDF Viewer, and also (significantly) reduce the maintenance/support burden for the PDF.js contributors.

*Please note:* As always, the minimum supported browser version assumes that a `legacy`-build of the PDF.js library is being used; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
2026-02-09 12:16:46 +01:00
Marco Castelluccio
c0c0dfb2fa
Add firefox-devtools-mcp to let AI agents test and debug in Firefox 2026-02-09 11:00:02 +01:00
calixteman
d0a6531939
Merge pull request #20642 from Snuffleupagus/version-5.5
Bump library version to `5.5`
2026-02-09 10:32:03 +01:00
calixteman
9870d898b4
Merge pull request #20640 from calixteman/issue20629
Set a pages mapper per loaded document
2026-02-09 10:27:33 +01:00
Calixte Denizet
0f9d20fa32
Fix a 'FreeText accessibility' integration test
It's a regression from #20624.
2026-02-09 10:14:43 +01:00
Jonas Jenwald
f0e8807f04 Bump library version to 5.5 2026-02-08 23:31:21 +01:00
calixteman
babd030a77
Merge pull request #20638 from calixteman/avoid_branching
Avoid branching in convertBlackAndWhiteToRGBA
2026-02-08 21:16:29 +01:00
calixteman
4b4ab10c54
Set a pages mapper per loaded document
It fixes #20629.
2026-02-08 21:09:27 +01:00
Tim van der Meij
2a2806dc07
Merge pull request #20637 from Snuffleupagus/issue-20246
Normalize the font name in `getBaseFontMetrics` (issue 20246)
2026-02-08 19:48:16 +01:00
Tim van der Meij
47d51feb22
Update translations to the most recent versions 2026-02-08 18:57:35 +01:00
Tim van der Meij
08b6fef5fa
Fix vulnerabilities in dependency versions
This patch is generated automatically using `npm audit fix`.
2026-02-08 18:56:55 +01:00
Tim van der Meij
0c5a590bbd
Update dependencies to the most recent versions 2026-02-08 18:55:55 +01:00
calixteman
a9870adfa3
Avoid branching in convertBlackAndWhiteToRGBA
The function is now almost 8x faster than before.
And make the code in the file slightly more readable.
2026-02-08 18:36:40 +01:00
Jonas Jenwald
6a3d5fea6c Replace a few cases of "manual" font name normalization with the normalizeFontName helper function 2026-02-08 16:56:50 +01:00
Jonas Jenwald
e9c509aca9 Normalize the font name in getBaseFontMetrics (issue 20246)
We tried to lookup the font metrics using the font name as-is, which didn't work since the PDF file in question has non-embedded fonts with names that include commas.
Hence the font names need to be normalized here as well, similar to elsewhere in the font code.
2026-02-08 16:56:15 +01:00
Tim van der Meij
2b95a8eb38
Merge pull request #20634 from Snuffleupagus/progressiveDone-resolve-requests
Ensure that pending requests are resolved when calling `PDFDataTransportStreamReader.prototype.progressiveDone`
2026-02-08 14:56:41 +01:00
Tim van der Meij
025d658a9c
Merge pull request #20635 from Snuffleupagus/Node-update-support
[api-minor] Update the supported Node.js "patch" versions
2026-02-08 14:47:01 +01:00
Jonas Jenwald
0306e6c7ed Re-use the getArrayBuffer helper from src/display/fetch_stream.js with PDFNodeStreamReader and PDFNodeStreamRangeReader
Given that the Node.js code uses standard `ReadableStream`s now, see PR 20594, it can use the same `getArrayBuffer` as the Fetch API implementation.

Also, change the `getArrayBuffer` fallback case to an Error (rather than a warning) since that should never actually happen.
2026-02-08 13:20:55 +01:00
Jonas Jenwald
916b58a027 Add a helper function to resolve pending requests in src/display/transport_stream.js and src/display/network.js
Currently the same identical code is duplicated four times per file, which seems completely unnecessary.
Note that the function isn't placed in `src/display/network_utils.js`, since that file isn't included in MOZCENTRAL builds.
2026-02-08 13:20:50 +01:00
Jonas Jenwald
a80f8ff014 [api-minor] Update the supported Node.js "patch" versions
We haven't made any changes to the supported Node.js versions for close to a year, however now seems like a good time to do so in order to unblock future (major version) package upgrades.

 - Babel version `8` is now close to release, since https://github.com/babel/babel/releases contain an 8-RC version and according to [this article](https://babel.dev/blog/2026/01/31/7.29.0) no new `7` releases are planned.
   See also https://babel.dev/blog/2025/05/30/babel-8-beta and note the supported Node.js versions in https://next.babeljs.io/docs/v8-migration/#nodejs-support

 - ESLint version `10` was just released, see https://eslint.org/blog/2026/02/eslint-v10.0.0-released/ and note the supported Node.js versions in https://eslint.org/docs/latest/use/migrate-to-10.0.0#-nodejs--v2019-v21-v23-are-no-longer-supported
2026-02-08 12:32:09 +01:00
Jonas Jenwald
2d643efce5 Ensure that pending requests are resolved when calling PDFDataTransportStreamReader.prototype.progressiveDone
Doing skip-cache reloading of https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#disableRange=true in the latest Firefox Nightly version I noticed an *intermittent* bug, where the loadingBar would fill up but without the PDF ever rendering.
Initially I was quite worried that the changes in PR 20602 had somehow caused this, however after a bunch of testing in a slightly older Nightly I was able to reproduce the problem there as well.[1]

Instead I believe that this problem goes all the back to PR 10675, so still my fault, since the `progressiveDone` handling there was incomplete.
Note how we only set the `this._done` property, but don't actually resolve any still pending requests. For reference, compare with the handling in the `PDFDataTransportStreamRangeReader.prototype._enqueue` method.
Depending on the exact order in which the `PDFDataTransportStreamReader.prototype.{_enqueue, read, progressiveDone}` methods are invoked, which depends on how/when the PDF data arrives, the bug might occur.

The reason that this bug hasn't been caught before now is likely that `disableRange=true` isn't used by default and Firefox users are unlikely to manually set that in e.g. `about:config`.

---
[1] Possibly some timings changed to make it slightly more common, but given the intermittent nature of this it's difficult to tell.
2026-02-07 22:24:20 +01:00
calixteman
c00591c1b6
Merge pull request #20623 from calixteman/bug2014080
In tagged pdfs, TH can be either a column header or a row header (bug 2014080)
2026-02-06 16:42:22 +01:00
Calixte Denizet
280a02150e
In tagged pdfs, TH can be either a column header or a row header (bug 2014080) 2026-02-06 10:04:13 +01:00
calixteman
58ac273f1f
Merge pull request #20503 from andriivitiv/Fix-Worker-was-terminated-error
Fix `Worker was terminated` error when loading is cancelled
2026-02-06 09:59:05 +01:00
calixteman
b92bdf80a2
Merge pull request #20628 from calixteman/bug2014399
Cap the max canvas dimensions in order to avoid to downscale large images in the worker (bug 2014399)
2026-02-06 09:42:04 +01:00
Tim van der Meij
f302323c7e
Merge pull request #20627 from Snuffleupagus/ChunkedStream-onReceiveData-rm-copy
Improve progress reporting in `ChunkedStreamManager`, and prevent unnecessary data copy in `ChunkedStream.prototype.onReceiveData`
2026-02-05 21:27:42 +01:00
Tim van der Meij
a0f3528053
Merge pull request #20624 from calixteman/bug2013793
Flush the text content chunk only on real font changes (bug 2013793)
2026-02-05 21:14:49 +01:00
Calixte Denizet
ff42c0bd50
Cap the max canvas dimensions in order to avoid to downscale large images in the worker (bug 2014399) 2026-02-05 20:25:36 +01:00
Jonas Jenwald
b3cd042ded Prevent unnecessary data copy in ChunkedStream.prototype.onReceiveData
This method is only invoked via `ChunkedStreamManager.prototype.sendRequest`, which currently returns data in `Uint8Array` format (since it potentially combines multiple `ArrayBuffer`s).
Hence we end up doing a short-lived, but still completely unnecessary, data copy[1] in `ChunkedStream.prototype.onReceiveData` when handling range requests. In practice this is unlikely to be a big problem by default, given that streaming is used and the (low) value of the `rangeChunkSize` API-option. (However, in custom PDF.js deployments it might affect things more.)

Given that no data copy is better than a short lived one, let's fix this small oversight and add non-production `assert`s to keep it working as intended.
This way we also improve consistency, since all other streaming and range request methods (see e.g. `BasePDFStream` and related code) only return `ArrayBuffer` data.

---
[1] Remember that `new Uint8Array(arrayBuffer)` only creates a view of the underlying `arrayBuffer`, whereas `new Uint8Array(typedArray)` actually creates a copy of the `typedArray`.
2026-02-05 16:16:36 +01:00
Jonas Jenwald
01deb085f8 Improve progress reporting in the ChunkedStreamManager
Currently there's two small bugs, which have existed around a decade, in the `loaded` property that's sent via the "DocProgress" message from the `ChunkedStreamManager.prototype.onReceiveData` method.

 - When the entire PDF has loaded the `loaded` property can become larger than the `total` property, which obviously doesn't make sense.
   This happens whenever the size of the PDF is *not* a multiple of the `rangeChunkSize` API-option, which is a very common situation.

 - When streaming is being used, the `loaded` property can become smaller than the actually loaded amount of data.
   This happens whenever the size of a streamed chunk is *not* a multiple of the `rangeChunkSize` API-option, which is a common situation.
2026-02-05 16:04:45 +01:00
calixteman
222a24c623
Merge pull request #20622 from calixteman/bug2014167
Let the toggle button in the alt-text dialog downloading (resp. delete) the model and enabling (resp. disabling) alt-text guessing (bug 2014167)
2026-02-04 14:13:05 +01:00
calixteman
1e0ba4dfec
Merge pull request #20621 from calixteman/bug2013899
Avoid to have to download the model when toggling the button in the alt-text image settings dialog (bug 2013899)
2026-02-04 14:12:27 +01:00
calixteman
22b97d1741
Flush the text content chunk only on real font changes (bug 2013793) 2026-02-03 23:11:31 +01:00
Calixte Denizet
ea993bfc1b
Let the toggle button in the alt-text dialog downloading (resp. delete) the model and enabling (resp. disabling) alt-text guessing (bug 2014167) 2026-02-03 20:27:06 +01:00
Calixte Denizet
c7bea3b342
Avoid to have to download the model when toggling the button in the alt-text image settings dialog (bug 2013899) 2026-02-03 19:26:33 +01:00
calixteman
1c12b07726
Merge pull request #20613 from calixteman/ccittfax_pdfium
Use the ccittfax decoder from pdfium
2026-02-02 15:07:53 +01:00
calixteman
88c2051698
Use the ccittfax decoder from pdfium
The decoder is a dependency of the jbig2 one and is already
included in pdf.js, so we just need to wire it up.
It improves the performance of documents using ccittfax images.
2026-02-02 11:10:32 +01:00
Jonas Jenwald
bfd17b2586
Merge pull request #20615 from Snuffleupagus/transport-onProgress
Report loading progress "automatically" when using the `PDFDataTransportStream` class, and remove the `PDFDataRangeTransport.prototype.onDataProgress` method
2026-02-01 22:36:43 +01:00
Jonas Jenwald
d152e92185
Merge pull request #20614 from Snuffleupagus/BasePDFStream-url
Change all relevant `BasePDFStream` implementations to take an actual `URL` instance
2026-02-01 22:13:28 +01:00
Tim van der Meij
f4326e17c4
Merge pull request #20610 from calixteman/brotli
Add support for Brotli decompression
2026-02-01 20:41:06 +01:00
Tim van der Meij
3f21efc942
Merge pull request #20607 from Snuffleupagus/rm-web-interfaces
Replace the various interfaces in `web/interfaces.js` with proper classes
2026-02-01 20:31:13 +01:00
Tim van der Meij
8eb9340fa7
Merge pull request #20617 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-02-01 20:23:40 +01:00
Tim van der Meij
031f633236
Bump the stable version in pdfjs.config 2026-02-01 20:20:49 +01:00
Jonas Jenwald
6509fdb1d6 Assert that PDFFetchStream is only used with HTTP(S) URLs
Note how `getDocument` checks the protocol, via the `isValidFetchUrl` helper, before attempting to use the `PDFFetchStream` implementation.
2026-02-01 18:21:27 +01:00
Jonas Jenwald
586e85888b Change all relevant BasePDFStream implementations to take an actual URL instance
Currently this code expects a "url string", rather than a proper `URL` instance, which seems completely unnecessary now. The explanation for this is, as so often is the case, "historical reasons" since a lot of this code predates the general availability of `URL`.
2026-02-01 18:21:13 +01:00
Jonas Jenwald
76dabeddb3 Limit the Math.sumPrecise polyfill to non-MOZCENTRAL builds
After https://bugzilla.mozilla.org/show_bug.cgi?id=1985121 this functionality is now guaranteed to be available in Firefox.
Unfortunately general browser support is still somewhat lacking; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sumPrecise#browser_compatibility

Also, while unrelated, use the `MathClamp` helper in the `applyOpacity` function.
2026-02-01 18:20:29 +01:00
Jonas Jenwald
d25f13d1fd Report loading progress "automatically" when using the PDFDataTransportStream class, and remove the PDFDataRangeTransport.prototype.onDataProgress method
This is consistent with the other `BasePDFStream` implementations, and simplifies the API surface of the `PDFDataRangeTransport` class (note the changes in the viewer).
Given that the `onDataProgress` method was changed to a no-op this won't affect third-party users, assuming there even are any since this code was written specifically for the Firefox PDF Viewer.
2026-02-01 18:20:19 +01:00
Jonas Jenwald
aa4d0f7c07 Temporarily disable typestest in GitHub Actions 2026-02-01 17:56:07 +01:00
Jonas Jenwald
023af46186 Replace the IRenderableView interface with an abstract RenderableView class
This should help reduce the maintenance burden of the code, since you no longer need to remember to update separate code when touching the different page/thumbnail classes.
2026-02-01 17:56:06 +01:00
Jonas Jenwald
839c257f87 Replace the IDownloadManager interface with an abstract BaseDownloadManager class
This should help reduce the maintenance burden of the code, since you no longer need to remember to update separate code when touching the different `DownloadManager` classes.
2026-02-01 17:56:03 +01:00
Jonas Jenwald
ff7f87fc21 Replace the IPDFPrintServiceFactory interface with an abstract BasePrintServiceFactory class
This should help reduce the maintenance burden of the code, since you no longer need to remember to update separate code when touching the different `PDFPrintServiceFactory` classes.
2026-02-01 17:53:45 +01:00
Jonas Jenwald
50a12e3e67 Remove the IL10n interface
Given that we either use the `L10n` class directly or extend it via `GenericL10n`, it should no longer be necessary to keep the interface-definition.
This should help reduce the maintenance burden of the code, since you no longer need to remember to update separate code when touching the `L10n` class.
2026-02-01 17:53:45 +01:00
Jonas Jenwald
b517b5c597 Remove the IPDFLinkService interface
Given that `SimpleLinkService` now extends the regular `PDFLinkService` class, see PR 18013, it should no longer be necessary to keep the interface-definition.
This should help reduce the maintenance burden of the code, since you no longer need to remember to update separate code when touching the `PDFLinkService` class.
2026-02-01 17:53:45 +01:00
Tim van der Meij
384c6208b2
Merge pull request #20565 from kairosci/fix-bug-20557
fix: Fix mailto links truncated at dash
2026-02-01 17:34:34 +01:00
Tim van der Meij
e4cd3176ab
Merge pull request #20602 from Snuffleupagus/BasePDFStream-2
Replace the `IPDFStream`, `IPDFStreamReader`, and `IPDFStreamRangeReader` interfaces with proper base classes
2026-02-01 16:53:17 +01:00
Jonas Jenwald
ecb09d62fc Add the current loading percentage to the onPassword callback
The percentage calculation is currently "spread out" across various viewer functionality, which we can avoid by having the API handle that instead.

Also, remove the `this.#lastProgress` special-case[1] and just register a "normal" `fullReader.onProgress` callback unconditionally. Once `headersReady` is resolved the callback can simply be removed when not needed, since the "worst" thing that could theoretically happen is that the loadingBar (in the viewer) updates sooner this way. In practice though, since `fullReader.read` cannot return data until `headersReady` is resolved, this change is not actually observable in the API.

---

[1] This was added in PR 8617, close to a decade ago, but it's not obvious to me that it was ever necessary to implement it that way.
2026-01-31 16:33:58 +01:00
calixteman
43273fde27
Add support for Brotli decompression
For now, `BrotliDecode` hasn't been specified but it should be in a
close future.
So when it's possible we use the native `DecompressionStream` API
with "brotli" as argument.
If that fails or if we've to decompress in a sync context, we fallback
to `BrotliStream` which a pure js implementation (see README in external/brotli).
2026-01-31 16:25:53 +01:00
Jonas Jenwald
4ca205bac3 Add an abstract BasePDFStreamRangeReader class, that all the old IPDFStreamRangeReader implementations inherit from
Given that there's no less than *five* different, but very similar, implementations this helps reduce code duplication and simplifies maintenance.
2026-01-30 14:15:39 +01:00
Jonas Jenwald
54d8c5e7b4 Add an abstract BasePDFStreamReader class, that all the old IPDFStreamReader implementations inherit from
Given that there's no less than *five* different, but very similar, implementations this helps reduce code duplication and simplifies maintenance.

Also, remove the `rangeChunkSize` not defined checks in all the relevant stream-constructor implementations.
Note how the API, since some time, always validates *and* provides that parameter when creating a `BasePDFStreamReader`-instance.
2026-01-30 14:15:39 +01:00
Jonas Jenwald
4a8fb4dde1 Add an abstract BasePDFStream class, that all the old IPDFStream implementations inherit from
Given that there's no less than *five* different, but very similar, implementations this helps reduce code duplication and simplifies maintenance.

Also, spotted during rebasing, pass the `enableHWA` option "correctly" (i.e. as part of the existing `transportParams`) to the `WorkerTransport`-class to keep the constructor simpler.
2026-01-30 14:15:39 +01:00
Jonas Jenwald
a80f10ff1a Remove the onProgress callback from the IPDFStreamRangeReader interface
Note how there's *nowhere* in the code-base where the `IPDFStreamRangeReader.prototype.onProgress` callback is actually being set and used, however the loadingBar (in the viewer) still works just fine since loading progress is already reported via:
 - The `ChunkedStreamManager` instance respectively the `getPdfManager` function, through the use of a "DocProgress" message, on the worker-thread.
 - A `IPDFStreamReader.prototype.onProgress` callback, on the main-thread.

Furthermore, it would definitely *not* be a good idea to add any `IPDFStreamRangeReader.prototype.onProgress` callbacks since they only include the `loaded`-property which would trigger the "indeterminate" loadingBar (in the viewer).

Looking briefly at the history of this code it's not clear, at least to me, when this became unused however it's probably close to a decade ago.
2026-01-30 14:15:39 +01:00
Jonas Jenwald
05b78ce03c Stop registering an onProgress callback on the PDFWorkerStreamRangeReader-instance, in the ChunkedStreamManager class
Given that nothing in the `PDFWorkerStreamRangeReader` class attempts to invoke the `onProgress` callback, this is effectively dead code now.
Looking briefly at the history of this code it's not clear, at least to me, when this became unused however it's probably close to a decade ago.

Finally, note also how progress is already being reported through the `ChunkedStreamManager.prototype.onReceiveData` method.
2026-01-30 14:15:38 +01:00
Jonas Jenwald
987265720e Remove the unused IPDFStreamRangeReader.prototype.isStreamingSupported getter
This getter was only invoked from `src/display/network.js` and `src/core/chunked_stream.js`, however in both cases it's hardcoded to `false` and thus isn't actually needed.
This originated in PR 6879, close to a decade ago, for a potential TODO which was never implemented and it ought to be OK to just simplify this now.
2026-01-30 14:15:38 +01:00
Jonas Jenwald
62d5408cf0 Stop tracking progressiveDataLength in the ChunkedStreamManager class
Currently this property is essentially "duplicated", so let's instead use the identical one that's availble on the `ChunkedStream` instance.
2026-01-30 14:15:38 +01:00
Jonas Jenwald
814df09e21
Merge pull request #20603 from Snuffleupagus/createChromiumPrefsSchema
Improve preferences building, and generate the `preferences_schema.json` file for the Chromium addon
2026-01-30 14:12:27 +01:00
Jonas Jenwald
d4fbae06d9
Merge pull request #20605 from Snuffleupagus/rm-util-global-tests
Remove unit-tests for global `ReadableStream` and `URL`
2026-01-30 14:06:15 +01:00
Jonas Jenwald
1370950843 Remove unnecessary IIFEs when setting the compatParams
This really isn't necessary, and it's just a left-over from before the code was moved into the current file.

Also, spotted during rebasing, use the existing "locale" hash-parameter in integration-tests rather than adding a duplicate one for testing.
2026-01-30 13:31:16 +01:00
Jonas Jenwald
5d02076313 Add tests (and CI) to ensure that preference generation works correctly for all relevant build-targets
Given that previous patches reduced that number of build-targets running this code, ensure that it's still tested sufficiently.
2026-01-30 13:31:13 +01:00
Jonas Jenwald
2a83f955b0 Make getDefaultPreferences a synchronous function, to simplify the build scripts 2026-01-30 13:26:19 +01:00
Jonas Jenwald
06cf7dd7b0 Stop pre-building the preference defaults, to simplify the build scripts
This is a left-over from before the introduction of `AppOptions`, but is no longer necessary now.
2026-01-30 13:26:19 +01:00
Jonas Jenwald
35e78f7f11 Generate the preferences_schema.json file, for the Chromium addon, during building
This avoids the hassle of having to manually update that file when adding/modifying preferences in the viewer.
Updating the preferences-metadata should now only be something that the Chromium addon maintainer has to do.
2026-01-30 13:26:16 +01:00
Jonas Jenwald
a2909f9b66 List postcss-values-parser as an import alias in the ESLint config
This is similar to how other packages are handled, note e.g. the `fluent` ones.
2026-01-30 10:26:23 +01:00
Jonas Jenwald
9c903a0ebc Remove unit-tests for global ReadableStream and URL
These unit-tests were added many years ago, when this functionality wasn't generally available and we still bundled polyfills.
Since they are both available everywhere nowadays, see [here](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) and [here](https://developer.mozilla.org/en-US/docs/Web/API/URL), these unit-tests no longer make sense.
2026-01-30 10:16:21 +01:00
Tim van der Meij
471adfd023
Merge pull request #20596 from Snuffleupagus/FileSpec-fixes
Simplify the `FileSpec` class, and remove no longer needed polyfills
2026-01-29 22:03:38 +01:00
Tim van der Meij
7cdd03ad9b
Merge pull request #20595 from Snuffleupagus/NetworkManager-simplify
Simplify the `NetworkManager` class, and inline it in the  `PDFNetworkStream` class
2026-01-29 21:56:58 +01:00
Tim van der Meij
c0572c1c8f
Merge pull request #20594 from Snuffleupagus/Node-ReadableStream
[Node.js] Don't abort the full request for local PDF files smaller than two range requests, and use standard `ReadableStream`s
2026-01-29 21:48:43 +01:00
Tim van der Meij
2cef80d05b
Merge pull request #20598 from calixteman/fix_sidebar_resize
Fix the sidebar resizer accessibility
2026-01-29 21:42:30 +01:00
Jonas Jenwald
5b368dd58a Remove the Uint8Array.prototype.toHex(), Uint8Array.prototype.toBase64(), and Uint8Array.fromBase64() polyfills
(During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.)

See:
 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toHex#browser_compatibility
 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64#browser_compatibility
 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64#browser_compatibility

Note that technically this functionality can still be disabled via a preference in Firefox, however that's slated for removal in [bug 1985120](https://bugzilla.mozilla.org/show_bug.cgi?id=1985120).
Looking at the Firefox source-code, see https://searchfox.org/firefox-main/search?q=array.tobase64%28%29&path=&case=false&regexp=false, you can see that it's already being used *unconditionally* elsewhere in the browser hence removing the polyfills ought to be fine (since toggling the preference would break other parts of the browser).
2026-01-29 17:27:43 +01:00
Jonas Jenwald
247ee02299 Remove the Promise.try() polyfill
(During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.)

Note:
 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try#browser_compatibility
 - https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
2026-01-29 17:25:46 +01:00
Jonas Jenwald
b3f35b6007 Return the rawFilename as-is even if it's empty, from FileSpec.prototype.serializable
It's more correct to return the `rawFilename` as-is, and limit the fallback for empty filenames to only the `filename` property.
2026-01-29 17:25:44 +01:00
Calixte Denizet
956c2a051a
Fix the sidebar resizer accessibility
It's width was a bit wrong because of its box-sizing property and it was causing some issues when resizing it with the keyboard.
And for the thumbnails sidebar, the tabindex was missing and some aria properties too.
2026-01-27 21:41:11 +01:00
calixteman
5505201930
Merge pull request #20582 from calixteman/reorg_save
Add a manage button in the thumbnail view in order to save an edited pdf (bug 2010830)
2026-01-26 19:25:50 +01:00
Calixte Denizet
dd6a0c6cf4
Add a manage button in the thumbnail view in order to save an edited pdf (bug 2010830) 2026-01-26 18:09:07 +01:00
calixteman
07a4aab246
Merge pull request #20587 from calixteman/reorg_simplify_mapping
Refactor a bit page mapping stuff in order to be able to support delete/copy pages
2026-01-26 17:43:49 +01:00
Calixte Denizet
806133379e
Refactor a bit page mapping stuff in order to be able to support delete/copy pages 2026-01-26 16:53:52 +01:00
calixteman
48df8a5ea2
Merge pull request #20586 from marco-c/commentundo
Bug 1999154 - Add the ability to undo comment deletion
2026-01-26 15:52:15 +01:00
calixteman
ab7d388ccb
Merge pull request #20591 from calixteman/reorg_fix_drag_width
Fix the drag marker dimensions in the thumbnails view
2026-01-26 09:00:01 +01:00
Calixte Denizet
f2ac669ee4
Fix the drag marker dimensions in the thumbnails view
STR:
 - open outline view;
 - switch to thumbnails one;
 - start to drag a thumbnail.
2026-01-25 21:49:17 +01:00
calixteman
001058abb2
Merge pull request #20593 from calixteman/decompress_content_stream
Use DecompressionStream in async code
2026-01-25 21:27:16 +01:00
Alessio Attilio
50f2d4db65 fix: allow hyphens in mailto link auto-detection (bug 20557)
Modified the regex in web/autolinker.js to explicitly allow hyphens (-) in
the domain part of email addresses, while maintaining the exclusion of
other punctuation. This fixes mailto links like user@uni-city.tld being
truncated at the hyphen.

Fixes #20557
2026-01-25 17:20:14 +01:00
calixteman
9f660be8a2
Use DecompressionStream in async code
Usually, content stream or fonts are compressed using FlateDecode.
So use the DecompressionStream API to decompress those streams
in the async code path.
2026-01-25 14:22:19 +01:00
Jonas Jenwald
640a3106d5 Remove caching/shadowing from the FileSpec getters, and simplify the code
Given that only the `FileSpec.prototype.serializable` getter is ever invoked from "outside" of the class, and only once per `FileSpec`-instance, the caching/shadowing isn't actually necessary.

Furthermore the `_contentRef`-caching wasn't actually correct, since it ended up storing a `BaseStream`-instance and those should *generally* never be cached.
(Since calling `BaseStream.prototype.getBytes()` more than once, without resetting the stream in between, will return an empty TypedArray after the first time.)
2026-01-25 13:16:29 +01:00
Jonas Jenwald
84b5866853 Reduce duplication in the pickPlatformItem helper function
Also, tweak code/comment used when handling "GoToR" destinations.
2026-01-25 13:16:06 +01:00
Jonas Jenwald
eaf605d720 Move the NetworkManager functionality into the PDFNetworkStream class
The `NetworkManager` is very old code at this point, and it predates the introduction of the streaming functionality by many years.
To simplify things, especially with upcoming re-factoring patches, let's move this functionality into private (and semi-private) methods in the `PDFNetworkStream` class to avoid having to deal with too many different scopes.
2026-01-25 12:41:33 +01:00
Jonas Jenwald
4d9301fceb Simplify the NetworkManager class
Store pending requests in a `WeakMap`, which allows working directly with the `XMLHttpRequest`-data and removes the need for a couple of methods.

Simplify the `PDFNetworkStreamRangeRequestReader.prototype._onDone` method, since after removing `moz-chunked-arraybuffer` support (see PR 10678) it's never called without an argument.

Stop sending the `begin`-property to the `onDone`-callbacks since it's unused. Originally this code was shared with the Firefox PDF Viewer, many years ago, and then that property mattered.

Re-factor the `status` validation, to avoid checking for a "bad" range-request response unconditionally.
2026-01-25 12:41:20 +01:00
Jonas Jenwald
663d4cd6e7 Use standard ReadableStreams in the src/display/node_stream.js code
Thanks to newer Node.js functionality, see https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options, we can use standard `ReadableStream`s which help to significantly shorten and simplify the code.

For older Node.js versions we use the `node-readable-to-web-readable-stream` package, see https://www.npmjs.com/package/node-readable-to-web-readable-stream, to get the same functionality.
2026-01-25 12:34:47 +01:00
Jonas Jenwald
45294d31cb In Node.js, don't abort the full request for local PDF files smaller than two range requests
This follows the behaviour used with both the Fetch API and `XMLHttpRequest`, compare with the `validateRangeRequestCapabilities` helper function.
2026-01-25 12:34:35 +01:00
Tim van der Meij
95f62f3b33
Merge pull request #20580 from calixteman/reorg_link_outline
Fix links and outline after reorganizing a pdf
2026-01-23 20:49:20 +01:00
Tim van der Meij
23c7b1ac8e
Merge pull request #20583 from calixteman/simplify_menu
Hide the menu container in changing it's visibility
2026-01-23 20:41:08 +01:00
Tim van der Meij
bfa44af327
Merge pull request #20554 from dgiessing/patch-1
Update image pattern in gulpfile to accommodate missing images
2026-01-23 20:22:23 +01:00
Tim van der Meij
109ea59fbc
Merge pull request #20588 from mozilla/dependabot/npm_and_yarn/lodash-4.17.23
Bump lodash from 4.17.21 to 4.17.23
2026-01-23 20:16:58 +01:00
David Giessing
0aa4fc6af8
fix: Update image pattern in gulpfile to accommodate missing images 2026-01-22 23:01:46 +01:00
Marco Castelluccio
bfdcaadf7c
Use kbUndo when possible 2026-01-22 13:12:38 +01:00
Marco Castelluccio
bdc9323b15
Hide comment popup after redo action 2026-01-22 13:12:13 +01:00
dependabot[bot]
3270c4a504
Bump lodash from 4.17.21 to 4.17.23
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-21 23:03:09 +00:00
Marco Castelluccio
84d15dc453
Restore date too 2026-01-21 17:06:13 +01:00
Marco Castelluccio
d9f67bd8ee
Bug 1999154 - Add the ability to undo comment deletion 2026-01-21 15:15:40 +01:00
Calixte Denizet
a4f4d460ca
Hide the menu container in changing it's visibility
This way, the dimensions of the menu container don't depend on its visibility.
This patch fixes few keyboard issues I noticed when reading:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menu_role#keyboard_interactions
2026-01-20 14:42:57 +01:00
calixteman
6a4a3b060d
Merge pull request #20475 from calixteman/organize_pages
Add the possibility to order the pages in an extracted pdf (bug 1997379)
2026-01-19 19:08:32 +01:00
calixteman
ce296d8d42
Add the possibility to order the pages in an extracted pdf (bug 1997379)
or in a merged one.
2026-01-19 18:58:23 +01:00
Calixte Denizet
43bd7fa738
Fix links and outline after reorganizing a pdf 2026-01-19 17:38:17 +01:00
calixteman
8188c87461
Merge pull request #20572 from calixteman/issue20571
Avoid exception after having moved an annotation
2026-01-18 21:06:50 +01:00
calixteman
8abfd9a797
Avoid exception after having moved an annotation
It fixes #20571.
2026-01-18 21:01:40 +01:00
calixteman
f04deeeddf
Merge pull request #20577 from calixteman/update_search
The 'find in page' feature must correctly work after the pages have been reorganized (bug 2010814)
2026-01-18 20:57:32 +01:00
Calixte Denizet
3a20ea75b9
The 'find in page' feature must correctly work after the pages have been reorganized (bug 2010814) 2026-01-18 20:54:15 +01:00
Tim van der Meij
fef0cb1a6f
Merge pull request #20578 from calixteman/bug2010820
Select the dropped thumbnail (bug 2010820)
2026-01-18 13:03:47 +01:00
Calixte Denizet
eb014a36cc
Select the dropped thumbnail (bug 2010820) 2026-01-16 19:54:14 +01:00
calixteman
67673ea274
Merge pull request #20559 from calixteman/new_sidebar2
Add the possibility to drag & drop some thumbnails in the pages view (bug 2009573)
2026-01-14 22:13:52 +01:00
Calixte Denizet
5e89981282
Add the possibility to drag & drop some thumbnails in the pages view
The goal is to be able to reorganize the pages in a pdf.
2026-01-14 21:04:38 +01:00
calixteman
cbcb6279ad
Merge pull request #20569 from calixteman/fix_caret_dark_mode
Make sure the caret is black in dark mode when in caret browsing mode
2026-01-14 16:57:05 +01:00
calixteman
6612d7afaf
Merge pull request #20567 from calixteman/bug2009627
Hide the text in the text layer associated with MathML elements (bug 2009627)
2026-01-14 14:19:37 +01:00
Calixte Denizet
cffd54e9c6
Hide the text in the text layer associated with MathML elements (bug 2009627)
The bug was supposed to be fixed by #20471 but here there are some annotations in the pdf.
When those annotations are added to the DOM, the struct tree has to be rendered but without
the text layer (because of asynchronicity).
So this patch is making sure that the modifications in the text layer are done once the
layer is rendered.
2026-01-13 20:37:52 +01:00
Tim van der Meij
f40ab1a3f8
Merge pull request #20570 from calixteman/no_contents_image_stream
Don't use contents stream which have an image format
2026-01-13 20:27:59 +01:00
Calixte Denizet
b5ed988267
Don't use contents stream which have an image format
The original bug has been filled in mupdf bug tracker:
https://bugs.ghostscript.com/show_bug.cgi?id=709033

The attached pdf can be open in Chrome but not in Acrobat.
2026-01-13 18:39:17 +01:00
Calixte Denizet
a362a24779
Make sure the caret is black in dark mode when in caret browsing mode 2026-01-13 18:10:11 +01:00
Tim van der Meij
a5010f99e7
Merge pull request #20566 from calixteman/update_jbig2
Update jbig2 decoder (pdfium@3c679253a9e17c10be696d345c63636b18b7f925)
2026-01-11 20:23:45 +01:00
calixteman
1f69a3f6af
Update jbig2 decoder (pdfium@3c679253a9e17c10be696d345c63636b18b7f925)
See a40f47cbc4
for details.
2026-01-11 13:39:46 +01:00
calixteman
6f5d5ac6d8
Merge pull request #20552 from calixteman/issue20529
Add some tests for the JBIG2 js decoder
2026-01-09 16:45:09 +01:00
calixteman
1dd6649b7d
Add some tests for the JBIG2 js decoder
It fixes #20529.

The files come from:
https://github.com/SerenityOS/serenity/tree/master/Tests/LibGfx/test-inputs/jbig2/

Thank you to Nico Weber for offering these test files.
2026-01-07 22:05:05 +01:00
calixteman
3532ac39d8
Merge pull request #20551 from calixteman/bug2004951_part2
Don't add an aria-label on MathML elements in the struct tree (bug 2004951)
2026-01-06 22:37:46 +01:00
Calixte Denizet
da463f2da9
Don't add an aria-label on MathML elements in the struct tree (bug 2004951) 2026-01-06 21:38:42 +01:00
Tim van der Meij
91fa05d2e8
Merge pull request #20550 from calixteman/bug2004951_part1
Aria-hide artifacts in the text layer (bug 2004951)
2026-01-06 20:29:25 +01:00
Calixte Denizet
0ef085e23b
Aria-hide artifacts in the text layer (bug 2004951) 2026-01-05 16:57:01 +01:00
Tim van der Meij
a939f12391
Merge pull request #20549 from timvandermeij/talos-revert
Revert "Remove some files from talos tests because they aren't available on webarchive"
2026-01-04 19:50:34 +01:00
Tim van der Meij
adde05b530
Revert "Remove some files from talos tests because they aren't available on webarchive"
This reverts commit fbce8bf829cba78281ea93e845c524725ff2c3ff. The file
is available in the Web Archive again.

Fixes #20528.
2026-01-04 19:29:26 +01:00
Tim van der Meij
54d84799c2
Merge pull request #20548 from calixteman/jbig2wasm_failure
Fix wasm url issue for the jbig2 decoder
2026-01-04 19:14:37 +01:00
calixteman
eab33828a9
Fix wasm url issue for the jbig2 decoder
and add a test for jbig2 decoding with the js decoder.
2026-01-04 00:08:59 +01:00
Tim van der Meij
cb36cbdc13
Merge pull request #20547 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2026-01-03 23:32:02 +01:00
calixteman
cb28250fbe
Merge pull request #20546 from calixteman/jbig2wasm
Use the PDFium JBig2 decoder compiled into wasm
2026-01-03 22:08:12 +01:00
calixteman
98c1955bd4
Use the PDFium JBig2 decoder compiled into wasm
The decoder is ~4x faster than the JS decoder on large images.
2026-01-03 22:05:14 +01:00
Tim van der Meij
5c06beae07
Update translations to the most recent versions 2026-01-03 20:43:08 +01:00
Tim van der Meij
687cd848e0
Upgrade eslint-plugin-perfectionist to version 5.2.0
This is a major version bump, but the changelog at
https://github.com/azat-io/eslint-plugin-perfectionist/releases/v5.0.0
doesn't indicate any breaking changes that should impact us.
2026-01-03 20:42:04 +01:00
Tim van der Meij
13e070a8a3
Upgrade globals to version 17.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/globals/releases/v17.0.0
doesn't indicate any breaking changes that should impact us.
2026-01-03 20:40:39 +01:00
Tim van der Meij
2838e161b8
Update dependencies to the most recent versions 2026-01-03 20:38:22 +01:00
calixteman
eccbcbe5eb
Merge pull request #20515 from calixteman/issue20513_2
Get glyph contours when stroking using a pattern
2025-12-29 11:32:28 +01:00
calixteman
424c7989aa
Get glyph contours when stroking using a pattern
Fix issue #20513 (second part).
2025-12-28 22:55:59 +01:00
Tim van der Meij
430b8a9e90
Merge pull request #20540 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2025-12-28 20:08:27 +01:00
Tim van der Meij
f385fd9783
Bump the stable version in pdfjs.config 2025-12-28 20:05:00 +01:00
Andrii Vitiv
9677798ba0
Fix Worker was terminated error when loading is cancelled
Fixes https://github.com/mozilla/pdf.js/issues/11595, where cancelling loading with `loadingTask.destroy()` before it finishes throws a `Worker was terminated` error that CANNOT be caught.

When worker is terminated, an error is thrown here:

6c746260a9/src/core/worker.js (L374)

Then `onFailure` runs, in which we throw again via `ensureNotTerminated()`. However, this second error is never caught (and cannot be), resulting in console spam.

There is no need to throw any additional errors since the termination is already reported [here](6c746260a9/src/core/worker.js (L371-L373)), and `onFailure` is supposed to handle errors, not throw them.
2025-12-14 18:15:10 +02:00
837 changed files with 670052 additions and 24122 deletions

View File

@ -8,8 +8,6 @@ The issue tracking system is designed to record a single technical problem. A bu
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem. If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.
Note that the translations for PDF.js in the `l10n` folder are imported from the Nightly channel of Mozilla Firefox, such that we don't have to maintain them ourselves. This means that we will not accept pull requests that add new languages and/or modify existing translations, unless the corresponding changes have been made in Mozilla Firefox first.
See also: See also:
- https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions - https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions
- https://github.com/mozilla/pdf.js/wiki/Contributing - https://github.com/mozilla/pdf.js/wiki/Contributing

View File

@ -6,3 +6,5 @@ updates:
interval: "weekly" interval: "weekly"
labels: labels:
- "dependencies" - "dependencies"
cooldown:
default-days: 7

1
.github/font_tests_requirements.txt vendored Normal file
View File

@ -0,0 +1 @@
fonttools==4.*

View File

@ -7,28 +7,59 @@ jobs:
test: test:
name: Test name: Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: code-coverage
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node-version: [20, 22, 24, 25] node-version: [22, 24, 26]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run external tests - name: Run external tests
run: npx gulp externaltest run: npx gulp externaltest
- name: Run CLI unit tests - name: Run CLI unit tests with code coverage
run: npx gulp unittestcli run: npx gulp unittestcli --coverage --coverage-output build/coverage/unitcli
- name: Save cached PDF files
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/unitcli/lcov.info
flags: unittestcli
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -18,18 +18,19 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v4 uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
queries: security-and-quality queries: security-and-quality
- name: Autobuild CodeQL - name: Autobuild CodeQL
uses: github/codeql-action/autobuild@v4 uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
- name: Perform CodeQL analysis - name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4 uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2

View File

@ -0,0 +1,99 @@
name: Coverage (Browser tests)
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/images/**'
- 'test/pdfs/**'
- 'test/resources/**'
- 'test/*.css'
- 'test/driver.js'
- 'test/test.mjs'
- 'test/test_manifest.json'
- 'test/test_slave.html'
- 'web/**'
- '.github/workflows/coverage_browser_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/images/**'
- 'test/pdfs/**'
- 'test/resources/**'
- 'test/*.css'
- 'test/driver.js'
- 'test/test.mjs'
- 'test/test_manifest.json'
- 'test/test_slave.html'
- 'web/**'
- '.github/workflows/coverage_browser_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / firefox
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run browser tests with code coverage
run: npx gulp botbrowsertest --headless -j$(nproc) --coverage --coverage-output build/coverage/browser --noChrome
- name: Save cached PDF files
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/browser/lcov.info
flags: browsertest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -25,18 +25,19 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Use Python 3.14 - name: Use Python 3.14
uses: actions/setup-python@v6 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with: with:
python-version: '3.14' python-version: '3.14'
cache: 'pip' cache: 'pip'
cache-dependency-path: '.github/fluent_linter_requirements.txt'
- name: Install Fluent dependencies - name: Install requirements
run: | run: pip install -r .github/fluent_linter_requirements.txt
pip install -r .github/requirements.txt
- name: Lint Fluent reference files - name: Lint Fluent reference files
run: | run: moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml
moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml

View File

@ -3,6 +3,7 @@ on:
push: push:
paths: paths:
- 'gulpfile.mjs' - 'gulpfile.mjs'
- 'external/**'
- 'src/**' - 'src/**'
- 'test/test.mjs' - 'test/test.mjs'
- 'test/font/**' - 'test/font/**'
@ -12,6 +13,7 @@ on:
pull_request: pull_request:
paths: paths:
- 'gulpfile.mjs' - 'gulpfile.mjs'
- 'external/**'
- 'src/**' - 'src/**'
- 'test/test.mjs' - 'test/test.mjs'
- 'test/font/**' - 'test/font/**'
@ -24,38 +26,60 @@ permissions:
jobs: jobs:
test: test:
name: Test name: ${{ matrix.os }} / ${{ matrix.browser }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node-version: [lts/*] node-version: [lts/*]
os: [windows-latest, ubuntu-latest] os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: code-coverage
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Use Python 3.14 - name: Use Python 3.14
uses: actions/setup-python@v6 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.0.2
with: with:
python-version: '3.14' python-version: '3.14'
cache: 'pip' cache: 'pip'
cache-dependency-path: '.github/font_tests_requirements.txt'
- name: Install Fonttools - name: Install requirements
run: pip install fonttools run: pip install -r .github/font_tests_requirements.txt
- name: Run font tests - name: Run font tests with code coverage
run: npx gulp fonttest --headless run: npx gulp fonttest --headless --coverage --coverage-output build/coverage/font ${{ matrix.skip }}
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/font/lcov.info
flags: fonttest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

106
.github/workflows/integration_tests.yml vendored Normal file
View File

@ -0,0 +1,106 @@
name: Integration tests
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/test.mjs'
- 'test/integration/**'
- 'web/**'
- '.github/workflows/integration_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/test.mjs'
- 'test/integration/**'
- 'web/**'
- '.github/workflows/integration_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.browser }}
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
# Note that the integration tests can't run in headless mode until bug
# 1878643 (tracked in #20918), and possibly others, have been fixed
# upstream, so we can't run with the `--headless` flag and thus have to
# configure a standard resolution for the headful browser windows.
- name: Update resolution (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Run integration tests with code coverage (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: npx gulp integrationtest --coverage --coverage-output build/coverage/integration ${{ matrix.skip }}
- name: Run integration tests with code coverage (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run -a --server-args="-screen 0, 1920x1080x24" npx gulp integrationtest --coverage --coverage-output build/coverage/integration ${{ matrix.skip }}
- name: Save cached PDF files
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/integration/lcov.info
flags: integrationtest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

View File

@ -15,14 +15,16 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@ -30,8 +32,5 @@ jobs:
- name: Run lint - name: Run lint
run: npx gulp lint run: npx gulp lint
- name: Run lint-chromium
run: npx gulp lint-chromium
- name: Run lint-mozcentral - name: Run lint-mozcentral
run: npx gulp lint-mozcentral run: npx gulp lint-mozcentral

77
.github/workflows/notify-pdf-sync.yml vendored Normal file
View File

@ -0,0 +1,77 @@
name: Notify PDF sync
on:
push:
branches: [master]
paths:
- "test/pdfs/*.pdf"
- "test/pdfs/*.pdf.link"
permissions:
contents: read
jobs:
notify:
runs-on: ubuntu-latest
environment: sync_pdfs
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 1
persist-credentials: false
- name: Check for added PDF files
id: check
run: |
git fetch --no-tags --depth=1 origin ${{ github.event.before }}
mapfile -t added < <(
git diff --diff-filter=A --name-only \
${{ github.event.before }} \
${{ github.sha }} \
-- \
':(glob)test/pdfs/*.pdf' \
':(glob)test/pdfs/*.pdf.link'
)
if [ "${#added[@]}" -gt 0 ]; then
echo "has_added=true" >> "$GITHUB_OUTPUT"
printf 'files_json=%s\n' "$(printf '%s\n' "${added[@]}" | jq -Rsc 'split("\n")[:-1]')" >> "$GITHUB_OUTPUT"
else
echo "has_added=false" >> "$GITHUB_OUTPUT"
echo 'files_json=[]' >> "$GITHUB_OUTPUT"
fi
- name: Generate app token
if: steps.check.outputs.has_added == 'true'
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: mozilla
repositories: pdf.js.pdfs
- name: Trigger sync
if: steps.check.outputs.has_added == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
FILES_JSON: ${{ steps.check.outputs.files_json }}
run: |
payload=$(jq -nc \
--arg before "${{ github.event.before }}" \
--arg after "${{ github.sha }}" \
--argjson files "$FILES_JSON" \
'{
event_type: "pdf-added",
client_payload: {
before: $before,
after: $after,
files: $files
}
}')
gh api repos/mozilla/pdf.js.pdfs/dispatches \
--method POST \
--input - <<< "$payload"

33
.github/workflows/prefs_tests.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Prefs tests
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run prefs tests
run: npx gulp prefstest

View File

@ -17,14 +17,16 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install dependencies - name: Install dependencies

View File

@ -17,14 +17,16 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@ -49,7 +51,7 @@ jobs:
INPUT_PATH: build/gh-pages INPUT_PATH: build/gh-pages
- name: Upload the website - name: Upload the website
uses: actions/upload-artifact@v6 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with: with:
name: github-pages name: github-pages
path: ${{ runner.temp }}/website.tar path: ${{ runner.temp }}/website.tar
@ -66,4 +68,4 @@ jobs:
steps: steps:
- name: Deploy the website - name: Deploy the website
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0

View File

@ -15,14 +15,16 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci

93
.github/workflows/unit_tests.yml vendored Normal file
View File

@ -0,0 +1,93 @@
name: Unit tests
on:
push:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/test.mjs'
- 'test/unit/**'
- 'web/**'
- '.github/workflows/unit_tests.yml'
branches:
- master
pull_request:
paths:
- 'gulpfile.mjs'
- 'external/**'
- 'src/**'
- 'test/test.mjs'
- 'test/unit/**'
- 'web/**'
- '.github/workflows/unit_tests.yml'
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.browser }}
strategy:
fail-fast: false
matrix:
node-version: [lts/*]
os: [windows-latest, ubuntu-latest]
browser: [firefox, chrome]
include:
- browser: firefox
skip: --noChrome
- browser: chrome
skip: --noFirefox
runs-on: ${{ matrix.os }}
environment: code-coverage
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore cached PDF files
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
restore-keys: |
cached-pdf-files-
enableCrossOsArchive: true
- name: Run unit tests with code coverage
run: npx gulp unittest --headless --coverage --coverage-output build/coverage/unit ${{ matrix.skip }}
- name: Save cached PDF files
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: test/pdfs/*.pdf
key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }}
enableCrossOsArchive: true
- name: Upload results to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/coverage/unit/lcov.info
flags: unittest
name: codecov-umbrella
disable_search: true
disable_telem: true
verbose: true

61
.github/workflows/update_locales.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Update locales
on:
schedule:
- cron: "0 0 * * 5" # Every Friday at midnight UTC
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
jobs:
update-locales:
name: Update locales
runs-on: ubuntu-latest
environment: sync_l10n
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
- name: Use Node.js LTS
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Import translations from mozilla-central
run: npx gulp importl10n
- name: Create Pull Request
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
if [ -z "$(git status --porcelain l10n/)" ]; then
echo "No locale changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}"
git switch -C update-locales
git add l10n/
git commit -m "l10n: Update locale files"
git push --force origin update-locales
gh pr create \
--title "l10n: Update locale files" \
--body "Automated weekly update of locale files from mozilla-central." \
--label l10n || true

9
.mcp.json Normal file
View File

@ -0,0 +1,9 @@
{
"mcpServers": {
"firefox-devtools": {
"type": "stdio",
"command": "npx",
"args": ["@padenot/firefox-devtools-mcp"]
}
}
}

View File

@ -13,3 +13,6 @@ test/tmp/
test/pdfs/ test/pdfs/
web/locale/ web/locale/
*~/ *~/
.claude/
.codex/
.cursor/

View File

@ -1,9 +0,0 @@
{
"chrome": {
"skipDownload": false
},
"firefox": {
"skipDownload": false,
"version": "nightly"
}
}

13
.puppeteerrc.json Normal file
View File

@ -0,0 +1,13 @@
{
"chrome": {
"skipDownload": true,
"version": "stable"
},
"chrome-headless-shell": {
"skipDownload": true
},
"firefox": {
"skipDownload": true,
"version": "nightly"
}
}

View File

@ -13,9 +13,6 @@
"color-no-invalid-hex": true, "color-no-invalid-hex": true,
"declaration-block-no-duplicate-properties": true, "declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": true, "declaration-block-no-redundant-longhand-properties": true,
"declaration-property-value-disallowed-list": {
"float": ["inline-start", "inline-end"]
},
"length-zero-no-unit": [true, { "length-zero-no-unit": [true, {
"ignore": ["custom-properties"] "ignore": ["custom-properties"]
}], }],

View File

@ -1,4 +1,4 @@
# PDF.js [![CI](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml/badge.svg?query=branch%3Amaster)](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml?query=branch%3Amaster) # PDF.js [![CI](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml/badge.svg?query=branch%3Amaster)](https://github.com/mozilla/pdf.js/actions/workflows/ci.yml?query=branch%3Amaster) [![codecov](https://codecov.io/gh/mozilla/pdf.js/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/pdf.js)
[PDF.js](https://mozilla.github.io/pdf.js/) is a Portable Document Format (PDF) viewer that is built with HTML5. [PDF.js](https://mozilla.github.io/pdf.js/) is a Portable Document Format (PDF) viewer that is built with HTML5.
@ -44,6 +44,10 @@ PDF.js is built into version 19+ of Firefox.
Chrome, go to `Tools > Extension` and load the (unpackaged) extension from the Chrome, go to `Tools > Extension` and load the (unpackaged) extension from the
directory `build/chromium`. directory `build/chromium`.
### PDF debugger
Browse the internal structure of a PDF document with https://mozilla.github.io/pdf.js/internal-viewer/web/debugger.html
## Getting the Code ## Getting the Code
To get a local copy of the current code, clone it using git: To get a local copy of the current code, clone it using git:
@ -87,6 +91,71 @@ This will generate `pdf.js` and `pdf.worker.js` in the `build/generic/build/` di
Both scripts are needed but only `pdf.js` needs to be included since `pdf.worker.js` will Both scripts are needed but only `pdf.js` needs to be included since `pdf.worker.js` will
be loaded by `pdf.js`. The PDF.js files are large and should be minified for production. be loaded by `pdf.js`. The PDF.js files are large and should be minified for production.
## Code coverage
We track how much of the code is exercised by the test suite on
[Codecov](https://codecov.io/gh/mozilla/pdf.js) (see the badge at the top of this
file).
### How it is collected
When coverage is enabled, the build instruments the bundled code with
[`babel-plugin-istanbul`](https://github.com/istanbuljs/babel-plugin-istanbul),
which adds counters that record every line, branch and function that runs:
+ For browser-based tests (unit, integration and reference tests) the
instrumented code runs in the browser, fills a global `window.__coverage__`
object, and the test runner collects it from each browser session, merges the
results, and writes the report.
+ For the Node-based unit tests (`unittestcli`) the raw data is written to
`build/tmp/unittestcli-coverage.json` and turned into a report afterwards.
### Collecting coverage locally
Add the `--coverage` flag to any of the test tasks, for example:
$ npx gulp unittest --coverage # browser unit tests
$ npx gulp unittestcli --coverage # Node unit tests
$ npx gulp integrationtest --coverage # Puppeteer integration tests
$ npx gulp botbrowsertest --coverage # reference tests
The following options control the output:
| Option | Description | Default |
| --- | --- | --- |
| `--coverage` | Enable coverage collection. | off |
| `--coverage-output <dir>` | Directory where the report is written. | `build/coverage` |
| `--coverage-formats <list>` | Comma-separated list of formats: `info`, `html`, `json`, `text`, `cobertura`, `clover`. | `info` |
| `--coverage-per-test` | Also build a per-test index (see below). | off |
By default the report is written to `build/coverage` in the `info` format, i.e.
an [LCOV](https://github.com/linux-test-project/lcov) `lcov.info` file (the same
format that is uploaded to Codecov). Use `--coverage-formats html` to get a
browsable HTML report instead, or pass several formats at once, e.g.
`--coverage-formats info,html`.
### Finding which tests cover a given line
Run a browser test task with `--coverage-per-test` to build an index
(`per-test-index.json`) in the coverage directory, then query it to list the
tests that exercised a specific source line or function:
$ npx gulp botbrowsertest --coverage-per-test
$ npx gulp coverage_search --code="canvas.js::205"
$ npx gulp coverage_search --code="canvas.js::drawImageAtIntegerCoords"
### Continuous integration
On every push and pull request three GitHub Actions workflows collect coverage
and upload it to Codecov, each tagged with its own Codecov *flag* so the test
types can be told apart:
| Workflow | Task | Codecov flag |
| --- | --- | --- |
| `unit_tests.yml` | `unittest` | `unittest` |
| `integration_tests.yml` | `integrationtest` | `integrationtest` |
| `coverage_browser_tests.yml` | `botbrowsertest` | `browsertest` |
## Using PDF.js in a web application ## Using PDF.js in a web application
To use PDF.js in a web application you can choose to use a pre-built version of the library To use PDF.js in a web application you can choose to use a pre-built version of the library

3
codecov.yml Normal file
View File

@ -0,0 +1,3 @@
flag_management:
default_rules:
carryforward: true

View File

@ -18,13 +18,13 @@ This tutorial shows how PDF.js can be used as a library in a web browser.
The object structure of PDF.js loosely follows the structure of an actual PDF. At the top level there is a document object. From the document, more information and individual pages can be fetched. To get the document: The object structure of PDF.js loosely follows the structure of an actual PDF. At the top level there is a document object. From the document, more information and individual pages can be fetched. To get the document:
```js ```js
pdfjsLib.getDocument('helloworld.pdf') pdfjsLib.getDocument({ url: "helloworld.pdf" })
``` ```
Remember though that PDF.js uses promises, and the above will return a `PDFDocumentLoadingTask` instance that has a `promise` property which is resolved with the document object. Remember though that PDF.js uses promises, and the above will return a `PDFDocumentLoadingTask` instance that has a `promise` property which is resolved with the document object.
```js ```js
var loadingTask = pdfjsLib.getDocument('helloworld.pdf'); var loadingTask = pdfjsLib.getDocument({ url: "helloworld.pdf" });
loadingTask.promise.then(function(pdf) { loadingTask.promise.then(function(pdf) {
// you can now use *pdf* here // you can now use *pdf* here
}); });
@ -48,8 +48,8 @@ var viewport = page.getViewport({ scale: scale, });
// Support HiDPI-screens. // Support HiDPI-screens.
var outputScale = window.devicePixelRatio || 1; var outputScale = window.devicePixelRatio || 1;
var canvas = document.getElementById('the-canvas'); var canvas = document.getElementById("the-canvas");
var context = canvas.getContext('2d'); var context = canvas.getContext("2d");
canvas.width = Math.floor(viewport.width * outputScale); canvas.width = Math.floor(viewport.width * outputScale);
canvas.height = Math.floor(viewport.height * outputScale); canvas.height = Math.floor(viewport.height * outputScale);

View File

@ -1,11 +1,13 @@
import globals from "globals"; import globals from "globals";
import import_ from "eslint-plugin-import"; import import_ from "eslint-plugin-import-x";
import jasmine from "eslint-plugin-jasmine"; import jasmine from "eslint-plugin-jasmine";
import json from "eslint-plugin-json"; import json from "@eslint/json";
import noUnsanitized from "eslint-plugin-no-unsanitized"; import noUnsanitized from "eslint-plugin-no-unsanitized";
import perfectionist from "eslint-plugin-perfectionist"; import perfectionist from "eslint-plugin-perfectionist";
import preferMathClamp from "./external/eslint_plugins/prefer-math-clamp.mjs";
import prettierRecommended from "eslint-plugin-prettier/recommended"; import prettierRecommended from "eslint-plugin-prettier/recommended";
import regexpPlugin from "eslint-plugin-regexp";
import unicorn from "eslint-plugin-unicorn"; import unicorn from "eslint-plugin-unicorn";
const jsFiles = folder => { const jsFiles = folder => {
@ -26,15 +28,18 @@ const chromiumExtensionServiceWorkerFiles = [
export default [ export default [
{ {
ignores: [ ignores: [
"package-lock.json",
"**/build/", "**/build/",
"**/l10n/", "**/l10n/",
"**/docs/", "**/docs/",
"**/node_modules/", "**/node_modules/",
"external/bcmaps/", "external/bcmaps/",
"external/brotli/",
"external/builder/fixtures/", "external/builder/fixtures/",
"external/builder/fixtures_babel/", "external/builder/fixtures_babel/",
"external/openjpeg/", "external/openjpeg/",
"external/qcms/", "external/qcms/",
"external/jbig2/",
"external/quickjs/", "external/quickjs/",
"test/stats/results/", "test/stats/results/",
"test/tmp/", "test/tmp/",
@ -42,6 +47,7 @@ export default [
"web/locale/", "web/locale/",
"web/wasm/", "web/wasm/",
"**/*~/", "**/*~/",
".{claude,codex,cursor}/",
], ],
}, },
@ -51,7 +57,16 @@ export default [
prettierRecommended, prettierRecommended,
{ {
files: ["**/*.json"], files: jsFiles("."),
plugins: regexpPlugin.configs["flat/recommended"].plugins,
rules: {
...regexpPlugin.configs["flat/recommended"].rules,
"regexp/no-legacy-features": "off",
},
},
{
files: ["**/*.json", "**/.*.json"],
language: "json/json",
...json.configs.recommended, ...json.configs.recommended,
}, },
{ {
@ -65,18 +80,24 @@ export default [
files: jsFiles("."), files: jsFiles("."),
plugins: { plugins: {
import: import_.flatConfigs.recommended.plugins.import, import: import_.flatConfigs.recommended.plugins["import-x"],
json, json,
"no-unsanitized": noUnsanitized, "no-unsanitized": noUnsanitized,
perfectionist, perfectionist,
"prefer-math-clamp": preferMathClamp,
unicorn, unicorn,
}, },
settings: {
"import-x/resolver-next": [import_.createNodeResolver()],
},
languageOptions: { languageOptions: {
globals: { globals: {
...globals.worker, ...globals.worker,
PDFJSDev: "readonly", PDFJSDev: "readonly",
__raw_import__: "readonly", __raw_import__: "readonly",
__eager_import__: "readonly",
}, },
ecmaVersion: 2025, ecmaVersion: 2025,
@ -114,8 +135,13 @@ export default [
"pdfjs-lib", "pdfjs-lib",
"pdfjs-web", "pdfjs-web",
"web", "web",
"@csstools/postcss-light-dark-function",
"fluent-bundle", "fluent-bundle",
"fluent-dom", "fluent-dom",
"postcss-dir-pseudo-class",
"postcss-nesting",
"postcss-values-parser",
"stylelint",
// See https://github.com/firebase/firebase-admin-node/discussions/1359. // See https://github.com/firebase/firebase-admin-node/discussions/1359.
"eslint-plugin-perfectionist", "eslint-plugin-perfectionist",
], ],
@ -136,6 +162,7 @@ export default [
"unicorn/no-unnecessary-array-flat-depth": "error", "unicorn/no-unnecessary-array-flat-depth": "error",
"unicorn/no-unnecessary-array-splice-count": "error", "unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-unnecessary-slice-end": "error", "unicorn/no-unnecessary-slice-end": "error",
"unicorn/no-useless-collection-argument": "error",
"unicorn/no-useless-promise-resolve-reject": "error", "unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-spread": "error", "unicorn/no-useless-spread": "error",
"unicorn/prefer-array-find": "error", "unicorn/prefer-array-find": "error",
@ -144,6 +171,8 @@ export default [
"unicorn/prefer-array-index-of": "error", "unicorn/prefer-array-index-of": "error",
"unicorn/prefer-array-some": "error", "unicorn/prefer-array-some": "error",
"unicorn/prefer-at": "error", "unicorn/prefer-at": "error",
"unicorn/prefer-class-fields": "error",
"unicorn/prefer-classlist-toggle": "error",
"unicorn/prefer-date-now": "error", "unicorn/prefer-date-now": "error",
"unicorn/prefer-dom-node-append": "error", "unicorn/prefer-dom-node-append": "error",
"unicorn/prefer-dom-node-remove": "error", "unicorn/prefer-dom-node-remove": "error",
@ -161,6 +190,8 @@ export default [
"unicorn/prefer-ternary": ["error", "only-single-line"], "unicorn/prefer-ternary": ["error", "only-single-line"],
"unicorn/throw-new-error": "error", "unicorn/throw-new-error": "error",
"prefer-math-clamp/prefer-math-clamp": "error",
// Possible errors // Possible errors
"for-direction": "error", "for-direction": "error",
"getter-return": "error", "getter-return": "error",
@ -244,8 +275,10 @@ export default [
"no-useless-concat": "error", "no-useless-concat": "error",
"no-useless-escape": "error", "no-useless-escape": "error",
"no-useless-return": "error", "no-useless-return": "error",
"prefer-object-has-own": "error",
"prefer-promise-reject-errors": "error", "prefer-promise-reject-errors": "error",
"prefer-spread": "error", "prefer-spread": "error",
radix: "error",
"wrap-iife": ["error", "any"], "wrap-iife": ["error", "any"],
yoda: ["error", "never", { exceptRange: true }], yoda: ["error", "never", { exceptRange: true }],
@ -280,6 +313,11 @@ export default [
"BinaryExpression[operator='instanceof'][right.name='Object']", "BinaryExpression[operator='instanceof'][right.name='Object']",
message: "Use `typeof` rather than `instanceof Object`.", message: "Use `typeof` rather than `instanceof Object`.",
}, },
{
selector: "MemberExpression[property.name='hasOwnProperty']",
message:
"Use `Object.hasOwn` rather than `Object.prototype.hasOwnProperty`.",
},
{ {
selector: "CallExpression[callee.name='assert'][arguments.length!=2]", selector: "CallExpression[callee.name='assert'][arguments.length!=2]",
message: "`assert()` must always be invoked with two arguments.", message: "`assert()` must always be invoked with two arguments.",

View File

@ -40,6 +40,8 @@ const SANDBOX_BUNDLE_SRC = new URL(
window.location window.location
); );
const WASM_URL = "../../node_modules/pdfjs-dist/build/wasm/";
const container = document.getElementById("viewerContainer"); const container = document.getElementById("viewerContainer");
const eventBus = new pdfjsViewer.EventBus(); const eventBus = new pdfjsViewer.EventBus();
@ -59,6 +61,7 @@ const pdfFindController = new pdfjsViewer.PDFFindController({
const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({ const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({
eventBus, eventBus,
sandboxBundleSrc: SANDBOX_BUNDLE_SRC, sandboxBundleSrc: SANDBOX_BUNDLE_SRC,
wasmUrl: WASM_URL,
}); });
const pdfViewer = new pdfjsViewer.PDFViewer({ const pdfViewer = new pdfjsViewer.PDFViewer({

View File

@ -40,6 +40,8 @@ const SANDBOX_BUNDLE_SRC = new URL(
window.location window.location
); );
const WASM_URL = "../../node_modules/pdfjs-dist/build/wasm/";
const container = document.getElementById("viewerContainer"); const container = document.getElementById("viewerContainer");
const eventBus = new pdfjsViewer.EventBus(); const eventBus = new pdfjsViewer.EventBus();
@ -59,6 +61,7 @@ const pdfFindController = new pdfjsViewer.PDFFindController({
const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({ const pdfScriptingManager = new pdfjsViewer.PDFScriptingManager({
eventBus, eventBus,
sandboxBundleSrc: SANDBOX_BUNDLE_SRC, sandboxBundleSrc: SANDBOX_BUNDLE_SRC,
wasmUrl: WASM_URL,
}); });
const pdfSinglePageViewer = new pdfjsViewer.PDFSinglePageViewer({ const pdfSinglePageViewer = new pdfjsViewer.PDFSinglePageViewer({

View File

@ -29,7 +29,7 @@ const response = await fetch(JPEG_IMAGE);
if (!response.ok) { if (!response.ok) {
throw new Error(response.statusText); throw new Error(response.statusText);
} }
const typedArrayImage = new Uint8Array(await response.arrayBuffer()); const typedArrayImage = await response.bytes();
// Parse the image data using `JpegImage`. // Parse the image data using `JpegImage`.
// //

View File

@ -26,7 +26,7 @@
// //
// Asynchronous download PDF // Asynchronous download PDF
// //
const loadingTask = pdfjsLib.getDocument(url); const loadingTask = pdfjsLib.getDocument({ url });
const pdf = await loadingTask.promise; const pdf = await loadingTask.promise;
// //
// Fetch the first page // Fetch the first page

View File

@ -123,7 +123,7 @@
/** /**
* Asynchronously downloads PDF. * Asynchronously downloads PDF.
*/ */
var loadingTask = pdfjsLib.getDocument(url); var loadingTask = pdfjsLib.getDocument({ url });
pdfDoc = await loadingTask.promise; pdfDoc = await loadingTask.promise;
document.getElementById("page_count").textContent = pdfDoc.numPages; document.getElementById("page_count").textContent = pdfDoc.numPages;

View File

@ -46,19 +46,13 @@ const PDFViewerApplication = {
* @returns {Promise} - Returns the promise, which is resolved when document * @returns {Promise} - Returns the promise, which is resolved when document
* is opened. * is opened.
*/ */
open(params) { async open(params) {
if (this.pdfLoadingTask) { if (this.pdfLoadingTask) {
// We need to destroy already opened document // We need to destroy already opened document.
return this.close().then( await this.close();
function () {
// ... and repeat the open() call.
return this.open(params);
}.bind(this)
);
} }
const url = params.url; const { url } = params;
const self = this;
this.setTitleUsingUrl(url); this.setTitleUsingUrl(url);
// Loading document. // Loading document.
@ -70,24 +64,22 @@ const PDFViewerApplication = {
}); });
this.pdfLoadingTask = loadingTask; this.pdfLoadingTask = loadingTask;
loadingTask.onProgress = function (progressData) { loadingTask.onProgress = evt => this.progress(evt.percent);
self.progress(progressData.loaded / progressData.total);
};
return loadingTask.promise.then( return loadingTask.promise.then(
function (pdfDocument) { pdfDocument => {
// Document loaded, specifying document for the viewer. // Document loaded, specifying document for the viewer.
self.pdfDocument = pdfDocument; this.pdfDocument = pdfDocument;
self.pdfViewer.setDocument(pdfDocument); this.pdfViewer.setDocument(pdfDocument);
self.pdfLinkService.setDocument(pdfDocument); this.pdfLinkService.setDocument(pdfDocument);
self.pdfHistory.initialize({ this.pdfHistory.initialize({
fingerprint: pdfDocument.fingerprints[0], fingerprint: pdfDocument.fingerprints[0],
}); });
self.loadingBar.hide(); this.loadingBar.hide();
self.setTitleUsingMetadata(pdfDocument); this.setTitleUsingMetadata(pdfDocument);
}, },
function (reason) { reason => {
let key = "pdfjs-loading-error"; let key = "pdfjs-loading-error";
if (reason instanceof pdfjsLib.InvalidPDFException) { if (reason instanceof pdfjsLib.InvalidPDFException) {
key = "pdfjs-invalid-file-error"; key = "pdfjs-invalid-file-error";
@ -96,10 +88,10 @@ const PDFViewerApplication = {
? "pdfjs-missing-file-error" ? "pdfjs-missing-file-error"
: "pdfjs-unexpected-response-error"; : "pdfjs-unexpected-response-error";
} }
self.l10n.get(key).then(msg => { this.l10n.get(key).then(msg => {
self.error(msg, { message: reason?.message }); this.error(msg, { message: reason.message });
}); });
self.loadingBar.hide(); this.loadingBar.hide();
} }
); );
}, },
@ -109,9 +101,9 @@ const PDFViewerApplication = {
* @returns {Promise} - Returns the promise, which is resolved when all * @returns {Promise} - Returns the promise, which is resolved when all
* destruction is completed. * destruction is completed.
*/ */
close() { async close() {
if (!this.pdfLoadingTask) { if (!this.pdfLoadingTask) {
return Promise.resolve(); return;
} }
const promise = this.pdfLoadingTask.destroy(); const promise = this.pdfLoadingTask.destroy();
@ -128,7 +120,7 @@ const PDFViewerApplication = {
} }
} }
return promise; await promise;
}, },
get loadingBar() { get loadingBar() {
@ -152,32 +144,21 @@ const PDFViewerApplication = {
this.setTitle(title); this.setTitle(title);
}, },
setTitleUsingMetadata(pdfDocument) { async setTitleUsingMetadata(pdfDocument) {
const self = this; const { info, metadata } = await pdfDocument.getMetadata();
pdfDocument.getMetadata().then(function (data) { this.documentInfo = info;
const info = data.info, this.metadata = metadata;
metadata = data.metadata;
self.documentInfo = info;
self.metadata = metadata;
// Provides some basic debug information // Provides some basic debug information
console.log( console.log(
"PDF " + `PDF ${pdfDocument.fingerprints[0]} [${info.PDFFormatVersion} ` +
pdfDocument.fingerprints[0] + `${(metadata?.get("pdf:producer") || info.Producer || "-").trim()} / ` +
" [" + `${(metadata?.get("xmp:creatortool") || info.Creator || "-").trim()}` +
info.PDFFormatVersion + `] (PDF.js: ${pdfjsLib.version || "?"} [${pdfjsLib.build || "?"}])`
" " +
(info.Producer || "-").trim() +
" / " +
(info.Creator || "-").trim() +
"]" +
" (PDF.js: " +
(pdfjsLib.version || "-") +
")"
); );
let pdfTitle; let pdfTitle;
if (metadata && metadata.has("dc:title")) { if (metadata?.has("dc:title")) {
const title = metadata.get("dc:title"); const title = metadata.get("dc:title");
// Ghostscript sometimes returns 'Untitled', so prevent setting the // Ghostscript sometimes returns 'Untitled', so prevent setting the
// title to 'Untitled. // title to 'Untitled.
@ -185,15 +166,11 @@ const PDFViewerApplication = {
pdfTitle = title; pdfTitle = title;
} }
} }
pdfTitle ||= info?.Title;
if (!pdfTitle && info && info.Title) {
pdfTitle = info.Title;
}
if (pdfTitle) { if (pdfTitle) {
self.setTitle(pdfTitle + " - " + document.title); this.setTitle(pdfTitle + " - " + document.title);
} }
});
}, },
setTitle: function pdfViewSetTitle(title) { setTitle: function pdfViewSetTitle(title) {
@ -223,8 +200,7 @@ const PDFViewerApplication = {
console.error(`${message}\n\n${moreInfoText.join("\n")}`); console.error(`${message}\n\n${moreInfoText.join("\n")}`);
}, },
progress: function pdfViewProgress(level) { progress(percent) {
const percent = Math.round(level * 100);
// Updating the bar if value increases. // Updating the bar if value increases.
if (percent > this.loadingBar.percent || isNaN(percent)) { if (percent > this.loadingBar.percent || isNaN(percent)) {
this.loadingBar.percent = percent; this.loadingBar.percent = percent;

View File

@ -14,7 +14,7 @@ const pdfPath =
// Will be using promises to load document, pages and misc data instead of // Will be using promises to load document, pages and misc data instead of
// callback. // callback.
const loadingTask = getDocument(pdfPath); const loadingTask = getDocument({ url: pdfPath });
loadingTask.promise loadingTask.promise
.then(function (doc) { .then(function (doc) {
const numPages = doc.numPages; const numPages = doc.numPages;

View File

@ -45,7 +45,7 @@ function watchObjectOrEmbed(elem) {
// <embed src> <object data> // <embed src> <object data>
var srcAttribute = "src" in elem ? "src" : "data"; var srcAttribute = "src" in elem ? "src" : "data";
var path = elem[srcAttribute]; var path = elem[srcAttribute];
if (!mimeType && !/\.pdf($|[?#])/i.test(path)) { if (!mimeType && !/\.pdf(?:$|[?#])/i.test(path)) {
return; return;
} }

View File

@ -168,7 +168,7 @@ function renderEnumPref(shortDescription, prefName) {
var select = wrapper.querySelector("select"); var select = wrapper.querySelector("select");
select.onchange = function () { select.onchange = function () {
var pref = {}; var pref = {};
pref[prefName] = parseInt(this.value); pref[prefName] = parseInt(this.value, 10);
storageArea.set(pref); storageArea.set(pref);
}; };
wrapper.querySelector("span").textContent = shortDescription; wrapper.querySelector("span").textContent = shortDescription;

View File

@ -1,252 +0,0 @@
{
"type": "object",
"properties": {
"viewerCssTheme": {
"title": "Theme",
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
"type": "integer",
"enum": [0, 1, 2],
"default": 2
},
"showPreviousViewOnLoad": {
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
"type": "boolean",
"default": true
},
"viewOnLoad": {
"title": "View position on load",
"description": "The position in the document upon load.\n -1 = Default (uses OpenAction if available, otherwise equal to `viewOnLoad = 0`).\n 0 = The last viewed page/position.\n 1 = The initial page/position.",
"type": "integer",
"enum": [-1, 0, 1],
"default": 0
},
"defaultZoomDelay": {
"title": "Default zoom delay",
"description": "Delay (in ms) to wait before redrawing the canvas.",
"type": "integer",
"default": 400
},
"defaultZoomValue": {
"title": "Default zoom level",
"description": "Default zoom level of the viewer. Accepted values: 'auto', 'page-actual', 'page-width', 'page-height', 'page-fit', or a zoom level in percents.",
"type": "string",
"pattern": "|auto|page-actual|page-width|page-height|page-fit|[0-9]+\\.?[0-9]*(,[0-9]+\\.?[0-9]*){0,2}",
"default": ""
},
"sidebarViewOnLoad": {
"title": "Sidebar state on load",
"description": "Controls the state of the sidebar upon load.\n -1 = Default (uses PageMode if available, otherwise the last position if available/enabled).\n 0 = Do not show sidebar.\n 1 = Show thumbnails in sidebar.\n 2 = Show document outline in sidebar.\n 3 = Show attachments in sidebar.",
"type": "integer",
"enum": [-1, 0, 1, 2, 3],
"default": -1
},
"enableHandToolOnLoad": {
"description": "DEPRECATED. Set cursorToolOnLoad to 1 to enable the hand tool by default.",
"type": "boolean",
"default": false
},
"enableHWA": {
"title": "Enable hardware acceleration",
"description": "Whether to enable hardware acceleration.",
"type": "boolean",
"default": true
},
"enableAltText": {
"type": "boolean",
"default": false
},
"enableGuessAltText": {
"type": "boolean",
"default": true
},
"enableAltTextModelDownload": {
"type": "boolean",
"default": true
},
"enableNewAltTextWhenAddingImage": {
"type": "boolean",
"default": true
},
"altTextLearnMoreUrl": {
"type": "string",
"default": ""
},
"commentLearnMoreUrl": {
"type": "string",
"default": ""
},
"enableSignatureEditor": {
"type": "boolean",
"default": false
},
"enableUpdatedAddImage": {
"type": "boolean",
"default": false
},
"cursorToolOnLoad": {
"title": "Cursor tool on load",
"description": "The cursor tool that is enabled upon load.\n 0 = Text selection tool.\n 1 = Hand tool.",
"type": "integer",
"enum": [0, 1],
"default": 0
},
"pdfBugEnabled": {
"title": "Enable debugging tools",
"description": "Whether to enable debugging tools.",
"type": "boolean",
"default": false
},
"enableScripting": {
"title": "Enable active content (JavaScript) in PDFs",
"type": "boolean",
"description": "Whether to allow execution of active content (JavaScript) by PDF files.",
"default": false
},
"enableHighlightFloatingButton": {
"type": "boolean",
"default": false
},
"highlightEditorColors": {
"type": "string",
"default": "yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F,yellow_HCM=#FFFFCC,green_HCM=#53FFBC,blue_HCM=#80EBFF,pink_HCM=#F6B8FF,red_HCM=#C50043"
},
"disableRange": {
"title": "Disable range requests",
"description": "Whether to disable range requests (not recommended).",
"type": "boolean",
"default": false
},
"disableStream": {
"title": "Disable streaming for requests",
"description": "Whether to disable streaming for requests (not recommended).",
"type": "boolean",
"default": false
},
"disableAutoFetch": {
"type": "boolean",
"default": false
},
"disableFontFace": {
"title": "Disable @font-face",
"description": "Whether to disable @font-face and fall back to canvas rendering (this is more resource-intensive).",
"type": "boolean",
"default": false
},
"disableTextLayer": {
"description": "DEPRECATED. Set textLayerMode to 0 to disable the text selection layer by default.",
"type": "boolean",
"default": false
},
"textLayerMode": {
"title": "Text layer mode",
"description": "Controls if the text layer is enabled, and the selection mode that is used.\n 0 = Disabled.\n 1 = Enabled.",
"type": "integer",
"enum": [0, 1],
"default": 1
},
"externalLinkTarget": {
"title": "External links target window",
"description": "Controls how external links will be opened.\n 0 = default.\n 1 = replaces current window.\n 2 = new window/tab.\n 3 = parent.\n 4 = in top window.",
"type": "integer",
"enum": [0, 1, 2, 3, 4],
"default": 0
},
"disablePageLabels": {
"type": "boolean",
"default": false
},
"disablePageMode": {
"description": "DEPRECATED.",
"type": "boolean",
"default": false
},
"disableTelemetry": {
"title": "Disable telemetry",
"type": "boolean",
"description": "Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
"default": false
},
"annotationMode": {
"type": "integer",
"enum": [0, 1, 2, 3],
"default": 2
},
"annotationEditorMode": {
"type": "integer",
"enum": [-1, 0, 3, 15],
"default": 0
},
"capCanvasAreaFactor": {
"type": "integer",
"default": 200
},
"enablePermissions": {
"type": "boolean",
"default": false
},
"enableXfa": {
"type": "boolean",
"default": true
},
"historyUpdateUrl": {
"type": "boolean",
"default": false
},
"ignoreDestinationZoom": {
"title": "Ignore the zoom argument in destinations",
"description": "When enabled it will maintain the currently active zoom level, rather than letting the PDF document modify it, when navigating to internal destinations.",
"type": "boolean",
"default": false
},
"enablePrintAutoRotate": {
"title": "Automatically rotate printed pages",
"description": "When enabled, landscape pages are rotated when printed.",
"type": "boolean",
"default": true
},
"scrollModeOnLoad": {
"title": "Scroll mode on load",
"description": "Controls how the viewer scrolls upon load.\n -1 = Default (uses the last position if available/enabled).\n 3 = Page scrolling.\n 0 = Vertical scrolling.\n 1 = Horizontal scrolling.\n 2 = Wrapped scrolling.",
"type": "integer",
"enum": [-1, 0, 1, 2, 3],
"default": -1
},
"spreadModeOnLoad": {
"title": "Spread mode on load",
"description": "Whether the viewer should join pages into spreads upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = No spreads.\n 1 = Odd spreads.\n 2 = Even spreads.",
"type": "integer",
"enum": [-1, 0, 1, 2],
"default": -1
},
"forcePageColors": {
"description": "When enabled, the pdf rendering will use the high contrast mode colors",
"type": "boolean",
"default": false
},
"pageColorsBackground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "Canvas"
},
"pageColorsForeground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "CanvasText"
},
"enableAutoLinking": {
"description": "Enable creation of hyperlinks from text that look like URLs.",
"type": "boolean",
"default": true
},
"enableComment": {
"description": "Enable creation of comment annotations.",
"type": "boolean",
"default": false
},
"enableOptimizedPartialRendering": {
"description": "Enable tracking of PDF operations to optimize partial rendering.",
"type": "boolean",
"default": false
}
}
}

View File

@ -96,7 +96,7 @@ limitations under the License.
chrome.storage.local.get(localStorage, items => { chrome.storage.local.get(localStorage, items => {
Object.assign(localStorage, items); Object.assign(localStorage, items);
var lastTime = parseInt(localStorage.telemetryLastTime) || 0; var lastTime = parseInt(localStorage.telemetryLastTime, 10) || 0;
var wasUpdated = didUpdateSinceLastCheck(); var wasUpdated = didUpdateSinceLastCheck();
if (!wasUpdated && Date.now() - lastTime < MINIMUM_TIME_BETWEEN_PING) { if (!wasUpdated && Date.now() - lastTime < MINIMUM_TIME_BETWEEN_PING) {
return; return;

19
external/brotli/LICENSE_BROTLI vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

8
external/brotli/README.md vendored Normal file
View File

@ -0,0 +1,8 @@
## Release
In order to get the file `decoder.js`:
* `gulp release-brotli --hash` followed by the git hash of the revision.
## Licensing
[brotli](https://github.com/google/brotli/) is under [MIT License](https://github.com/google/brotli/blob/master/LICENSE)

2466
external/brotli/decode.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -190,6 +190,19 @@ function babelPluginPDFJSPreprocessor(babel, ctx) {
}, },
]; ];
path.replaceWith(t.importExpression(source)); path.replaceWith(t.importExpression(source));
} else if (t.isIdentifier(node.callee, { name: "__eager_import__" })) {
if (node.arguments.length !== 1) {
throw new Error("Invalid `__eager_import__` usage.");
}
// Replace it with a standard `import`-call and inline the module.
const source = node.arguments[0];
source.leadingComments = [
{
type: "CommentBlock",
value: "webpackMode: 'eager'",
},
];
path.replaceWith(t.importExpression(source));
} }
}, },
"BlockStatement|StaticBlock": { "BlockStatement|StaticBlock": {
@ -292,6 +305,20 @@ function babelPluginPDFJSPreprocessor(babel, ctx) {
}; };
} }
function babelPluginStripSrcPath() {
return {
name: "babel-plugin-strip-src-path",
visitor: {
"ImportDeclaration|ExportNamedDeclaration|ExportAllDeclaration":
function ({ node }) {
if (node.source?.value.includes("/src/")) {
node.source.value = node.source.value.replace("/src/", "/");
}
},
},
};
}
function preprocessPDFJSCode(ctx, content) { function preprocessPDFJSCode(ctx, content) {
return transformSync(content, { return transformSync(content, {
configFile: false, configFile: false,
@ -299,4 +326,8 @@ function preprocessPDFJSCode(ctx, content) {
}).code; }).code;
} }
export { babelPluginPDFJSPreprocessor, preprocessPDFJSCode }; export {
babelPluginPDFJSPreprocessor,
babelPluginStripSrcPath,
preprocessPDFJSCode,
};

View File

@ -132,7 +132,7 @@ function preprocess(inFilename, outFilename, defines) {
} }
} }
function expand(line) { function expand(line) {
line = line.replaceAll(/__[\w]+__/g, function (variable) { line = line.replaceAll(/__\w+__/g, function (variable) {
variable = variable.substring(2, variable.length - 2); variable = variable.substring(2, variable.length - 2);
if (variable in defines) { if (variable in defines) {
return defines[variable]; return defines[variable];
@ -158,6 +158,7 @@ function preprocess(inFilename, outFilename, defines) {
let state = STATE_NONE; let state = STATE_NONE;
const stack = []; const stack = [];
const control = const control =
// eslint-disable-next-line regexp/no-super-linear-backtracking
/^(?:\/\/|\s*\/\*|\s*<!--)\s*#(if|elif|else|endif|expand|include|error)\b(?:\s+(.*?)(?:\*\/|-->)?$)?/; /^(?:\/\/|\s*\/\*|\s*<!--)\s*#(if|elif|else|endif|expand|include|error)\b(?:\s+(.*?)(?:\*\/|-->)?$)?/;
while ((line = readLine()) !== null) { while ((line = readLine()) !== null) {

40
external/ccov/coverage_format.mjs vendored Normal file
View File

@ -0,0 +1,40 @@
/* Copyright 2026 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const COVERAGE_FORMAT_TO_REPORTER = {
info: "lcovonly",
html: "html",
json: "json",
text: "text",
cobertura: "cobertura",
clover: "clover",
};
function parseCoverageFormats(str) {
const formats = new Set();
for (const fmt of (str ?? "").split(",")) {
const name = fmt.trim();
if (name && COVERAGE_FORMAT_TO_REPORTER[name]) {
formats.add(name);
} else if (name) {
console.warn(
`### Unknown coverage format "${name}", valid values: ${Object.keys(COVERAGE_FORMAT_TO_REPORTER).join(", ")}`
);
}
}
return formats.size > 0 ? formats : new Set(["info"]);
}
export { COVERAGE_FORMAT_TO_REPORTER, parseCoverageFormats };

110
external/ccov/coverage_search.mjs vendored Normal file
View File

@ -0,0 +1,110 @@
/* Copyright 2026 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fs from "fs";
import { parseArgs } from "node:util";
import path from "path";
const __dirname = import.meta.dirname;
const PROJECT_ROOT = path.join(__dirname, "../..");
const { values } = parseArgs({
args: process.argv.slice(2),
options: {
code: { type: "string" },
"coverage-dir": { type: "string", default: "build/coverage" },
help: { type: "boolean", short: "h", default: false },
},
});
if (values.help || !values.code) {
console.log(
"Usage: coverage_search.mjs --code=<file>::<line|function> [--coverage-dir=<path>]\n\n" +
" --code Source file and line number or function name to search for.\n" +
" Examples:\n" +
" --code=canvas.js::205\n" +
" --code=canvas.js::drawImageAtIntegerCoords\n" +
" --coverage-dir Coverage directory containing per-test-index.json [build/coverage]\n\n" +
"Prints to stdout the IDs of tests whose coverage includes the given line or\n" +
"function (one ID per line).\n" +
"Run browsertest with --coverage-per-test first to generate the index."
);
process.exit(values.help ? 0 : 1);
}
const sep = values.code.indexOf("::");
if (sep === -1) {
console.error(
"Error: --code must be in format 'file.js::line_or_function', e.g. canvas.js::205"
);
process.exit(1);
}
const fileName = values.code.slice(0, sep);
const location = values.code.slice(sep + 2);
const isLine = /^\d+$/.test(location);
const lineNum = isLine ? parseInt(location, 10) : null;
const funcName = isLine ? null : location;
const coverageDir = path.isAbsolute(values["coverage-dir"])
? values["coverage-dir"]
: path.join(PROJECT_ROOT, values["coverage-dir"]);
const indexPath = path.join(coverageDir, "per-test-index.json");
if (!fs.existsSync(indexPath)) {
console.error(`Error: index file not found: ${indexPath}`);
console.error("Run browsertest with --coverage-per-test first.");
process.exit(1);
}
const { ids, files } = JSON.parse(fs.readFileSync(indexPath, "utf8"));
// Find the file entry whose path matches fileName.
let fileEntry = null;
for (const [filePath, entry] of Object.entries(files)) {
if (
filePath === fileName ||
filePath.endsWith(`/${fileName}`) ||
filePath.endsWith(`\\${fileName}`)
) {
fileEntry = entry;
break;
}
}
if (!fileEntry) {
process.exit(0);
}
let testIndices = null;
if (lineNum !== null) {
// Direct line lookup.
testIndices = fileEntry.l?.[lineNum];
// If no hit, check whether lineNum is a function declaration start and
// redirect to that function's coverage.
if (!testIndices && fileEntry.fstarts?.[lineNum]) {
testIndices = fileEntry.f?.[fileEntry.fstarts[lineNum]];
}
} else {
testIndices = fileEntry.f?.[funcName];
}
if (testIndices) {
for (const idx of testIndices) {
console.log(ids[idx]);
}
}

190
external/check_l10n/check_l10n.mjs vendored Normal file
View File

@ -0,0 +1,190 @@
#!/usr/bin/env node
/* Copyright 2026 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Checks that every message ID defined in l10n/en-US/viewer.ftl is referenced
* in at least one HTML or JS/MJS file under the web/ directory.
*
* Usage: node external/check_l10n/check_l10n.mjs
*/
import { extname, join } from "path";
import { readdirSync, readFileSync, statSync } from "fs";
const ROOT = join(import.meta.dirname, "..", "..");
const FTL_PATH = join(ROOT, "l10n", "en-US", "viewer.ftl");
const SEARCH_DIRS = ["web", "src"];
const SEARCH_EXTENSIONS = new Set([".html", ".js", ".mjs"]);
// Minimum number of characters a prefix or suffix fragment must have to be
// considered a meaningful match when detecting dynamically-built IDs.
const MIN_FRAGMENT_LENGTH = 6;
/**
* Extract all message IDs from a Fluent (.ftl) file.
* A message ID is an identifier at the start of a line followed by " =".
* @param {string} ftlPath - Absolute path to the .ftl file.
* @returns {string[]} Ordered list of message IDs.
*/
function extractFtlIds(ftlPath) {
const lines = readFileSync(ftlPath, "utf8").split("\n");
const ids = [];
for (const line of lines) {
const match = line.match(/^([a-z][a-z0-9-]*)\s*=/i);
if (match) {
ids.push(match[1]);
}
}
return ids;
}
/**
* Recursively collect all files with matching extensions under a directory.
* @param {string} dir - Directory to walk.
* @param {Set<string>} extensions - Allowed file extensions (e.g. `".js"`).
* @returns {string[]} Absolute paths of matching files.
*/
function collectFiles(dir, extensions) {
const results = [];
for (const entry of readdirSync(dir)) {
const fullPath = join(dir, entry);
const stat = statSync(fullPath);
if (stat.isDirectory()) {
results.push(...collectFiles(fullPath, extensions));
} else if (extensions.has(extname(entry))) {
results.push(fullPath);
}
}
return results;
}
/**
* Load the contents of all source files found under the given directories.
* @param {string[]} dirs - Directory names relative to ROOT.
* @param {Set<string>} extensions - Allowed file extensions.
* @returns {{ path: string, content: string }[]}
*/
function loadSources(dirs, extensions) {
const files = dirs.flatMap(d => collectFiles(join(ROOT, d), extensions));
return files.map(f => ({ path: f, content: readFileSync(f, "utf8") }));
}
/**
* Check whether a message ID appears as a quoted string literal in any source
* file. Handles double quotes, single quotes, and backticks, covering:
* - `data-l10n-id="pdfjs-foo"` (HTML attribute)
* - `"pdfjs-foo"` / `'pdfjs-foo'` / `` `pdfjs-foo` `` (JS string literals,
* `setAttribute`, `l10n.get`, )
* @param {string} id - Message ID to look up.
* @param {{ path: string, content: string }[]} sources
* @returns {boolean}
*/
function isUsed(id, sources) {
const dq = `"${id}"`;
const sq = `'${id}'`;
const bt = `\`${id}\``;
return sources.some(
({ content }) =>
content.includes(dq) || content.includes(sq) || content.includes(bt)
);
}
/**
* For IDs not found as complete literals, check whether the ID is likely
* constructed dynamically via a template literal such as:
* `pdfjs-editor-${editorType}-added-alert`
*
* Strategy: try every (prefix, suffix) pair obtained by splitting the ID's
* dash-separated components, leaving one or more components as the "variable"
* gap. The prefix must appear immediately followed by `${` in a template
* literal; the suffix (if non-empty) must also appear in the same file.
* Minimum length guards prevent matches on trivially short fragments.
*
* @param {string} id - Message ID to test.
* @param {{ path: string, content: string }[]} sources
* @returns {{ path: string, line: number } | null} Location of the first
* matching template literal, or `null` if none found.
*/
function findDynamicLocation(id, sources) {
const parts = id.split("-");
// i = end of prefix (exclusive), j = start of suffix (inclusive)
for (let i = 1; i < parts.length; i++) {
for (let j = i + 1; j <= parts.length; j++) {
const prefix = parts.slice(0, i).join("-") + "-"; // e.g. "pdfjs-editor-"
const suffix = j < parts.length ? "-" + parts.slice(j).join("-") : ""; // e.g. "-added-alert"
if (prefix.length < MIN_FRAGMENT_LENGTH) {
continue;
}
if (suffix !== "" && suffix.length < MIN_FRAGMENT_LENGTH) {
continue;
}
// The prefix must be immediately followed by "${" in a template literal.
const prefixWithVar = prefix + "${";
for (const { path, content } of sources) {
if (
content.includes(prefixWithVar) &&
(suffix === "" || content.includes(suffix))
) {
const idx = content.indexOf(prefixWithVar);
const line = content.slice(0, idx).split("\n").length;
return { path, line };
}
}
}
}
return null;
}
function main() {
const ids = extractFtlIds(FTL_PATH);
console.log(`Found ${ids.length} message IDs in viewer.ftl\n`);
const sources = loadSources(SEARCH_DIRS, SEARCH_EXTENSIONS);
console.log(
`Searching in ${sources.length} files under: ${SEARCH_DIRS.join(", ")}\n`
);
const notFound = ids.filter(id => !isUsed(id, sources));
const dynamicEntries = notFound
.map(id => ({ id, loc: findDynamicLocation(id, sources) }))
.filter(({ loc }) => loc !== null);
const dynamicIds = new Set(dynamicEntries.map(({ id }) => id));
const unused = notFound.filter(id => !dynamicIds.has(id));
if (dynamicEntries.length > 0) {
console.log(
`~ ${dynamicEntries.length} ID(s) likely built dynamically (template literals):\n`
);
for (const { id, loc } of dynamicEntries) {
const rel = loc.path.replace(ROOT + "/", "").replace(ROOT + "\\", "");
console.log(` ${id}`);
console.log(`${rel}:${loc.line}`);
}
console.log();
}
if (unused.length === 0) {
console.log("✓ All remaining message IDs are used.");
} else {
console.log(`${unused.length} unused message ID(s):\n`);
for (const id of unused) {
console.log(` ${id}`);
}
process.exitCode = 1;
}
}
main();

270
external/chromium/prefs.mjs vendored Normal file
View File

@ -0,0 +1,270 @@
/* Copyright 2026 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const prefsMetadata = {
annotationEditorMode: {
enum: [-1, 0, 3, 15],
},
annotationMode: {
enum: [0, 1, 2, 3],
},
cursorToolOnLoad: {
title: "Cursor tool on load",
description:
"The cursor tool that is enabled upon load.\n 0 = Text selection tool.\n 1 = Hand tool.",
enum: [0, 1],
},
defaultZoomDelay: {
title: "Default zoom delay",
description: "Delay (in ms) to wait before redrawing the canvas.",
},
defaultZoomValue: {
title: "Default zoom level",
description:
"Default zoom level of the viewer. Accepted values: 'auto', 'page-actual', 'page-width', 'page-height', 'page-fit', or a zoom level in percents.",
pattern:
"|auto|page-actual|page-width|page-height|page-fit|[0-9]+\\.?[0-9]*(,[0-9]+\\.?[0-9]*){0,2}",
},
disableFontFace: {
title: "Disable @font-face",
description:
"Whether to disable @font-face and fall back to canvas rendering (this is more resource-intensive).",
},
disableRange: {
title: "Disable range requests",
description: "Whether to disable range requests (not recommended).",
},
disableStream: {
title: "Disable streaming for requests",
description: "Whether to disable streaming for requests (not recommended).",
},
disableTelemetry: {
title: "Disable telemetry",
description:
"Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
},
enableAutoLinking: {
description: "Enable creation of hyperlinks from text that look like URLs.",
},
enableComment: {
description: "Enable creation of comment annotations.",
},
enableHWA: {
title: "Enable hardware acceleration",
description: "Whether to enable hardware acceleration.",
},
enableOptimizedPartialRendering: {
description:
"Enable tracking of PDF operations to optimize partial rendering.",
},
enablePrintAutoRotate: {
title: "Automatically rotate printed pages",
description: "When enabled, landscape pages are rotated when printed.",
},
enableScripting: {
title: "Enable active content (JavaScript) in PDFs",
description:
"Whether to allow execution of active content (JavaScript) by PDF files.",
},
externalLinkTarget: {
title: "External links target window",
description:
"Controls how external links will be opened.\n 0 = default.\n 1 = replaces current window.\n 2 = new window/tab.\n 3 = parent.\n 4 = in top window.",
enum: [0, 1, 2, 3, 4],
},
forcePageColors: {
description:
"When enabled, the pdf rendering will use the high contrast mode colors",
},
ignoreDestinationZoom: {
title: "Ignore the zoom argument in destinations",
description:
"When enabled it will maintain the currently active zoom level, rather than letting the PDF document modify it, when navigating to internal destinations.",
},
pageColorsBackground: {
description:
"The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
},
pageColorsForeground: {
description:
"The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
},
pdfBugEnabled: {
title: "Enable debugging tools",
description: "Whether to enable debugging tools.",
},
scrollModeOnLoad: {
title: "Scroll mode on load",
description:
"Controls how the viewer scrolls upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = Vertical scrolling.\n 1 = Horizontal scrolling.\n 2 = Wrapped scrolling.\n 3 = Page scrolling.",
enum: [-1, 0, 1, 2, 3],
},
sidebarViewOnLoad: {
title: "Sidebar state on load",
description:
"Controls the state of the sidebar upon load.\n -1 = Default (uses PageMode if available, otherwise the last position if available/enabled).\n 0 = Do not show sidebar.\n 1 = Show thumbnails in sidebar.\n 2 = Show document outline in sidebar.\n 3 = Show attachments in sidebar.",
enum: [-1, 0, 1, 2, 3],
},
spreadModeOnLoad: {
title: "Spread mode on load",
description:
"Whether the viewer should join pages into spreads upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = No spreads.\n 1 = Odd spreads.\n 2 = Even spreads.",
enum: [-1, 0, 1, 2],
},
textLayerMode: {
title: "Text layer mode",
description:
"Controls if the text layer is enabled, and the selection mode that is used.\n 0 = Disabled.\n 1 = Enabled.",
enum: [0, 1],
},
viewerCssTheme: {
title: "Theme",
description:
"The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
enum: [0, 1, 2],
},
viewOnLoad: {
title: "View position on load",
description:
"The position in the document upon load.\n -1 = Default (uses OpenAction if available, otherwise equal to `viewOnLoad = 0`).\n 0 = The last viewed page/position.\n 1 = The initial page/position.",
enum: [-1, 0, 1],
},
};
// Deprecated keys are allowed in the managed preferences file.
// The code maintainer is responsible for adding migration logic to
// extensions/chromium/options/migration.js and web/chromecom.js .
const deprecatedPrefs = {
disablePageMode: {
description: "DEPRECATED.",
type: "boolean",
default: false,
},
disableTextLayer: {
description:
"DEPRECATED. Set textLayerMode to 0 to disable the text selection layer by default.",
type: "boolean",
default: false,
},
enableHandToolOnLoad: {
description:
"DEPRECATED. Set cursorToolOnLoad to 1 to enable the hand tool by default.",
type: "boolean",
default: false,
},
showPreviousViewOnLoad: {
description:
"DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
type: "boolean",
default: true,
},
};
function buildPrefsSchema(prefs) {
const properties = Object.create(null);
for (const name in prefs) {
const pref = prefs[name];
let type = typeof pref;
switch (type) {
case "boolean":
case "string":
break;
case "number":
type = "integer";
break;
default:
throw new Error(`Invalid type (${type}) for "${name}"-preference.`);
}
const metadata = prefsMetadata[name];
if (metadata) {
let numMetadataKeys = 0;
// Do some (very basic) validation of the metadata.
for (const key in metadata) {
const entry = metadata[key];
switch (key) {
case "default":
case "type":
throw new Error(
`Invalid key (${key}) in metadata for "${name}"-preference.`
);
case "description":
if (entry.startsWith("DEPRECATED.")) {
throw new Error(
`The \`description\` of the "${name}"-preference cannot begin with "DEPRECATED."`
);
}
break;
}
numMetadataKeys++;
}
if (numMetadataKeys === 0) {
throw new Error(
`No metadata for "${name}"-preference, remove the entry.`
);
}
}
properties[name] = {
type,
default: pref,
...metadata,
};
}
for (const name in prefsMetadata) {
if (!properties[name]) {
// Do *not* throw here, since keeping the metadata up-to-date should be
// the responsibility of the CHROMIUM-addon maintainer.
console.error(
`The "${name}"-preference was removed, add it to \`deprecatedPrefs\` instead.\n`
);
}
}
for (const name in deprecatedPrefs) {
const entry = deprecatedPrefs[name];
if (properties[name]) {
throw new Error(
`The "${name}"-preference should not be listed as deprecated.`
);
}
if (!entry.description?.startsWith("DEPRECATED.")) {
throw new Error(
`The \`description\` of the deprecated "${name}"-preference must begin with "DEPRECATED."`
);
}
for (const key of ["default", "type"]) {
if (key in entry) {
continue;
}
throw new Error(
`A \`${key}\` entry must be provided for the deprecated "${name}"-preference.`
);
}
properties[name] = entry;
}
return {
type: "object",
properties,
};
}
export { buildPrefsSchema };

View File

@ -14,7 +14,7 @@
*/ */
function parseAdobeCMap(content) { function parseAdobeCMap(content) {
let m = /(\bbegincmap\b[\s\S]*?)\bendcmap\b/.exec(content); let m = /(\bbegincmap\b[\s\S]+?)\bendcmap\b/.exec(content);
if (!m) { if (!m) {
throw new Error("cmap was not found"); throw new Error("cmap was not found");
} }
@ -37,7 +37,7 @@ function parseAdobeCMap(content) {
result.usecmap = m[1]; result.usecmap = m[1];
} }
const re = const re =
/(\d+)\s+(begincodespacerange|beginnotdefrange|begincidchar|begincidrange|beginbfchar|beginbfrange)\n([\s\S]*?)\n(endcodespacerange|endnotdefrange|endcidchar|endcidrange|endbfchar|endbfrange)/g; /(\d+)\s+(begincodespacerange|beginnotdefrange|begincidchar|begincidrange|beginbfchar|beginbfrange)\n([\s\S]*?)\n(?:endcodespacerange|endnotdefrange|endcidchar|endcidrange|endbfchar|endbfrange)/g;
while ((m = re.exec(body))) { while ((m = re.exec(body))) {
const lines = m[3].toLowerCase().split("\n"); const lines = m[3].toLowerCase().split("\n");

View File

@ -0,0 +1,118 @@
/**
* ESLint rule to prefer `MathClamp(v, min, max)` over nested
* `Math.min(Math.max(...), ...)` / `Math.max(Math.min(...), ...)` patterns.
*
* Detected patterns and their fixes:
* Math.min(Math.max(A, B), C) MathClamp(A, B, C)
* Math.min(C, Math.max(A, B)) MathClamp(A, B, C)
* Math.max(Math.min(A, B), C) MathClamp(A, C, B)
* Math.max(C, Math.min(A, B)) MathClamp(A, C, B)
*/
function isMathCall(node, method) {
return (
node.type === "CallExpression" &&
node.callee.type === "MemberExpression" &&
!node.callee.computed &&
node.callee.object.type === "Identifier" &&
node.callee.object.name === "Math" &&
node.callee.property.type === "Identifier" &&
node.callee.property.name === method &&
node.arguments.length === 2 &&
node.arguments.every(a => a.type !== "SpreadElement")
);
}
// Returns true if node is a Math.min or Math.max call.
function isMathMinMax(node) {
return isMathCall(node, "min") || isMathCall(node, "max");
}
const preferMathClampRule = {
meta: {
type: "suggestion",
fixable: "code",
docs: {
description:
"Prefer MathClamp(v, min, max) over nested Math.min/Math.max",
},
messages: {
useClamp:
"Use MathClamp(v, min, max) instead of nested Math.min/Math.max.",
},
schema: [],
},
create(context) {
const src = context.sourceCode ?? context.getSourceCode();
return {
CallExpression(node) {
// Pattern: Math.min(Math.max(A, B), C) or Math.min(C, Math.max(A, B)).
// Fix as MathClamp(A, B, C) where A,B are inner args, C is outer arg.
if (isMathCall(node, "min")) {
const [arg0, arg1] = node.arguments;
let outerArg, innerNode;
// Math.max(Math.min(A, B), Math.min(C, D)) isn't a clamp pattern, so
// require the outer arg to not be a min/max call.
if (isMathCall(arg0, "max") && !isMathMinMax(arg1)) {
innerNode = arg0;
outerArg = arg1;
} else if (isMathCall(arg1, "max") && !isMathMinMax(arg0)) {
innerNode = arg1;
outerArg = arg0;
} else {
return;
}
const v = src.getText(innerNode.arguments[0]);
const min = src.getText(innerNode.arguments[1]);
const max = src.getText(outerArg);
context.report({
node,
messageId: "useClamp",
fix(fixer) {
return fixer.replaceText(node, `MathClamp(${v}, ${min}, ${max})`);
},
});
}
// Pattern: Math.max(Math.min(A, B), C) or Math.max(C, Math.min(A, B)).
// Fix as MathClamp(A, C, B) where A,B are inner args, C is outer arg.
if (isMathCall(node, "max")) {
const [arg0, arg1] = node.arguments;
let outerArg, innerNode;
if (isMathCall(arg0, "min") && !isMathMinMax(arg1)) {
innerNode = arg0;
outerArg = arg1;
} else if (isMathCall(arg1, "min") && !isMathMinMax(arg0)) {
innerNode = arg1;
outerArg = arg0;
} else {
return;
}
const v = src.getText(innerNode.arguments[0]);
const max = src.getText(innerNode.arguments[1]);
const min = src.getText(outerArg);
context.report({
node,
messageId: "useClamp",
fix(fixer) {
return fixer.replaceText(node, `MathClamp(${v}, ${min}, ${max})`);
},
});
}
},
};
},
};
export default {
rules: {
"prefer-math-clamp": preferMathClampRule,
},
};

0
external/iccs/CGATS001Compat-v2-micro.icc vendored Executable file → Normal file
View File

View File

@ -91,7 +91,7 @@ async function downloadL10n(root) {
await downloadLanguageFiles(root, langCode); await downloadLanguageFiles(root, langCode);
} }
const removeCodes = []; const rmCodes = [];
for (const entry of fs.readdirSync(root)) { for (const entry of fs.readdirSync(root)) {
const dirPath = path.join(root, entry), const dirPath = path.join(root, entry),
stat = fs.lstatSync(dirPath); stat = fs.lstatSync(dirPath);
@ -101,14 +101,13 @@ async function downloadL10n(root) {
entry !== DEFAULT_LOCALE && entry !== DEFAULT_LOCALE &&
!langCodes.includes(entry) !langCodes.includes(entry)
) { ) {
removeCodes.push(entry); fs.rmSync(dirPath, { recursive: true, force: true });
rmCodes.push(entry);
} }
} }
if (removeCodes.length) { if (rmCodes.length) {
console.log( console.log(
"\nConsider removing the following unmaintained locales:\n" + `\nRemoved the following unmaintained locales: ${rmCodes.join(", ")}\n`
removeCodes.join(", ") +
"\n"
); );
} }
} }

196
external/jbig2/LICENSE_JBIG2 vendored Normal file
View File

@ -0,0 +1,196 @@
// Copyright 2014 The PDFium Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

13
external/jbig2/LICENSE_PDFJS_JBIG2 vendored Normal file
View File

@ -0,0 +1,13 @@
Copyright 2026 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

12
external/jbig2/README.md vendored Normal file
View File

@ -0,0 +1,12 @@
## Build
In order to generate the file `jbig2.js`:
* git clone https://github.com/mozilla/pdf.js.jbig2/
* the build requires to have a [Docker](https://www.docker.com/) setup and then:
* `node build.js -C` to build the Docker image
* `node build.js -co /pdf.js/external/jbig2/` to compile the decoder
## Licensing
[PDFium](https://pdfium.googlesource.com/pdfium/) is under [Apache-2.0](https://pdfium.googlesource.com/pdfium/+/main/LICENSE)
and [pdf.js.jbig2](https://github.com/mozilla/pdf.js.jbig2/) is released under [Apache-2.0](https://github.com/mozilla/pdf.js.jbig2/blob/main/LICENSE) license so `jbig2.js` is released under [Apache-2.0](https://github.com/mozilla/pdf.js.jbig2/blob/main/LICENSE) license too.

3
external/jbig2/jbig2.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
external/jbig2/jbig2.wasm vendored Normal file

Binary file not shown.

15
external/jbig2/jbig2_nowasm_fallback.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

254
external/qcms/qcms.js vendored
View File

@ -1,34 +1,29 @@
/* THIS FILE IS GENERATED - DO NOT EDIT */ /* THIS FILE IS GENERATED - DO NOT EDIT */
import { copy_result, copy_rgb, make_cssRGB } from './qcms_utils.js'; import { copy_result, copy_rgb, make_cssRGB } from './qcms_utils.js';
let wasm;
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); /**
* @enum {0 | 1 | 2 | 3 | 4 | 5}
*/
export const DataType = Object.freeze({
RGB8: 0, "0": "RGB8",
RGBA8: 1, "1": "RGBA8",
BGRA8: 2, "2": "BGRA8",
Gray8: 3, "3": "Gray8",
GrayA8: 4, "4": "GrayA8",
CMYK: 5, "5": "CMYK",
});
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; /**
* @enum {0 | 1 | 2 | 3}
*/
export const Intent = Object.freeze({
Perceptual: 0, "0": "Perceptual",
RelativeColorimetric: 1, "1": "RelativeColorimetric",
Saturation: 2, "2": "Saturation",
AbsoluteColorimetric: 3, "3": "AbsoluteColorimetric",
});
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN = 0;
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
getUint8ArrayMemory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/** /**
* # Safety * # Safety
* *
@ -42,6 +37,21 @@ export function qcms_convert_array(transformer, src) {
wasm.qcms_convert_array(transformer, ptr0, len0); wasm.qcms_convert_array(transformer, ptr0, len0);
} }
/**
* # Safety
*
* This function is called directly from JavaScript.
* @param {number} transformer
* @param {number} src1
* @param {number} src2
* @param {number} src3
* @param {number} src4
* @param {boolean} css
*/
export function qcms_convert_four(transformer, src1, src2, src3, src4, css) {
wasm.qcms_convert_four(transformer, src1, src2, src3, src4, css);
}
/** /**
* # Safety * # Safety
* *
@ -73,14 +83,9 @@ export function qcms_convert_three(transformer, src1, src2, src3, css) {
* *
* This function is called directly from JavaScript. * This function is called directly from JavaScript.
* @param {number} transformer * @param {number} transformer
* @param {number} src1
* @param {number} src2
* @param {number} src3
* @param {number} src4
* @param {boolean} css
*/ */
export function qcms_convert_four(transformer, src1, src2, src3, src4, css) { export function qcms_drop_transformer(transformer) {
wasm.qcms_convert_four(transformer, src1, src2, src3, src4, css); wasm.qcms_drop_transformer(transformer);
} }
/** /**
@ -98,117 +103,122 @@ export function qcms_transformer_from_memory(mem, in_type, intent) {
const ret = wasm.qcms_transformer_from_memory(ptr0, len0, in_type, intent); const ret = wasm.qcms_transformer_from_memory(ptr0, len0, in_type, intent);
return ret >>> 0; return ret >>> 0;
} }
/**
* # Safety
*
* This function is called directly from JavaScript.
* @param {number} transformer
*/
export function qcms_drop_transformer(transformer) {
wasm.qcms_drop_transformer(transformer);
}
/**
* @enum {0 | 1 | 2 | 3 | 4 | 5}
*/
export const DataType = Object.freeze({
RGB8: 0, "0": "RGB8",
RGBA8: 1, "1": "RGBA8",
BGRA8: 2, "2": "BGRA8",
Gray8: 3, "3": "Gray8",
GrayA8: 4, "4": "GrayA8",
CMYK: 5, "5": "CMYK",
});
/**
* @enum {0 | 1 | 2 | 3}
*/
export const Intent = Object.freeze({
Perceptual: 0, "0": "Perceptual",
RelativeColorimetric: 1, "1": "RelativeColorimetric",
Saturation: 2, "2": "Saturation",
AbsoluteColorimetric: 3, "3": "AbsoluteColorimetric",
});
async function __wbg_load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
if (typeof WebAssembly.instantiateStreaming === 'function') {
try {
return await WebAssembly.instantiateStreaming(module, imports);
} catch (e) {
if (module.headers.get('Content-Type') != 'application/wasm') {
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
} else {
throw e;
}
}
}
const bytes = await module.arrayBuffer();
return await WebAssembly.instantiate(bytes, imports);
} else {
const instance = await WebAssembly.instantiate(module, imports);
if (instance instanceof WebAssembly.Instance) {
return { instance, module };
} else {
return instance;
}
}
}
function __wbg_get_imports() { function __wbg_get_imports() {
const imports = {}; const import0 = {
imports.wbg = {}; __proto__: null,
imports.wbg.__wbg_copyresult_b08ee7d273f295dd = function(arg0, arg1) { __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
__wbg_copy_result_0d15f3bf9d9012ae: function(arg0, arg1) {
copy_result(arg0 >>> 0, arg1 >>> 0); copy_result(arg0 >>> 0, arg1 >>> 0);
}; },
imports.wbg.__wbg_copyrgb_d60ce17bb05d9b67 = function(arg0) { __wbg_copy_rgb_0106d9d9464fce43: function(arg0) {
copy_rgb(arg0 >>> 0); copy_rgb(arg0 >>> 0);
}; },
imports.wbg.__wbg_makecssRGB_893bf0cd9fdb302d = function(arg0) { __wbg_make_cssRGB_8e24b34f71f5363e: function(arg0) {
make_cssRGB(arg0 >>> 0); make_cssRGB(arg0 >>> 0);
}; },
imports.wbg.__wbindgen_init_externref_table = function() { __wbindgen_init_externref_table: function() {
const table = wasm.__wbindgen_export_0; const table = wasm.__wbindgen_externrefs;
const offset = table.grow(4); const offset = table.grow(4);
table.set(0, undefined); table.set(0, undefined);
table.set(offset + 0, undefined); table.set(offset + 0, undefined);
table.set(offset + 1, null); table.set(offset + 1, null);
table.set(offset + 2, true); table.set(offset + 2, true);
table.set(offset + 3, false); table.set(offset + 3, false);
; },
}; };
imports.wbg.__wbindgen_throw = function(arg0, arg1) { return {
throw new Error(getStringFromWasm0(arg0, arg1)); __proto__: null,
"./qcms_bg.js": import0,
}; };
return imports;
} }
function __wbg_init_memory(imports, memory) { function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return decodeText(ptr, len);
} }
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
getUint8ArrayMemory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
const MAX_SAFARI_DECODE_BYTES = 2146435072;
let numBytesDecoded = 0;
function decodeText(ptr, len) {
numBytesDecoded += len;
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
numBytesDecoded = len;
}
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN = 0;
let wasmModule, wasm;
function __wbg_finalize_init(instance, module) { function __wbg_finalize_init(instance, module) {
wasm = instance.exports; wasm = instance.exports;
__wbg_init.__wbindgen_wasm_module = module; wasmModule = module;
cachedUint8ArrayMemory0 = null; cachedUint8ArrayMemory0 = null;
wasm.__wbindgen_start(); wasm.__wbindgen_start();
return wasm; return wasm;
} }
async function __wbg_load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
if (typeof WebAssembly.instantiateStreaming === 'function') {
try {
return await WebAssembly.instantiateStreaming(module, imports);
} catch (e) {
const validResponse = module.ok && expectedResponseType(module.type);
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
} else { throw e; }
}
}
const bytes = await module.arrayBuffer();
return await WebAssembly.instantiate(bytes, imports);
} else {
const instance = await WebAssembly.instantiate(module, imports);
if (instance instanceof WebAssembly.Instance) {
return { instance, module };
} else {
return instance;
}
}
function expectedResponseType(type) {
switch (type) {
case 'basic': case 'cors': case 'default': return true;
}
return false;
}
}
function initSync(module) { function initSync(module) {
if (wasm !== undefined) return wasm; if (wasm !== undefined) return wasm;
if (typeof module !== 'undefined') { if (module !== undefined) {
if (Object.getPrototypeOf(module) === Object.prototype) { if (Object.getPrototypeOf(module) === Object.prototype) {
({module} = module) ({module} = module)
} else { } else {
@ -217,15 +227,10 @@ function initSync(module) {
} }
const imports = __wbg_get_imports(); const imports = __wbg_get_imports();
__wbg_init_memory(imports);
if (!(module instanceof WebAssembly.Module)) { if (!(module instanceof WebAssembly.Module)) {
module = new WebAssembly.Module(module); module = new WebAssembly.Module(module);
} }
const instance = new WebAssembly.Instance(module, imports); const instance = new WebAssembly.Instance(module, imports);
return __wbg_finalize_init(instance, module); return __wbg_finalize_init(instance, module);
} }
@ -233,7 +238,7 @@ async function __wbg_init(module_or_path) {
if (wasm !== undefined) return wasm; if (wasm !== undefined) return wasm;
if (typeof module_or_path !== 'undefined') { if (module_or_path !== undefined) {
if (Object.getPrototypeOf(module_or_path) === Object.prototype) { if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
({module_or_path} = module_or_path) ({module_or_path} = module_or_path)
} else { } else {
@ -248,12 +253,9 @@ async function __wbg_init(module_or_path) {
module_or_path = fetch(module_or_path); module_or_path = fetch(module_or_path);
} }
__wbg_init_memory(imports);
const { instance, module } = await __wbg_load(await module_or_path, imports); const { instance, module } = await __wbg_load(await module_or_path, imports);
return __wbg_finalize_init(instance, module); return __wbg_finalize_init(instance, module);
} }
export { initSync }; export { initSync, __wbg_init as default };
export default __wbg_init;

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
external/quickjs/quickjs-eval.wasm vendored Normal file

Binary file not shown.

View File

@ -13,8 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
// TODO: Remove the exception below once someone figures out how to fix it.
// eslint-disable-next-line import/no-unresolved
import { parse, registerWalkers, Root } from "postcss-values-parser"; import { parse, registerWalkers, Root } from "postcss-values-parser";
import { isString } from "stylelint/lib/utils/validateTypes.mjs"; import { isString } from "stylelint/lib/utils/validateTypes.mjs";
import stylelint from "stylelint"; import stylelint from "stylelint";

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,3 @@
Most of the files in this folder (except for the `en-US` folder) have been + Only the translations for the `en-US` locale are maintained here.
imported from the Firefox Nightly branch;
please see https://hg.mozilla.org/l10n-central. Some of the files are + The translations for all other locales are imported automatically from Firefox. Please see https://mozilla-l10n.github.io/introduction/ for information about contributing.
licensed under the MPL license. You can obtain a copy of the license at
https://mozilla.org/MPL/2.0.

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = مصغّرة صفحة { $page } .aria-label = مصغّرة صفحة { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = حدّد الصفحة { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = الصفحة { $page } من { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -286,7 +295,7 @@ pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", tim
pdfjs-password-label = أدخل لكلمة السر لفتح هذا الملف. pdfjs-password-label = أدخل لكلمة السر لفتح هذا الملف.
pdfjs-password-invalid = كلمة سر خطأ. من فضلك أعد المحاولة. pdfjs-password-invalid = كلمة سر خطأ. من فضلك أعد المحاولة.
pdfjs-password-ok-button = حسنا pdfjs-password-ok-button = حسنًا
pdfjs-password-cancel-button = ألغِ pdfjs-password-cancel-button = ألغِ
pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة. pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة.
@ -294,9 +303,13 @@ pdfjs-web-fonts-disabled = خطوط الوب مُعطّلة: تعذّر استخ
pdfjs-editor-free-text-button = pdfjs-editor-free-text-button =
.title = نص .title = نص
pdfjs-editor-color-picker-free-text-input =
.title = غيِّر لون النص
pdfjs-editor-free-text-button-label = نص pdfjs-editor-free-text-button-label = نص
pdfjs-editor-ink-button = pdfjs-editor-ink-button =
.title = ارسم .title = ارسم
pdfjs-editor-color-picker-ink-input =
.title = غيِّر لون الرسم
pdfjs-editor-ink-button-label = ارسم pdfjs-editor-ink-button-label = ارسم
pdfjs-editor-stamp-button = pdfjs-editor-stamp-button =
.title = أضِف أو حرّر الصور .title = أضِف أو حرّر الصور
@ -308,6 +321,14 @@ pdfjs-highlight-floating-button1 =
.title = أبرِز .title = أبرِز
.aria-label = أبرِز .aria-label = أبرِز
pdfjs-highlight-floating-button-label = أبرِز pdfjs-highlight-floating-button-label = أبرِز
pdfjs-comment-floating-button =
.title = علق
.aria-label = علق
pdfjs-comment-floating-button-label = علق
pdfjs-editor-comment-button =
.title = علق
.aria-label = علق
pdfjs-editor-comment-button-label = التعليق
pdfjs-editor-signature-button = pdfjs-editor-signature-button =
.title = أضِف توقيع .title = أضِف توقيع
pdfjs-editor-signature-button-label = أضِف توقيع pdfjs-editor-signature-button-label = أضِف توقيع
@ -370,6 +391,25 @@ pdfjs-editor-add-saved-signature-button =
pdfjs-free-text2 = pdfjs-free-text2 =
.aria-label = محرِّر النص .aria-label = محرِّر النص
.default-content = ابدأ في كتابة… .default-content = ابدأ في كتابة…
# Used to show how many comments are present in the pdf file.
# Variables:
# $count (Number) - the number of comments.
pdfjs-editor-comments-sidebar-title =
{ $count ->
[zero] تعليق
[one] تعليق
[two] تعليقات
[few] تعليقات
[many] تعليقات
*[other] تعليقات
}
pdfjs-editor-comments-sidebar-close-button =
.title = أغلِق الشريط الجانبي
.aria-label = أغلِق الشريط الجانبي
pdfjs-editor-comments-sidebar-close-button-label = أغلِق الشريط الجانبي
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = هل رأيت شيئاً جديرًا بالملاحظة؟ ابرزه واترك تعليقًا.
pdfjs-editor-comments-sidebar-no-comments-link = اطّلع على المزيد
## Alt-text dialog ## Alt-text dialog
@ -500,6 +540,14 @@ pdfjs-editor-alt-text-settings-show-dialog-button-label = أظهِر مُحرّ
pdfjs-editor-alt-text-settings-show-dialog-description = يساعدك على التأكد من أن جميع صورك تحتوي على نص بديل. pdfjs-editor-alt-text-settings-show-dialog-description = يساعدك على التأكد من أن جميع صورك تحتوي على نص بديل.
pdfjs-editor-alt-text-settings-close-button = أغلق pdfjs-editor-alt-text-settings-close-button = أغلق
## Accessibility labels (announced by screen readers) for objects added to the editor.
pdfjs-editor-highlight-added-alert = أُضيف إبراز
pdfjs-editor-freetext-added-alert = أُضيف النص
pdfjs-editor-ink-added-alert = أُضيف رسم
pdfjs-editor-stamp-added-alert = أُضيف صورة
pdfjs-editor-signature-added-alert = أُضيف توقيع
## "Annotations removed" bar ## "Annotations removed" bar
pdfjs-editor-undo-bar-message-highlight = أُزِيل البرز pdfjs-editor-undo-bar-message-highlight = أُزِيل البرز
@ -507,6 +555,7 @@ pdfjs-editor-undo-bar-message-freetext = أُزيل النص
pdfjs-editor-undo-bar-message-ink = أُزِيلت الرسمة pdfjs-editor-undo-bar-message-ink = أُزِيلت الرسمة
pdfjs-editor-undo-bar-message-stamp = أُزيلت الصورة pdfjs-editor-undo-bar-message-stamp = أُزيلت الصورة
pdfjs-editor-undo-bar-message-signature = أُزيل التوقيع pdfjs-editor-undo-bar-message-signature = أُزيل التوقيع
pdfjs-editor-undo-bar-message-comment = أُزيل التعليق
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -528,7 +577,7 @@ pdfjs-editor-undo-bar-close-button-label = أغلق
## Add a signature dialog ## Add a signature dialog
pdfjs-editor-add-signature-dialog-label = يتيح هذا النموذج للمستخدم إنشاء توقيع لإضافته إلى مستند PDF. ويمكن للمستخدم تحرير الاسم (الذي يعمل أيضًا كنص بديل)، وحفظ التوقيع بشكل اختياري للاستخدام المتكرر. pdfjs-editor-add-signature-dialog-label = يتيح هذا النموذج للمستخدم إنشاء توقيع لإضافته إلى مستند PDF. ويمكن للمستخدم تحرير الاسم (الذي يعمل أيضًا كنص بديل)، وحفظ التوقيع بشكل اختياري للاستخدام المتكرر.
pdfjs-editor-add-signature-dialog-title = أضِف توقيعا pdfjs-editor-add-signature-dialog-title = أضِف توقيعًا
## Tab names ## Tab names
@ -572,6 +621,8 @@ pdfjs-editor-add-signature-save-checkbox = احفظ التوقيع
pdfjs-editor-add-signature-save-warning-message = لقد وصلت إلى الحد الأقصى وهو 5 توقيعات محفوظة. أزِل توقيع واحد لحفظ المزيد. pdfjs-editor-add-signature-save-warning-message = لقد وصلت إلى الحد الأقصى وهو 5 توقيعات محفوظة. أزِل توقيع واحد لحفظ المزيد.
pdfjs-editor-add-signature-image-upload-error-title = تعذر رفع الصورة. pdfjs-editor-add-signature-image-upload-error-title = تعذر رفع الصورة.
pdfjs-editor-add-signature-image-upload-error-description = تحقق من اتصال الشبكة لديك أو جرّب صورة أخرى. pdfjs-editor-add-signature-image-upload-error-description = تحقق من اتصال الشبكة لديك أو جرّب صورة أخرى.
pdfjs-editor-add-signature-image-no-data-error-title = لا يمكن تحويل هذه الصورة إلى توقيع
pdfjs-editor-add-signature-image-no-data-error-description = من فضلك حاول رفع صورة أخرى.
pdfjs-editor-add-signature-error-close-button = أغلق pdfjs-editor-add-signature-error-close-button = أغلق
## Dialog buttons ## Dialog buttons
@ -580,6 +631,139 @@ pdfjs-editor-add-signature-cancel-button = ألغِ
pdfjs-editor-add-signature-add-button = أضِف pdfjs-editor-add-signature-add-button = أضِف
pdfjs-editor-edit-signature-update-button = حدّث pdfjs-editor-edit-signature-update-button = حدّث
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = حرّر التعليق
pdfjs-editor-edit-comment-popup-button =
.title = حرّر التعليق
pdfjs-editor-delete-comment-popup-button-label = أزِل التعليق
pdfjs-editor-delete-comment-popup-button =
.title = أزِل التعليق
pdfjs-show-comment-button =
.title = أظهر التعليق
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = حرّر التعليق
pdfjs-editor-edit-comment-dialog-save-button-when-editing = حدّث
# No existing comment
pdfjs-editor-edit-comment-dialog-title-when-adding = أضِف تعليقًا
pdfjs-editor-edit-comment-dialog-save-button-when-adding = أضف
pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = ابدأ الكتابة…
pdfjs-editor-edit-comment-dialog-cancel-button = ألغِ
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = أضف التعليق
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = تبديل الشريط الجانبي (يحتوي المستند على صور مصغرة/مخطط تفصيلي/مرفقات/طبقات)
pdfjs-toggle-views-manager-button1-label = أدِر الصفحات
pdfjs-views-manager-sidebar =
.aria-label = الشريط الجانبي
pdfjs-views-manager-sidebar-resizer =
.aria-label = أداة تغيير حجم الشريط الجانبي
pdfjs-views-manager-view-selector-button =
.title = المناظير
pdfjs-views-manager-view-selector-button-label = المناظير
pdfjs-views-manager-pages-title = الصفحات
pdfjs-views-manager-outlines-title1 = مخطط المستند
.title = مخطط المستند (انقر نقرًا مزدوجًا لتوسيع/طي كافة العناصر)
pdfjs-views-manager-attachments-title = المرفقات
pdfjs-views-manager-layers-title1 = ‏‏طبقات
.title = الطبقات (انقر نقرًا مزدوجًا لإعادة تعيين كافة الطبقات إلى الحالة المبدئية)
pdfjs-views-manager-pages-option-label = الصفحات
pdfjs-views-manager-outlines-option-label = مخطط المستند
pdfjs-views-manager-attachments-option-label = المرفقات
pdfjs-views-manager-layers-option-label = ‏‏الطبقات
pdfjs-views-manager-add-file-button =
.title = أضف ملف
pdfjs-views-manager-add-file-button-label = أضف ملف
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[zero] { $count } محدّد
[one] { $count } محدّد
[two] { $count } محدّدان
[few] { $count } محدّد
[many] { $count } محدّد
*[other] { $count } محدّد
}
pdfjs-views-manager-pages-status-none-action-label = حدّد الصفحات
pdfjs-views-manager-pages-status-action-button-label = أدِر
pdfjs-views-manager-pages-status-copy-button-label = انسخ
pdfjs-views-manager-pages-status-cut-button-label = قصّ
pdfjs-views-manager-pages-status-delete-button-label = احذف
pdfjs-views-manager-pages-status-export-selected-button-label = حُدِّد التصدير…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[zero] لا صفحات قُصت
[one] صفحة قُصت
[two] { $count } صفحتان قُصت
[few] { $count } صفحات قُصت
[many] { $count } صفحةً قُصت
*[other] { $count } صفحة قُصت
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[zero] لا صفحة منسوخة
[one] صفحة منسوخة
[two] صفحتان منسوختان
[few] { $count } صفحات منسوخة
[many] { $count } صفحةً منسوخةً
*[other] { $count } صفحة منسوخة
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[zero] لا صفحات محذوفة
[one] حُذف صفحة
[two] حُذف صفحتان
[few] حُذف { $count } صفحات
[many] حُذف { $count } صفحةً
*[other] حُذف { $count } صفحة
}
pdfjs-views-manager-pages-status-waiting-ready-label = يجهز ملفك…
pdfjs-views-manager-pages-status-waiting-uploading-label = يرفع ملف…
pdfjs-views-manager-status-warning-cut-label = تعذّر القص. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-copy-label = تعذّر النسخ. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-delete-label = تعذّر الحذف. حدِّث الصفحة وحاول مجددًا.
pdfjs-views-manager-status-warning-save-label = تعذّر الحفظ. أنعش الصفحة وحاول مجددًا.
pdfjs-views-manager-status-undo-button-label = تراجع
pdfjs-views-manager-status-done-button-label = تمّ
pdfjs-views-manager-status-close-button =
.title = أغلق
pdfjs-views-manager-status-close-button-label = أغلق
pdfjs-views-manager-paste-button-label = ألصق
pdfjs-views-manager-paste-button-before =
.title = ألصق قبل الصفحة الأولى
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = ألصق بعد الصفحة { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = جديد
pdfjs-views-manager-waiting-for-file = يرفع ملف…
pdfjs-toggle-views-manager-button1 =
.title = أدِر الصفحات
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Мініяцюра старонкі { $page } .aria-label = Мініяцюра старонкі { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Выбраць старонку { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Старонка { $page } з { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -537,6 +546,7 @@ pdfjs-editor-undo-bar-message-freetext = Тэкст выдалены
pdfjs-editor-undo-bar-message-ink = Малюнак выдалены pdfjs-editor-undo-bar-message-ink = Малюнак выдалены
pdfjs-editor-undo-bar-message-stamp = Відарыс выдалены pdfjs-editor-undo-bar-message-stamp = Відарыс выдалены
pdfjs-editor-undo-bar-message-signature = Подпіс выдалены pdfjs-editor-undo-bar-message-signature = Подпіс выдалены
pdfjs-editor-undo-bar-message-comment = Каментарый выдалены
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -637,6 +647,99 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Скасаваць
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Дадаць каментарый .title = Дадаць каментарый
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Паказаць/схаваць бакавую панэль (дакумент мае мініяцюры/змест/далучэнні/пласты)
pdfjs-toggle-views-manager-button1-label = Кіраванне старонкамі
pdfjs-views-manager-sidebar =
.aria-label = Бакавая панэль
pdfjs-views-manager-sidebar-resizer =
.aria-label = Змена памеру бакавой панэлі
pdfjs-views-manager-view-selector-button =
.title = Выгляд
pdfjs-views-manager-view-selector-button-label = Выгляд
pdfjs-views-manager-pages-title = Старонкі
pdfjs-views-manager-outlines-title1 = Структура дакумента
.title = Структура дакумента (націсніце двойчы, каб разгарнуць/згарнуць усе элементы)
pdfjs-views-manager-attachments-title = Далучэнні
pdfjs-views-manager-layers-title1 = Пласты
.title = Пласты (націсніце двойчы каб скінуць у прадвызначаны стан)
pdfjs-views-manager-pages-option-label = Старонкі
pdfjs-views-manager-outlines-option-label = Структура дакумента
pdfjs-views-manager-attachments-option-label = Далучэнні
pdfjs-views-manager-layers-option-label = Пласты
pdfjs-views-manager-add-file-button =
.title = Дадаць файл
pdfjs-views-manager-add-file-button-label = Дадаць файл
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] Вылучана { $count }
[few] Вылучаны { $count }
*[many] Вылучана { $count }
}
pdfjs-views-manager-pages-status-none-action-label = Выбраць старонкі
pdfjs-views-manager-pages-status-action-button-label = Кіраваць
pdfjs-views-manager-pages-status-copy-button-label = Капіяваць
pdfjs-views-manager-pages-status-cut-button-label = Выразаць
pdfjs-views-manager-pages-status-delete-button-label = Выдаліць
pdfjs-views-manager-pages-status-export-selected-button-label = Экспартаваць выбранае…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] Выразана { $count } старонка
[few] Выразана { $count } старонкі
*[many] Выразана { $count } старонак
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] Скапіравана { $count } старонка
[few] Скапіравана { $count } старонкі
*[many] Скапіравана { $count } старонак
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] Выдалена { $count } старонка
[few] Выдалена { $count } старонкі
*[many] Выдалена { $count } старонак
}
pdfjs-views-manager-pages-status-waiting-ready-label = Рыхтуецца ваш файл…
pdfjs-views-manager-pages-status-waiting-uploading-label = Зацягваецца файл…
pdfjs-views-manager-status-warning-cut-label = Не ўдалося выразаць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-copy-label = Не ўдалося скапіяваць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-delete-label = Не ўдалося выдаліць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-warning-save-label = Не ўдалося захаваць. Абнавіце старонку і паспрабуйце зноў.
pdfjs-views-manager-status-undo-button-label = Адмяніць
pdfjs-views-manager-status-done-button-label = Гатова
pdfjs-views-manager-status-close-button =
.title = Закрыць
pdfjs-views-manager-status-close-button-label = Закрыць
pdfjs-views-manager-paste-button-label = Уставіць
pdfjs-views-manager-paste-button-before =
.title = Уставіць перад першай старонкай
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Уставіць пасля старонкі { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = НОВАЕ
pdfjs-views-manager-waiting-for-file = Зацягваецца файл…
pdfjs-toggle-views-manager-button1 =
.title = Кіраванне старонкамі
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -386,3 +386,7 @@ pdfjs-editor-new-alt-text-not-now-button = Не сега
## Image alt-text settings ## Image alt-text settings
pdfjs-editor-alt-text-settings-delete-model-button = Изтриване pdfjs-editor-alt-text-settings-delete-model-button = Изтриване
## Controls
pdfjs-editor-add-signature-image-upload-error-description = Проверете мрежовата си връзка или опитайте с друго изображение.

67
l10n/bqi/viewer.ftl Normal file
View File

@ -0,0 +1,67 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Main toolbar buttons (tooltips and alt text for images)
pdfjs-print-button =
.title = چاپ
pdfjs-print-button-label = چاپ
##
pdfjs-document-properties-linearized-yes = هری
## Print
pdfjs-print-progress-close-button = لقو
## Password
pdfjs-password-ok-button = خا
pdfjs-password-cancel-button = لقو
## Editing
pdfjs-editor-stamp-button =
.title = ٱووردن یا آلشت شؽواتا
pdfjs-editor-stamp-button-label = ٱووردن یا آلشت شؽواتا
## Default editor aria labels
pdfjs-editor-stamp-editor =
.aria-label = آلشتگر شؽوات
##
# .default-content is used as a placeholder in an empty text editor.
pdfjs-free-text2 =
.aria-label = آلشتگر هؽل
.default-content = ناهاڌن پا هؽل کردن...
pdfjs-editor-comments-sidebar-no-comments-link = قلوه دووسته بۊین
## Alt-text dialog
pdfjs-editor-alt-text-cancel-button = لقو
## New alt-text dialog
## Group note for entire feature: Alternative text (alt text) helps when people can't see the image. This feature includes a tool to create alt text automatically using an AI model that works locally on the user's device to preserve privacy.
pdfjs-editor-new-alt-text-disclaimer-learn-more-url = قلوه دووسته بۊین
## Dialog buttons
pdfjs-editor-add-signature-cancel-button = لقو
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = آلشت منشڌ
pdfjs-editor-edit-comment-popup-button =
.title = آلشت منشڌ
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = آلشت منشڌ
pdfjs-editor-edit-comment-dialog-cancel-button = لقو

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Náhled strany { $page } .aria-label = Náhled strany { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Vybrat stranu { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Strana { $page } z { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -540,6 +549,7 @@ pdfjs-editor-undo-bar-message-freetext = Text odstraněn
pdfjs-editor-undo-bar-message-ink = Kresba odstraněna pdfjs-editor-undo-bar-message-ink = Kresba odstraněna
pdfjs-editor-undo-bar-message-stamp = Obrázek odebrán pdfjs-editor-undo-bar-message-stamp = Obrázek odebrán
pdfjs-editor-undo-bar-message-signature = Podpis odebrán pdfjs-editor-undo-bar-message-signature = Podpis odebrán
pdfjs-editor-undo-bar-message-comment = Komentář odebrán
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -641,6 +651,103 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Zrušit
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Přidání komentáře .title = Přidání komentáře
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Přepnout postranní lištu (dokument obsahuje náhledy/osnovu/přílohy/vrstvy)
pdfjs-toggle-views-manager-button1-label = Spravovat strany
pdfjs-views-manager-sidebar =
.aria-label = Postranní lišta
pdfjs-views-manager-sidebar-resizer =
.aria-label = Změna velikosti v postranní liště
pdfjs-views-manager-view-selector-button =
.title = Zobrazení
pdfjs-views-manager-view-selector-button-label = Zobrazení
pdfjs-views-manager-pages-title = Stránky
pdfjs-views-manager-outlines-title1 = Osnova dokumentu
.title = Osnova dokumentu (dvojité klepnutí rozbalí/sbalí všechny položky)
pdfjs-views-manager-attachments-title = Přílohy
pdfjs-views-manager-layers-title1 = Vrstvy
.title = Vrstvy (dvojité klepnutí obnoví všechny vrstvy do výchozího stavu)
pdfjs-views-manager-pages-option-label = Stránky
pdfjs-views-manager-outlines-option-label = Osnova dokumentu
pdfjs-views-manager-attachments-option-label = Přílohy
pdfjs-views-manager-layers-option-label = Vrstvy
pdfjs-views-manager-add-file-button =
.title = Přidat soubor
pdfjs-views-manager-add-file-button-label = Přidat soubor
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } vybrána
[few] { $count } vybrány
[many] { $count } vybráno
*[other] { $count } vybráno
}
pdfjs-views-manager-pages-status-none-action-label = Výběr stránek
pdfjs-views-manager-pages-status-action-button-label = Správa
pdfjs-views-manager-pages-status-copy-button-label = Kopírovat
pdfjs-views-manager-pages-status-cut-button-label = Vyjmout
pdfjs-views-manager-pages-status-delete-button-label = Smazat
pdfjs-views-manager-pages-status-export-selected-button-label = Exportovat vybrané…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 stránka vyjmuta
[few] { $count } stránky vyjmuty
[many] { $count } stránek vyjmuto
*[other] { $count } stránek vyjmuto
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 stránka zkopírována
[few] { $count } stránky zkopírovány
[many] { $count } stránek zkopírováno
*[other] { $count } stránek zkopírováno
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 stránka smazána
[few] { $count } stránky smazány
[many] { $count } stránek smazáno
*[other] { $count } stránek smazáno
}
pdfjs-views-manager-pages-status-waiting-ready-label = Příprava vašeho souboru…
pdfjs-views-manager-pages-status-waiting-uploading-label = Nahrávání souboru…
pdfjs-views-manager-status-warning-cut-label = Nelze vyjmout. Obnovte stránku a zkuste to znovu.
pdfjs-views-manager-status-warning-copy-label = Kopírování se nezdařilo. Obnovte stránku a zkuste to znovu.
pdfjs-views-manager-status-warning-delete-label = Smazání se nezdařilo. Obnovte stránku a zkuste to znovu.
pdfjs-views-manager-status-warning-save-label = Nepodařilo se uložit. Obnovte stránku a zkuste to znovu.
pdfjs-views-manager-status-undo-button-label = Zpět
pdfjs-views-manager-status-done-button-label = Hotovo
pdfjs-views-manager-status-close-button =
.title = Zavřít
pdfjs-views-manager-status-close-button-label = Zavřít
pdfjs-views-manager-paste-button-label = Vložit
pdfjs-views-manager-paste-button-before =
.title = Vloží před první stránku
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Vložit za stránku { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOVÉ
pdfjs-views-manager-waiting-for-file = Nahrávání souboru…
pdfjs-toggle-views-manager-button1 =
.title = Spravovat strany
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Llun Bach Tudalen { $page } .aria-label = Llun Bach Tudalen { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Dewis tudalen { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Tudalen { $page } o { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -546,6 +555,7 @@ pdfjs-editor-undo-bar-message-freetext = Tynnwyd y testun
pdfjs-editor-undo-bar-message-ink = Tynnwyd y lluniad pdfjs-editor-undo-bar-message-ink = Tynnwyd y lluniad
pdfjs-editor-undo-bar-message-stamp = Tynnwyd y ddelwedd pdfjs-editor-undo-bar-message-stamp = Tynnwyd y ddelwedd
pdfjs-editor-undo-bar-message-signature = Llofnod wedi'i dynnu pdfjs-editor-undo-bar-message-signature = Llofnod wedi'i dynnu
pdfjs-editor-undo-bar-message-comment = Sylw wedi'i dynnu
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -649,6 +659,111 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Diddymu
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Ychwanegu sylw .title = Ychwanegu sylw
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Togl y Bar Ochr (dogfen yn cynnwys lluniau bach/amlinelliad/atodiadau/haenau)
pdfjs-toggle-views-manager-button1-label = Rheoli tudalennau
pdfjs-views-manager-sidebar =
.aria-label = Bar Ochr
pdfjs-views-manager-sidebar-resizer =
.aria-label = Newid maint bar ochr
pdfjs-views-manager-view-selector-button =
.title = Golygon
pdfjs-views-manager-view-selector-button-label = Golygon
pdfjs-views-manager-pages-title = Tudalennau
pdfjs-views-manager-outlines-title1 = Amlinelliad Dogfen
.title = Amlinelliad dogfen (clic dwbl i ehangu/leihau pob eitem)
pdfjs-views-manager-attachments-title = Atodiadau
pdfjs-views-manager-layers-title1 = Haenau
.title = Haenau clic dwbl i ailosod pob haen i'r cyflwr ragosodedig)
pdfjs-views-manager-pages-option-label = Tudalennau
pdfjs-views-manager-outlines-option-label = Amlinelliad dogfen
pdfjs-views-manager-attachments-option-label = Atodiadau
pdfjs-views-manager-layers-option-label = Haenau
pdfjs-views-manager-add-file-button =
.title = Ychwanegu ffeil
pdfjs-views-manager-add-file-button-label = Ychwanegu ffeil
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[zero] { $count } wedi'u dewis
[one] { $count } wedi'i dewis
[two] { $count } wedi'u dewis
[few] { $count } wedi'u dewis
[many] { $count } wedi'u dewis
*[other] { $count } wedi'u dewis
}
pdfjs-views-manager-pages-status-none-action-label = Dewiswch dudalennau
pdfjs-views-manager-pages-status-action-button-label = Rheoli
pdfjs-views-manager-pages-status-copy-button-label = Copïo
pdfjs-views-manager-pages-status-cut-button-label = Torri
pdfjs-views-manager-pages-status-delete-button-label = Dileu
pdfjs-views-manager-pages-status-export-selected-button-label = Wedi dewis allforio…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[zero] { $count } tudalennau wedi'u torri
[one] { $count } dudalen wedi'i thorri
[two] { $count } dudalen wedi'u torri
[few] { $count } tudalen wedi'u torri
[many] { $count } tudalen wedi'u torri
*[other] { $count } tudalen wedi'u torri
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[zero] { $count } tudalennau wedi'u copïo
[one] { $count } tudalen wedi'i chopïo
[two] { $count } tudalen wedi'u copïo
[few] { $count } tudalen wedi'u copïo
[many] { $count } tudalen wedi'u copïo
*[other] { $count } tudalen wedi'u copïo
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[zero] { $count } tudalennau wedi'u dileu
[one] { $count } tudalen wedi'i dileu
[two] { $count } dudalen wedi'u dileu
[few] { $count } tudalen wedi'u dileu
[many] { $count } tudalen wedi'u dileu
*[other] { $count } tudalen wedi'u dileu
}
pdfjs-views-manager-pages-status-waiting-ready-label = Yn paratoi eich ffeil…
pdfjs-views-manager-pages-status-waiting-uploading-label = Yn llwytho ffeil i fyny…
pdfjs-views-manager-status-warning-cut-label = Methu torri. Adnewyddwch y dudalen a cheisio eto.
pdfjs-views-manager-status-warning-copy-label = Methu copïo. Adnewyddwch y dudalen a cheisio eto.
pdfjs-views-manager-status-warning-delete-label = Methu dileu. Adnewyddwch y dudalen a cheisio eto.
pdfjs-views-manager-status-warning-save-label = Methu cadw. Adnewyddwch y dudalen a cheisio eto.
pdfjs-views-manager-status-undo-button-label = Dadwneud
pdfjs-views-manager-status-done-button-label = Gorffen
pdfjs-views-manager-status-close-button =
.title = Cau
pdfjs-views-manager-status-close-button-label = Cau
pdfjs-views-manager-paste-button-label = Gludo
pdfjs-views-manager-paste-button-before =
.title = Gludo cyn y dudalen gyntaf
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Gludo ar ôl tudalen { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NEWYDD
pdfjs-views-manager-waiting-for-file = Yn llwytho ffeil i fyny…
pdfjs-toggle-views-manager-button1 =
.title = Rheoli tudalennau
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniature af side { $page } .aria-label = Miniature af side { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Vælg side { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Side { $page } af { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Tekst fjernet
pdfjs-editor-undo-bar-message-ink = Tegning fjernet pdfjs-editor-undo-bar-message-ink = Tegning fjernet
pdfjs-editor-undo-bar-message-stamp = Billede fjernet pdfjs-editor-undo-bar-message-stamp = Billede fjernet
pdfjs-editor-undo-bar-message-signature = Signatur fjernet pdfjs-editor-undo-bar-message-signature = Signatur fjernet
pdfjs-editor-undo-bar-message-comment = Kommentar fjernet
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,87 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Annuller
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Tilføj kommentar .title = Tilføj kommentar
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Slå sidepanel til eller fra (dokumentet indeholder miniaturer/disposition/vedhæftede filer/lag)
pdfjs-toggle-views-manager-button1-label = Håndter sider
pdfjs-views-manager-sidebar =
.aria-label = Sidepanel
pdfjs-views-manager-view-selector-button =
.title = Visninger
pdfjs-views-manager-view-selector-button-label = Visninger
pdfjs-views-manager-pages-title = Sider
pdfjs-views-manager-attachments-title = Vedhæftede filer
pdfjs-views-manager-layers-title1 = Lag
.title = Lag (dobbeltklik for at nulstille alle lag til standard-tilstanden)
pdfjs-views-manager-pages-option-label = Sider
pdfjs-views-manager-outlines-option-label = Dokument-disposition
pdfjs-views-manager-attachments-option-label = Vedhæftede filer
pdfjs-views-manager-layers-option-label = Lag
pdfjs-views-manager-add-file-button =
.title = Tilføj fil
pdfjs-views-manager-add-file-button-label = Tilføj fil
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } valgt
*[other] { $count } valgt
}
pdfjs-views-manager-pages-status-none-action-label = Vælg sider
pdfjs-views-manager-pages-status-action-button-label = Håndter
pdfjs-views-manager-pages-status-copy-button-label = Kopier
pdfjs-views-manager-pages-status-cut-button-label = Klip
pdfjs-views-manager-pages-status-delete-button-label = Slet
pdfjs-views-manager-pages-status-export-selected-button-label = Eksporter valgte…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 side klippet
*[other] { $count } sider klippet
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 side kopieret
*[other] { $count } sider kopieret
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 side slettet
*[other] { $count } sider slettet
}
pdfjs-views-manager-pages-status-waiting-ready-label = Gør din fil klar…
pdfjs-views-manager-pages-status-waiting-uploading-label = Uploader fil…
pdfjs-views-manager-status-undo-button-label = Fortryd
pdfjs-views-manager-status-done-button-label = Færdig
pdfjs-views-manager-status-close-button =
.title = Luk
pdfjs-views-manager-status-close-button-label = Luk
pdfjs-views-manager-paste-button-label = Indsæt
pdfjs-views-manager-paste-button-before =
.title = Indsæt før første side
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Indsæt efter side { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NY
pdfjs-views-manager-waiting-for-file = Uploader fil…
pdfjs-toggle-views-manager-button1 =
.title = Håndter sider
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniaturansicht von Seite { $page } .aria-label = Miniaturansicht von Seite { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seite { $page } auswählen
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Seite { $page } von { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Text entfernt
pdfjs-editor-undo-bar-message-ink = Zeichnung entfernt pdfjs-editor-undo-bar-message-ink = Zeichnung entfernt
pdfjs-editor-undo-bar-message-stamp = Grafik entfernt pdfjs-editor-undo-bar-message-stamp = Grafik entfernt
pdfjs-editor-undo-bar-message-signature = Unterschrift entfernt pdfjs-editor-undo-bar-message-signature = Unterschrift entfernt
pdfjs-editor-undo-bar-message-comment = Kommentar entfernt
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Abbrechen
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Kommentar hinzufügen .title = Kommentar hinzufügen
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Sidebar umschalten (Dokument enthält Miniaturansichten/Dokumentstruktur/Anhänge/Ebenen)
pdfjs-toggle-views-manager-button1-label = Seiten verwalten
pdfjs-views-manager-sidebar =
.aria-label = Sidebar
pdfjs-views-manager-sidebar-resizer =
.aria-label = Größenanpassung der Sidebar
pdfjs-views-manager-view-selector-button =
.title = Ansichten
pdfjs-views-manager-view-selector-button-label = Ansichten
pdfjs-views-manager-pages-title = Seiten
pdfjs-views-manager-outlines-title1 = Dokumentstruktur
.title = Dokumentstruktur (Doppelklick zum Ein- bzw. Ausblenden aller Einträge)
pdfjs-views-manager-attachments-title = Anhänge
pdfjs-views-manager-layers-title1 = Ebenen
.title = Ebenen (Doppelklick, um alle Ebenen auf den Standard-Zustand zurückzusetzen)
pdfjs-views-manager-pages-option-label = Seiten
pdfjs-views-manager-outlines-option-label = Dokumentstruktur
pdfjs-views-manager-attachments-option-label = Anhänge
pdfjs-views-manager-layers-option-label = Ebenen
pdfjs-views-manager-add-file-button =
.title = Datei hinzufügen
pdfjs-views-manager-add-file-button-label = Datei hinzufügen
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } ausgewählt
*[other] { $count } ausgewählt
}
pdfjs-views-manager-pages-status-none-action-label = Seiten auswählen
pdfjs-views-manager-pages-status-action-button-label = Verwalten
pdfjs-views-manager-pages-status-copy-button-label = Kopieren
pdfjs-views-manager-pages-status-cut-button-label = Ausschneiden
pdfjs-views-manager-pages-status-delete-button-label = Löschen
pdfjs-views-manager-pages-status-export-selected-button-label = Ausgewählte exportieren…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 Seite ausgeschnitten
*[other] { $count } Seiten ausgeschnitten
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 Seite kopiert
*[other] { $count } Seiten kopiert
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 Seite gelöscht
*[other] { $count } Seiten gelöscht
}
pdfjs-views-manager-pages-status-waiting-ready-label = Ihre Datei wird vorbereitet…
pdfjs-views-manager-pages-status-waiting-uploading-label = Datei wird hochgeladen…
pdfjs-views-manager-status-warning-cut-label = Ausschneiden war nicht möglich. Aktualisieren Sie die Seite und versuchen Sie es erneut.
pdfjs-views-manager-status-warning-copy-label = Kopieren nicht möglich. Aktualisieren Sie die Seite und versuchen Sie es erneut.
pdfjs-views-manager-status-warning-delete-label = Löschen war nicht möglich. Aktualisieren Sie die Seite und versuchen Sie es erneut.
pdfjs-views-manager-status-warning-save-label = Speichern nicht möglich. Aktualisieren Sie die Seite und versuchen Sie es erneut.
pdfjs-views-manager-status-undo-button-label = Rückgängig
pdfjs-views-manager-status-done-button-label = Fertig
pdfjs-views-manager-status-close-button =
.title = Schließen
pdfjs-views-manager-status-close-button-label = Schließen
pdfjs-views-manager-paste-button-label = Einfügen
pdfjs-views-manager-paste-button-before =
.title = Vor der ersten Seite einfügen
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Nach Seite { $page } einfügen
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NEU
pdfjs-views-manager-waiting-for-file = Datei wird hochgeladen…
pdfjs-toggle-views-manager-button1 =
.title = Seiten verwalten
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -167,10 +167,10 @@ pdfjs-printing-not-ready = Warnowanje: PDF njejo se za śišćanje dopołnje zac
## Tooltips and alt text for side panel toolbar buttons ## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button = pdfjs-toggle-sidebar-button =
.title = Bócnicu pokazaś/schowaś .title = Bocnicu pokazaś/schowaś
pdfjs-toggle-sidebar-notification-button = pdfjs-toggle-sidebar-notification-button =
.title = Bocnicu pśešaltowaś (dokument rozrědowanje/pśipiski/warstwy wopśimujo) .title = Bocnicu pśešaltowaś (dokument rozrědowanje/pśipiski/warstwy wopśimujo)
pdfjs-toggle-sidebar-button-label = Bócnicu pokazaś/schowaś pdfjs-toggle-sidebar-button-label = Bocnicu pokazaś/schowaś
pdfjs-document-outline-button = pdfjs-document-outline-button =
.title = Dokumentowe naraźenje pokazaś (dwójne kliknjenje, aby se wšykne zapiski pokazali/schowali) .title = Dokumentowe naraźenje pokazaś (dwójne kliknjenje, aby se wšykne zapiski pokazali/schowali)
pdfjs-document-outline-button-label = Dokumentowa struktura pdfjs-document-outline-button-label = Dokumentowa struktura
@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura boka { $page } .aria-label = Miniatura boka { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Bok { $page } wubraś
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Bok { $page } z { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -389,9 +398,9 @@ pdfjs-editor-comments-sidebar-title =
*[other] { $count } komentarow *[other] { $count } komentarow
} }
pdfjs-editor-comments-sidebar-close-button = pdfjs-editor-comments-sidebar-close-button =
.title = Bócnicu zacyniś .title = Bocnicu zacyniś
.aria-label = Bócnicu zacyniś .aria-label = Bocnicu zacyniś
pdfjs-editor-comments-sidebar-close-button-label = Bócnicu zacyniś pdfjs-editor-comments-sidebar-close-button-label = Bocnicu zacyniś
# Instructional copy to add a comment by selecting text or an annotations. # Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = Wiźiśo něco wobspomnjeśa gódnego? Wuzwigniśo to a zawóstajśo komentar. pdfjs-editor-comments-sidebar-no-comments1 = Wiźiśo něco wobspomnjeśa gódnego? Wuzwigniśo to a zawóstajśo komentar.
pdfjs-editor-comments-sidebar-no-comments-link = Dalšne informacije pdfjs-editor-comments-sidebar-no-comments-link = Dalšne informacije
@ -540,6 +549,7 @@ pdfjs-editor-undo-bar-message-freetext = Tekst jo se wótwónoźeł
pdfjs-editor-undo-bar-message-ink = Kreslanka jo se wótwónoźeła pdfjs-editor-undo-bar-message-ink = Kreslanka jo se wótwónoźeła
pdfjs-editor-undo-bar-message-stamp = Wobraz jo se wótwónoźeł pdfjs-editor-undo-bar-message-stamp = Wobraz jo se wótwónoźeł
pdfjs-editor-undo-bar-message-signature = Signatura jo se wótwónoźeła pdfjs-editor-undo-bar-message-signature = Signatura jo se wótwónoźeła
pdfjs-editor-undo-bar-message-comment = Komentar jo se wótwónoźeł
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -641,6 +651,103 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Pśetergnuś
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Komentar pśidaś .title = Komentar pśidaś
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Bocnicu pśešaltowaś (dokument miniatury/rozrědowanje/pśipiski/warstwy wopśimujo)
pdfjs-toggle-views-manager-button1-label = Boki zastojaś
pdfjs-views-manager-sidebar =
.aria-label = Bocnica
pdfjs-views-manager-sidebar-resizer =
.aria-label = Pśiměrjenje wjelikosći bocnice
pdfjs-views-manager-view-selector-button =
.title = Naglědy
pdfjs-views-manager-view-selector-button-label = Naglědy
pdfjs-views-manager-pages-title = Boki
pdfjs-views-manager-outlines-title1 = Dokumentowa struktura
.title = Dokumentowa struktura (klikniśo dwójcy, aby wšykne zapiski pokazał/schował)
pdfjs-views-manager-attachments-title = Pśidanki
pdfjs-views-manager-layers-title1 = Rowniny
.title = Rowniny (klikniśo dwójcy, aby wšykne rowniny na standardny status slědk stajił)
pdfjs-views-manager-pages-option-label = Boki
pdfjs-views-manager-outlines-option-label = Dokumentowa struktura
pdfjs-views-manager-attachments-option-label = Pśidanki
pdfjs-views-manager-layers-option-label = Rowniny
pdfjs-views-manager-add-file-button =
.title = Dataju pśidaś
pdfjs-views-manager-add-file-button-label = Dataju pśidaś
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } wubrany
[two] { $count } wubranej
[few] { $count } wubrane
*[other] { $count } wubrane
}
pdfjs-views-manager-pages-status-none-action-label = Boki wubraś
pdfjs-views-manager-pages-status-action-button-label = Zastojaś
pdfjs-views-manager-pages-status-copy-button-label = Kopěrowaś
pdfjs-views-manager-pages-status-cut-button-label = Wurězaś
pdfjs-views-manager-pages-status-delete-button-label = Lašowaś
pdfjs-views-manager-pages-status-export-selected-button-label = Wubrane eksportěrowaś…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] { $count } bok wurězany
[two] { $count } boka wurězanej
[few] { $count } boki wurězane
*[other] { $count } bokow wurězane
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] { $count } bok kopěrowany
[two] { $count } boka kopěrowanej
[few] { $count } boki kopěrowane
*[other] { $count } bokow kopěrowane
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] { $count } bok wulašowany
[two] { $count } boka wulašowanej
[few] { $count } boki wulašowane
*[other] { $count } bokow wulašowane
}
pdfjs-views-manager-pages-status-waiting-ready-label = Waša dataja se pśigótujo…
pdfjs-views-manager-pages-status-waiting-uploading-label = Dataja se nagrawa…
pdfjs-views-manager-status-warning-cut-label = Njedajo se wurězaś. Aktualizěrujśo bok a wopytajśo hyšći raz.
pdfjs-views-manager-status-warning-copy-label = Njedajo se kopěrowaś. Aktualizěrujśo bok a wopytajśo hyšći raz.
pdfjs-views-manager-status-warning-delete-label = Njedajo se lašowaś. Aktualizěrujśo bok a wopytajśo hyšći raz.
pdfjs-views-manager-status-warning-save-label = Njedajo se składowaś. Aktualizěrujśo bok a wopytajśo hyšći raz.
pdfjs-views-manager-status-undo-button-label = Anulěrowaś
pdfjs-views-manager-status-done-button-label = Dokóńcony
pdfjs-views-manager-status-close-button =
.title = Zacyniś
pdfjs-views-manager-status-close-button-label = Zacyniś
pdfjs-views-manager-paste-button-label = Zasajźiś
pdfjs-views-manager-paste-button-before =
.title = Pśed prědnym bokom zasajźiś
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Za bokom { $page } zasajźiś
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOWY
pdfjs-views-manager-waiting-for-file = Dataja se nagrawa…
pdfjs-toggle-views-manager-button1 =
.title = Boki zastojaś
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Μικρογραφία σελίδας { $page } .aria-label = Μικρογραφία σελίδας { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Επιλογή σελίδας { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Σελίδα { $page } από { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Το κείμενο αφαιρέθηκ
pdfjs-editor-undo-bar-message-ink = Το σχέδιο αφαιρέθηκε pdfjs-editor-undo-bar-message-ink = Το σχέδιο αφαιρέθηκε
pdfjs-editor-undo-bar-message-stamp = Η εικόνα αφαιρέθηκε pdfjs-editor-undo-bar-message-stamp = Η εικόνα αφαιρέθηκε
pdfjs-editor-undo-bar-message-signature = Η υπογραφή αφαιρέθηκε pdfjs-editor-undo-bar-message-signature = Η υπογραφή αφαιρέθηκε
pdfjs-editor-undo-bar-message-comment = Το σχόλιο αφαιρέθηκε
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Ακύρωση
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Προσθήκη σχολίου .title = Προσθήκη σχολίου
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = (Απ)ενεργοποίηση πλαϊνής γραμμής (το έγγραφο περιέχει μικρογραφίες/περίγραμμα/συνημμένα/επίπεδα)
pdfjs-toggle-views-manager-button1-label = Διαχείριση σελίδων
pdfjs-views-manager-sidebar =
.aria-label = Πλαϊνή γραμμή
pdfjs-views-manager-sidebar-resizer =
.aria-label = Αλλαγή μεγέθους πλαϊνής γραμμής
pdfjs-views-manager-view-selector-button =
.title = Προβολές
pdfjs-views-manager-view-selector-button-label = Προβολές
pdfjs-views-manager-pages-title = Σελίδες
pdfjs-views-manager-outlines-title1 = Διάρθρωση εγγράφου
.title = Διάρθρωση εγγράφου (διπλό κλικ για ανάπτυξη/σύμπτυξη όλων των στοιχείων)
pdfjs-views-manager-attachments-title = Συνημμένα
pdfjs-views-manager-layers-title1 = Επίπεδα
.title = Επίπεδα (διπλό κλικ για επαναφορά όλων των επιπέδων στην προεπιλεγμένη κατάσταση)
pdfjs-views-manager-pages-option-label = Σελίδες
pdfjs-views-manager-outlines-option-label = Διάρθρωση εγγράφου
pdfjs-views-manager-attachments-option-label = Συνημμένα
pdfjs-views-manager-layers-option-label = Επίπεδα
pdfjs-views-manager-add-file-button =
.title = Προσθήκη αρχείου
pdfjs-views-manager-add-file-button-label = Προσθήκη αρχείου
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } επιλεγμένη
*[other] { $count } επιλεγμένες
}
pdfjs-views-manager-pages-status-none-action-label = Επιλογή σελίδων
pdfjs-views-manager-pages-status-action-button-label = Διαχείριση
pdfjs-views-manager-pages-status-copy-button-label = Αντιγραφή
pdfjs-views-manager-pages-status-cut-button-label = Αποκοπή
pdfjs-views-manager-pages-status-delete-button-label = Διαγραφή
pdfjs-views-manager-pages-status-export-selected-button-label = Εξαγωγή επιλεγμένων…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] Αποκόπηκε 1 σελίδα
*[other] Αποκόπηκαν { $count } σελίδες
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] Αντιγράφηκε 1 σελίδα
*[other] Αντιγράφηκαν { $count } σελίδες
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] Διαγράφηκε 1 σελίδα
*[other] Διαγράφηκαν { $count } σελίδες
}
pdfjs-views-manager-pages-status-waiting-ready-label = Προετοιμασία αρχείου…
pdfjs-views-manager-pages-status-waiting-uploading-label = Μεταφόρτωση αρχείου…
pdfjs-views-manager-status-warning-cut-label = Δεν ήταν δυνατή η αποκοπή. Ανανεώστε τη σελίδα και δοκιμάστε ξανά.
pdfjs-views-manager-status-warning-copy-label = Δεν ήταν δυνατή η αντιγραφή. Ανανεώστε τη σελίδα και δοκιμάστε ξανά.
pdfjs-views-manager-status-warning-delete-label = Δεν ήταν δυνατή η διαγραφή. Ανανεώστε τη σελίδα και δοκιμάστε ξανά.
pdfjs-views-manager-status-warning-save-label = Δεν ήταν δυνατή η αποθήκευση. Ανανεώστε τη σελίδα και δοκιμάστε ξανά.
pdfjs-views-manager-status-undo-button-label = Αναίρεση
pdfjs-views-manager-status-done-button-label = Τέλος
pdfjs-views-manager-status-close-button =
.title = Κλείσιμο
pdfjs-views-manager-status-close-button-label = Κλείσιμο
pdfjs-views-manager-paste-button-label = Επικόλληση
pdfjs-views-manager-paste-button-before =
.title = Επικόλληση πριν από την πρώτη σελίδα
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Επικόλληση μετά τη σελίδα { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = ΝΕΟ
pdfjs-views-manager-waiting-for-file = Μεταφόρτωση αρχείου…
pdfjs-toggle-views-manager-button1 =
.title = Διαχείριση σελίδων
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Thumbnail of Page { $page } .aria-label = Thumbnail of Page { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Select page { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Page { $page } of { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Text removed
pdfjs-editor-undo-bar-message-ink = Drawing removed pdfjs-editor-undo-bar-message-ink = Drawing removed
pdfjs-editor-undo-bar-message-stamp = Image removed pdfjs-editor-undo-bar-message-stamp = Image removed
pdfjs-editor-undo-bar-message-signature = Signature removed pdfjs-editor-undo-bar-message-signature = Signature removed
pdfjs-editor-undo-bar-message-comment = Comment removed
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancel
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Add comment .title = Add comment
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Toggle Sidebar (document contains thumbnails/outline/attachments/layers)
pdfjs-toggle-views-manager-button1-label = Manage pages
pdfjs-views-manager-sidebar =
.aria-label = Sidebar
pdfjs-views-manager-sidebar-resizer =
.aria-label = Sidebar resizer
pdfjs-views-manager-view-selector-button =
.title = Views
pdfjs-views-manager-view-selector-button-label = Views
pdfjs-views-manager-pages-title = Pages
pdfjs-views-manager-outlines-title1 = Document outline
.title = Document outline (double-click to expand/collapse all items)
pdfjs-views-manager-attachments-title = Attachments
pdfjs-views-manager-layers-title1 = Layers
.title = Layers (double-click to reset all layers to the default state)
pdfjs-views-manager-pages-option-label = Pages
pdfjs-views-manager-outlines-option-label = Document outline
pdfjs-views-manager-attachments-option-label = Attachments
pdfjs-views-manager-layers-option-label = Layers
pdfjs-views-manager-add-file-button =
.title = Add file
pdfjs-views-manager-add-file-button-label = Add file
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } selected
*[other] { $count } selected
}
pdfjs-views-manager-pages-status-none-action-label = Select pages
pdfjs-views-manager-pages-status-action-button-label = Manage
pdfjs-views-manager-pages-status-copy-button-label = Copy
pdfjs-views-manager-pages-status-cut-button-label = Cut
pdfjs-views-manager-pages-status-delete-button-label = Delete
pdfjs-views-manager-pages-status-export-selected-button-label = Export selected…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 page cut
*[other] { $count } pages cut
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 page copied
*[other] { $count } pages copied
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 page deleted
*[other] { $count } pages deleted
}
pdfjs-views-manager-pages-status-waiting-ready-label = Getting your file ready…
pdfjs-views-manager-pages-status-waiting-uploading-label = Uploading file…
pdfjs-views-manager-status-warning-cut-label = Couldnt cut. Refresh page and try again.
pdfjs-views-manager-status-warning-copy-label = Couldnt copy. Refresh page and try again.
pdfjs-views-manager-status-warning-delete-label = Couldnt delete. Refresh page and try again.
pdfjs-views-manager-status-warning-save-label = Couldnt save. Refresh page and try again.
pdfjs-views-manager-status-undo-button-label = Undo
pdfjs-views-manager-status-done-button-label = Done
pdfjs-views-manager-status-close-button =
.title = Close
pdfjs-views-manager-status-close-button-label = Close
pdfjs-views-manager-paste-button-label = Paste
pdfjs-views-manager-paste-button-before =
.title = Paste before the first page
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Paste after page { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NEW
pdfjs-views-manager-waiting-for-file = Uploading file…
pdfjs-toggle-views-manager-button1 =
.title = Manage pages
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Thumbnail of Page { $page } .aria-label = Thumbnail of Page { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Select page { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Page { $page } of { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Text removed
pdfjs-editor-undo-bar-message-ink = Drawing removed pdfjs-editor-undo-bar-message-ink = Drawing removed
pdfjs-editor-undo-bar-message-stamp = Image removed pdfjs-editor-undo-bar-message-stamp = Image removed
pdfjs-editor-undo-bar-message-signature = Signature removed pdfjs-editor-undo-bar-message-signature = Signature removed
pdfjs-editor-undo-bar-message-comment = Comment removed
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancel
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Add comment .title = Add comment
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Toggle Sidebar (document contains thumbnails/outline/attachments/layers)
pdfjs-toggle-views-manager-button1-label = Manage pages
pdfjs-views-manager-sidebar =
.aria-label = Sidebar
pdfjs-views-manager-sidebar-resizer =
.aria-label = Sidebar resizer
pdfjs-views-manager-view-selector-button =
.title = Views
pdfjs-views-manager-view-selector-button-label = Views
pdfjs-views-manager-pages-title = Pages
pdfjs-views-manager-outlines-title1 = Document outline
.title = Document outline (double-click to expand/collapse all items)
pdfjs-views-manager-attachments-title = Attachments
pdfjs-views-manager-layers-title1 = Layers
.title = Layers (double-click to reset all layers to the default state)
pdfjs-views-manager-pages-option-label = Pages
pdfjs-views-manager-outlines-option-label = Document outline
pdfjs-views-manager-attachments-option-label = Attachments
pdfjs-views-manager-layers-option-label = Layers
pdfjs-views-manager-add-file-button =
.title = Add file
pdfjs-views-manager-add-file-button-label = Add file
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } selected
*[other] { $count } selected
}
pdfjs-views-manager-pages-status-none-action-label = Select pages
pdfjs-views-manager-pages-status-action-button-label = Manage
pdfjs-views-manager-pages-status-copy-button-label = Copy
pdfjs-views-manager-pages-status-cut-button-label = Cut
pdfjs-views-manager-pages-status-delete-button-label = Delete
pdfjs-views-manager-pages-status-export-selected-button-label = Export selected…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 page cut
*[other] { $count } pages cut
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 page copied
*[other] { $count } pages copied
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 page deleted
*[other] { $count } pages deleted
}
pdfjs-views-manager-pages-status-waiting-ready-label = Getting your file ready…
pdfjs-views-manager-pages-status-waiting-uploading-label = Uploading file…
pdfjs-views-manager-status-warning-cut-label = Couldnt cut. Refresh page and try again.
pdfjs-views-manager-status-warning-copy-label = Couldnt copy. Refresh page and try again.
pdfjs-views-manager-status-warning-delete-label = Couldnt delete. Refresh page and try again.
pdfjs-views-manager-status-warning-save-label = Couldnt save. Refresh page and try again.
pdfjs-views-manager-status-undo-button-label = Undo
pdfjs-views-manager-status-done-button-label = Done
pdfjs-views-manager-status-close-button =
.title = Close
pdfjs-views-manager-status-close-button-label = Close
pdfjs-views-manager-paste-button-label = Paste
pdfjs-views-manager-paste-button-before =
.title = Paste before the first page
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Paste after page { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NEW
pdfjs-views-manager-waiting-for-file = Uploading file…
pdfjs-toggle-views-manager-button1 =
.title = Manage pages
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -192,14 +192,20 @@ pdfjs-additional-layers = Additional Layers
# Variables: # Variables:
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-title = # $total (Number) - the number of pages
.title = Page { $page } pdfjs-thumb-page-title1 =
.title = Page { $page } of { $total }
# Variables: # Variables:
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Thumbnail of Page { $page } .aria-label = Thumbnail of Page { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Select page { $page }
## Find panel button title and messages ## Find panel button title and messages
pdfjs-find-input = pdfjs-find-input =
@ -532,15 +538,6 @@ pdfjs-editor-alt-text-settings-automatic-title = Automatic alt text
pdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically pdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically
pdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who cant see the image or when the image doesnt load. pdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who cant see the image or when the image doesnt load.
# Variables:
# $totalSize (Number) - the total size (in MB) of the AI model.
pdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)
pdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.
pdfjs-editor-alt-text-settings-delete-model-button = Delete
pdfjs-editor-alt-text-settings-download-model-button = Download
pdfjs-editor-alt-text-settings-downloading-model-button = Downloading…
pdfjs-editor-alt-text-settings-editor-title = Alt text editor pdfjs-editor-alt-text-settings-editor-title = Alt text editor
pdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image pdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image
pdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text. pdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.
@ -561,6 +558,7 @@ pdfjs-editor-undo-bar-message-freetext = Text removed
pdfjs-editor-undo-bar-message-ink = Drawing removed pdfjs-editor-undo-bar-message-ink = Drawing removed
pdfjs-editor-undo-bar-message-stamp = Image removed pdfjs-editor-undo-bar-message-stamp = Image removed
pdfjs-editor-undo-bar-message-signature = Signature removed pdfjs-editor-undo-bar-message-signature = Signature removed
pdfjs-editor-undo-bar-message-comment = Comment removed
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -693,21 +691,25 @@ pdfjs-editor-add-comment-button =
## - layers. ## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ... ## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-button = pdfjs-toggle-views-manager-button1 =
.title = Toggle Sidebar .title = Manage pages
pdfjs-toggle-views-manager-notification-button = pdfjs-toggle-views-manager-notification-button =
.title = Toggle Sidebar (document contains thumbnails/outline/attachments/layers) .title = Toggle Sidebar (document contains thumbnails/outline/attachments/layers)
pdfjs-toggle-views-manager-button-label = Toggle Sidebar pdfjs-toggle-views-manager-button1-label = Manage pages
pdfjs-views-manager-sidebar = pdfjs-views-manager-sidebar =
.aria-label = Sidebar .aria-label = Sidebar
pdfjs-views-manager-sidebar-resizer =
.aria-label = Sidebar resizer
pdfjs-views-manager-view-selector-button = pdfjs-views-manager-view-selector-button =
.title = Views .title = Views
pdfjs-views-manager-view-selector-button-label = Views pdfjs-views-manager-view-selector-button-label = Views
pdfjs-views-manager-pages-title = Pages pdfjs-views-manager-pages-title = Pages
pdfjs-views-manager-outlines-title = Document outline pdfjs-views-manager-outlines-title1 = Document outline
.title = Document outline (double-click to expand/collapse all items)
pdfjs-views-manager-attachments-title = Attachments pdfjs-views-manager-attachments-title = Attachments
pdfjs-views-manager-layers-title = Layers pdfjs-views-manager-layers-title1 = Layers
.title = Layers (double-click to reset all layers to the default state)
pdfjs-views-manager-pages-option-label = Pages pdfjs-views-manager-pages-option-label = Pages
pdfjs-views-manager-outlines-option-label = Document outline pdfjs-views-manager-outlines-option-label = Document outline
@ -730,7 +732,7 @@ pdfjs-views-manager-pages-status-action-button-label = Manage
pdfjs-views-manager-pages-status-copy-button-label = Copy pdfjs-views-manager-pages-status-copy-button-label = Copy
pdfjs-views-manager-pages-status-cut-button-label = Cut pdfjs-views-manager-pages-status-cut-button-label = Cut
pdfjs-views-manager-pages-status-delete-button-label = Delete pdfjs-views-manager-pages-status-delete-button-label = Delete
pdfjs-views-manager-pages-status-save-as-button-label = Save as pdfjs-views-manager-pages-status-export-selected-button-label = Export selected
# Variables: # Variables:
# $count (Number) - the number of selected pages to be cut. # $count (Number) - the number of selected pages to be cut.
@ -764,6 +766,22 @@ pdfjs-views-manager-status-warning-copy-label = Couldnt copy. Refresh page an
pdfjs-views-manager-status-warning-delete-label = Couldnt delete. Refresh page and try again. pdfjs-views-manager-status-warning-delete-label = Couldnt delete. Refresh page and try again.
pdfjs-views-manager-status-warning-save-label = Couldnt save. Refresh page and try again. pdfjs-views-manager-status-warning-save-label = Couldnt save. Refresh page and try again.
pdfjs-views-manager-status-undo-button-label = Undo pdfjs-views-manager-status-undo-button-label = Undo
pdfjs-views-manager-status-done-button-label = Done
pdfjs-views-manager-status-close-button = pdfjs-views-manager-status-close-button =
.title = Close .title = Close
pdfjs-views-manager-status-close-button-label = Close pdfjs-views-manager-status-close-button-label = Close
pdfjs-views-manager-paste-button-label = Paste
pdfjs-views-manager-paste-button-before =
.title = Paste before the first page
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Paste after page { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NEW
pdfjs-views-manager-waiting-for-file = Uploading file…

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniaturo de paĝo { $page } .aria-label = Miniaturo de paĝo { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Elekti paĝon { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Paĝo { $page } el { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -214,7 +223,7 @@ pdfjs-find-next-button =
.title = Serĉi la venontan aperon de la frazo .title = Serĉi la venontan aperon de la frazo
pdfjs-find-next-button-label = Antaŭen pdfjs-find-next-button-label = Antaŭen
pdfjs-find-highlight-checkbox = Elstarigi ĉiujn pdfjs-find-highlight-checkbox = Elstarigi ĉiujn
pdfjs-find-match-case-checkbox-label = Distingi inter majuskloj kaj minuskloj pdfjs-find-match-case-checkbox-label = Distingi usklecon
pdfjs-find-match-diacritics-checkbox-label = Respekti supersignojn pdfjs-find-match-diacritics-checkbox-label = Respekti supersignojn
pdfjs-find-entire-word-checkbox-label = Tutaj vortoj pdfjs-find-entire-word-checkbox-label = Tutaj vortoj
pdfjs-find-reached-top = Komenco de la dokumento atingita, daŭrigado ekde la fino pdfjs-find-reached-top = Komenco de la dokumento atingita, daŭrigado ekde la fino
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Teksto forigita
pdfjs-editor-undo-bar-message-ink = Desegno forigita pdfjs-editor-undo-bar-message-ink = Desegno forigita
pdfjs-editor-undo-bar-message-stamp = Bildo forigita pdfjs-editor-undo-bar-message-stamp = Bildo forigita
pdfjs-editor-undo-bar-message-signature = Subskribo forigita pdfjs-editor-undo-bar-message-signature = Subskribo forigita
pdfjs-editor-undo-bar-message-comment = Komento forigita
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Nuligi
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Aldoni komenton .title = Aldoni komenton
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Montri/kaŝi flankan strion (la dokumento enhavas miniaturojn/konturon/kunsendaĵojn/tavolojn)
pdfjs-toggle-views-manager-button1-label = Administri paĝojn
pdfjs-views-manager-sidebar =
.aria-label = Flanka strio
pdfjs-views-manager-sidebar-resizer =
.aria-label = Dimensiigilo por la flanka strio
pdfjs-views-manager-view-selector-button =
.title = Vidoj
pdfjs-views-manager-view-selector-button-label = Vidoj
pdfjs-views-manager-pages-title = Paĝoj
pdfjs-views-manager-outlines-title1 = Konturo de dokumento
.title = Konturo de dokumento (alklaku duoble por faldi/malfaldi ĉiujn elementojn)
pdfjs-views-manager-attachments-title = Kunsendaĵoj
pdfjs-views-manager-layers-title1 = Tavoloj
.title = Tavoloj (alklaku duoble por ke ĉiuj tavoloj reiru al la norma stato)
pdfjs-views-manager-pages-option-label = Paĝoj
pdfjs-views-manager-outlines-option-label = Konturo de dokumento
pdfjs-views-manager-attachments-option-label = Kunsendaĵoj
pdfjs-views-manager-layers-option-label = Tavoloj
pdfjs-views-manager-add-file-button =
.title = Aldoni dosieron
pdfjs-views-manager-add-file-button-label = Aldoni dosieron
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } elektita
*[other] { $count } elektitaj
}
pdfjs-views-manager-pages-status-none-action-label = Elekti paĝojn
pdfjs-views-manager-pages-status-action-button-label = Administri
pdfjs-views-manager-pages-status-copy-button-label = Kopii
pdfjs-views-manager-pages-status-cut-button-label = Eltondi
pdfjs-views-manager-pages-status-delete-button-label = Forigi
pdfjs-views-manager-pages-status-export-selected-button-label = Eksporti elektitajn…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 paĝo eltondita
*[other] { $count } paĝoj eltonditaj
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 paĝo kopiita
*[other] { $count } paĝoj kopiitaj
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 paĝo forigita
*[other] { $count } paĝoj forigitaj
}
pdfjs-views-manager-pages-status-waiting-ready-label = Pretigo de via dosiero…
pdfjs-views-manager-pages-status-waiting-uploading-label = Dosiero alŝutata…
pdfjs-views-manager-status-warning-cut-label = Ne eblis eltondi. Refreŝigu la paĝon kaj provu denove.
pdfjs-views-manager-status-warning-copy-label = Ne eblis kopii. Refreŝigu la paĝon kaj provu denove.
pdfjs-views-manager-status-warning-delete-label = Ne eblis forigi. Refreŝigu la paĝon kaj provu denove.
pdfjs-views-manager-status-warning-save-label = Ne eblis konservi. Refreŝigu la paĝon kaj provu denove.
pdfjs-views-manager-status-undo-button-label = Malfari
pdfjs-views-manager-status-done-button-label = Farita
pdfjs-views-manager-status-close-button =
.title = Fermi
pdfjs-views-manager-status-close-button-label = Fermi
pdfjs-views-manager-paste-button-label = Alglui
pdfjs-views-manager-paste-button-before =
.title = Alglui antaŭ la unua paĝo
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Alglui post la paĝo { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOVA
pdfjs-views-manager-waiting-for-file = Dosiero alŝutata…
pdfjs-toggle-views-manager-button1 =
.title = Administri paĝojn
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura de página { $page } .aria-label = Miniatura de página { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seleccionar página { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Página { $page } de { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Texto eliminado
pdfjs-editor-undo-bar-message-ink = Dibujo eliminado pdfjs-editor-undo-bar-message-ink = Dibujo eliminado
pdfjs-editor-undo-bar-message-stamp = Imagen eliminado pdfjs-editor-undo-bar-message-stamp = Imagen eliminado
pdfjs-editor-undo-bar-message-signature = Firma eliminada pdfjs-editor-undo-bar-message-signature = Firma eliminada
pdfjs-editor-undo-bar-message-comment = Comentario eliminado
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancelar
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Agregar comentario .title = Agregar comentario
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Alternar barra lateral (el documento contiene miniaturas/esquemas/adjuntos/capas)
pdfjs-toggle-views-manager-button1-label = Administrar páginas
pdfjs-views-manager-sidebar =
.aria-label = Barra lateral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Redimensionador de barra lateral
pdfjs-views-manager-view-selector-button =
.title = Vistas
pdfjs-views-manager-view-selector-button-label = Vistas
pdfjs-views-manager-pages-title = Páginas
pdfjs-views-manager-outlines-title1 = Esquema del documento
.title = Esquema del documento (doble clic para expandir/colapsar todos los ítems)
pdfjs-views-manager-attachments-title = Adjuntos
pdfjs-views-manager-layers-title1 = Capas
.title = Capas (doble clic para restablecer todas las cañas al estado predeterminado)
pdfjs-views-manager-pages-option-label = Páginas
pdfjs-views-manager-outlines-option-label = Esquema del documento
pdfjs-views-manager-attachments-option-label = Adjuntos
pdfjs-views-manager-layers-option-label = Capas
pdfjs-views-manager-add-file-button =
.title = Agregar archivo
pdfjs-views-manager-add-file-button-label = Agregar archivo
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } seleccionada
*[other] { $count } seleccionadas
}
pdfjs-views-manager-pages-status-none-action-label = Seleccionar páginas
pdfjs-views-manager-pages-status-action-button-label = Administrar
pdfjs-views-manager-pages-status-copy-button-label = Copiar
pdfjs-views-manager-pages-status-cut-button-label = Cortar
pdfjs-views-manager-pages-status-delete-button-label = Borrar
pdfjs-views-manager-pages-status-export-selected-button-label = Exportar seleccionado…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 página cortada
*[other] { $count } páginas cortadas
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 página copiada
*[other] { $count } páginas copiadas
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 página borrada
*[other] { $count } páginas borradas
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparando el archivo…
pdfjs-views-manager-pages-status-waiting-uploading-label = Subiendo el archivo…
pdfjs-views-manager-status-warning-cut-label = No se pudo cortar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-copy-label = No se pudo copiar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-delete-label = No se pudo borrar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-save-label = No se pudo guardar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-undo-button-label = Deshacer
pdfjs-views-manager-status-done-button-label = Listo
pdfjs-views-manager-status-close-button =
.title = Cerrar
pdfjs-views-manager-status-close-button-label = Cerrar
pdfjs-views-manager-paste-button-label = Pegar
pdfjs-views-manager-paste-button-before =
.title = Pegar antes de la primera página
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Pegar después de la página { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NUEVO
pdfjs-views-manager-waiting-for-file = Subiendo archivo…
pdfjs-toggle-views-manager-button1 =
.title = Administrar páginas
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura de la página { $page } .aria-label = Miniatura de la página { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Selecciona la página { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Página { $page } de { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Texto eliminado
pdfjs-editor-undo-bar-message-ink = Dibujo eliminado pdfjs-editor-undo-bar-message-ink = Dibujo eliminado
pdfjs-editor-undo-bar-message-stamp = Imagen eliminada pdfjs-editor-undo-bar-message-stamp = Imagen eliminada
pdfjs-editor-undo-bar-message-signature = Firma eliminada pdfjs-editor-undo-bar-message-signature = Firma eliminada
pdfjs-editor-undo-bar-message-comment = Comentario eliminado
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancelar
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Añadir comentario .title = Añadir comentario
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Cambiar barra lateral (índice de contenidos del documento/miniaturas/adjuntos/capas)
pdfjs-toggle-views-manager-button1-label = Gestionar páginas
pdfjs-views-manager-sidebar =
.aria-label = Barra lateral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Redimensionador de la barra lateral
pdfjs-views-manager-view-selector-button =
.title = Vistas
pdfjs-views-manager-view-selector-button-label = Vistas
pdfjs-views-manager-pages-title = Páginas
pdfjs-views-manager-outlines-title1 = Esquema del documento
.title = Esquema del documento (doble clic para expandir/contraer todos los elementos)
pdfjs-views-manager-attachments-title = Adjuntos
pdfjs-views-manager-layers-title1 = Capas
.title = Capas (doble clic para restablecer todas las capas a su estado predeterminado)
pdfjs-views-manager-pages-option-label = Páginas
pdfjs-views-manager-outlines-option-label = Esquema del documento
pdfjs-views-manager-attachments-option-label = Adjuntos
pdfjs-views-manager-layers-option-label = Capas
pdfjs-views-manager-add-file-button =
.title = Añadir archivo
pdfjs-views-manager-add-file-button-label = Añadir archivo
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } seleccionado
*[other] { $count } seleccionados
}
pdfjs-views-manager-pages-status-none-action-label = Seleccionar páginas
pdfjs-views-manager-pages-status-action-button-label = Administrar
pdfjs-views-manager-pages-status-copy-button-label = Copiar
pdfjs-views-manager-pages-status-cut-button-label = Cortar
pdfjs-views-manager-pages-status-delete-button-label = Eliminar
pdfjs-views-manager-pages-status-export-selected-button-label = Exportar selección…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 página cortada
*[other] { $count } páginas cortadas
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 página copiada
*[other] { $count } páginas copiadas
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 página eliminada
*[other] { $count } páginas eliminadas
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparando tu archivo…
pdfjs-views-manager-pages-status-waiting-uploading-label = Subiendo archivo…
pdfjs-views-manager-status-warning-cut-label = No se pudo cortar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-copy-label = No se pudo copiar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-delete-label = No se pudo eliminar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-save-label = No se pudo guardar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-undo-button-label = Deshacer
pdfjs-views-manager-status-done-button-label = Hecho
pdfjs-views-manager-status-close-button =
.title = Cerrar
pdfjs-views-manager-status-close-button-label = Cerrar
pdfjs-views-manager-paste-button-label = Pegar
pdfjs-views-manager-paste-button-before =
.title = Pegar antes de la primera página
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Pegar después de la página { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NUEVO
pdfjs-views-manager-waiting-for-file = Subiendo archivo…
pdfjs-toggle-views-manager-button1 =
.title = Gestionar páginas
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura de la página { $page } .aria-label = Miniatura de la página { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seleccionar página { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Página { $page } de { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Texto eliminado
pdfjs-editor-undo-bar-message-ink = Dibujo eliminado pdfjs-editor-undo-bar-message-ink = Dibujo eliminado
pdfjs-editor-undo-bar-message-stamp = Imagen eliminada pdfjs-editor-undo-bar-message-stamp = Imagen eliminada
pdfjs-editor-undo-bar-message-signature = Firma eliminada pdfjs-editor-undo-bar-message-signature = Firma eliminada
pdfjs-editor-undo-bar-message-comment = Comentario eliminado
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancelar
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Añadir comentario .title = Añadir comentario
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Alternar barra lateral (el documento contiene miniaturas/esquemas/adjuntos/capas)
pdfjs-toggle-views-manager-button1-label = Administrar páginas
pdfjs-views-manager-sidebar =
.aria-label = Barra lateral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Redimensionador de la barra lateral
pdfjs-views-manager-view-selector-button =
.title = Vistas
pdfjs-views-manager-view-selector-button-label = Vistas
pdfjs-views-manager-pages-title = Páginas
pdfjs-views-manager-outlines-title1 = Esquema del documento
.title = Esquema del documento (doble-clic para expandir/contraer todos los elementos)
pdfjs-views-manager-attachments-title = Adjuntos
pdfjs-views-manager-layers-title1 = Capas
.title = Capas (doble clic para restablecer todas las capas a su estado predeterminado)
pdfjs-views-manager-pages-option-label = Páginas
pdfjs-views-manager-outlines-option-label = Esquema del documento
pdfjs-views-manager-attachments-option-label = Adjuntos
pdfjs-views-manager-layers-option-label = Capas
pdfjs-views-manager-add-file-button =
.title = Añadir archivo
pdfjs-views-manager-add-file-button-label = Añadir archivo
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } seleccionado
*[other] { $count } seleccionados
}
pdfjs-views-manager-pages-status-none-action-label = Seleccionar páginas
pdfjs-views-manager-pages-status-action-button-label = Administrar
pdfjs-views-manager-pages-status-copy-button-label = Copiar
pdfjs-views-manager-pages-status-cut-button-label = Cortar
pdfjs-views-manager-pages-status-delete-button-label = Eliminar
pdfjs-views-manager-pages-status-export-selected-button-label = Exportar selección…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 página cortada
*[other] { $count } páginas cortadas
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 página copiada
*[other] { $count } páginas cortadas
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 página eliminada
*[other] { $count } páginas eliminadas
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparando su archivo…
pdfjs-views-manager-pages-status-waiting-uploading-label = Subiendo el archivo…
pdfjs-views-manager-status-warning-cut-label = No se pudo cortar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-copy-label = No se pudo copiar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-delete-label = No se pudo cortar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-warning-save-label = No se pudo cortar. Refresque la página y pruebe de nuevo.
pdfjs-views-manager-status-undo-button-label = Deshacer
pdfjs-views-manager-status-done-button-label = Hecho
pdfjs-views-manager-status-close-button =
.title = Cerrar
pdfjs-views-manager-status-close-button-label = Cerrar
pdfjs-views-manager-paste-button-label = Pegar
pdfjs-views-manager-paste-button-before =
.title = Pegar antes de la primera página
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Pegar después de la página { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NUEVO
pdfjs-views-manager-waiting-for-file = Subiendo el archivo…
pdfjs-toggle-views-manager-button1 =
.title = Administrar páginas
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura de la página { $page } .aria-label = Miniatura de la página { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seleccionar página { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Página { $page } de { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Texto eliminado
pdfjs-editor-undo-bar-message-ink = Dibujo eliminado pdfjs-editor-undo-bar-message-ink = Dibujo eliminado
pdfjs-editor-undo-bar-message-stamp = Imagen eliminada pdfjs-editor-undo-bar-message-stamp = Imagen eliminada
pdfjs-editor-undo-bar-message-signature = Firma eliminada pdfjs-editor-undo-bar-message-signature = Firma eliminada
pdfjs-editor-undo-bar-message-comment = Comentario eliminado
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancelar
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Añadir comentario .title = Añadir comentario
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Cambiar barra lateral (índice de contenidos del documento/miniaturas/adjuntos/capas)
pdfjs-toggle-views-manager-button1-label = Administrar páginas
pdfjs-views-manager-sidebar =
.aria-label = Barra lateral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Cambiar tamaño de la barra lateral
pdfjs-views-manager-view-selector-button =
.title = Vistas
pdfjs-views-manager-view-selector-button-label = Vistas
pdfjs-views-manager-pages-title = Páginas
pdfjs-views-manager-outlines-title1 = Esquema del documento
.title = Esquema del documento (haz doble clic para expandir/contraer todos los elementos)
pdfjs-views-manager-attachments-title = Adjuntos
pdfjs-views-manager-layers-title1 = Capas
.title = Capas (haz doble clic para restablecer todas las capas a su estado predeterminado)
pdfjs-views-manager-pages-option-label = Páginas
pdfjs-views-manager-outlines-option-label = Esquema del documento
pdfjs-views-manager-attachments-option-label = Adjuntos
pdfjs-views-manager-layers-option-label = Capas
pdfjs-views-manager-add-file-button =
.title = Agregar archivo
pdfjs-views-manager-add-file-button-label = Agregar archivo
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } seleccionado
*[other] { $count } seleccionados
}
pdfjs-views-manager-pages-status-none-action-label = Seleccionar páginas
pdfjs-views-manager-pages-status-action-button-label = Administrar
pdfjs-views-manager-pages-status-copy-button-label = Copiar
pdfjs-views-manager-pages-status-cut-button-label = Cortar
pdfjs-views-manager-pages-status-delete-button-label = Eliminar
pdfjs-views-manager-pages-status-export-selected-button-label = Exportar seleccionado…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 página cortada
*[other] { $count } páginas cortadas
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 pagina copiada
*[other] { $count } paginas copiadas
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 pagina eliminada
*[other] { $count } paginas eliminadas
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparando tu archivo…
pdfjs-views-manager-pages-status-waiting-uploading-label = Subiendo archivo…
pdfjs-views-manager-status-warning-cut-label = No se pudo cortar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-copy-label = No se pudo pegar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-delete-label = No se pudo eliminar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-warning-save-label = No se pudo guardar. Actualiza la página y vuelve a intentarlo.
pdfjs-views-manager-status-undo-button-label = Deshacer
pdfjs-views-manager-status-done-button-label = Hecho
pdfjs-views-manager-status-close-button =
.title = Cerrar
pdfjs-views-manager-status-close-button-label = Cerrar
pdfjs-views-manager-paste-button-label = Pegar
pdfjs-views-manager-paste-button-before =
.title = Pegar antes de la primera página
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Pegar después de la página { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NUEVO
pdfjs-views-manager-waiting-for-file = Subiendo archivo…
pdfjs-toggle-views-manager-button1 =
.title = Administrar páginas
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -21,7 +21,7 @@ pdfjs-of-pages = / { $pagesCount }
# Variables: # Variables:
# $pageNumber (Number) - the currently visible page # $pageNumber (Number) - the currently visible page
# $pagesCount (Number) - the total number of pages in the document # $pagesCount (Number) - the total number of pages in the document
pdfjs-page-of-pages = { $pagesCount }/{ $pageNumber } pdfjs-page-of-pages = ({ $pageNumber } / { $pagesCount })
pdfjs-zoom-out-button = pdfjs-zoom-out-button =
.title = Urrundu zooma .title = Urrundu zooma
pdfjs-zoom-out-button-label = Urrundu zooma pdfjs-zoom-out-button-label = Urrundu zooma
@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = { $page }. orriaren koadro txikia .aria-label = { $page }. orriaren koadro txikia
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Hautatu { $page } orria
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = { $page } / { $total } orria
## Find panel button title and messages ## Find panel button title and messages
@ -224,8 +233,8 @@ pdfjs-find-reached-bottom = Dokumentuaren bukaerara heldu da, hasieratik jarrait
# $total (Number) - the total number of matches in the document # $total (Number) - the total number of matches in the document
pdfjs-find-match-count = pdfjs-find-match-count =
{ $total -> { $total ->
[one] { $total }/{ $current }. bat-etortzea [one] { $current }/{ $total } bat-etortzea
*[other] { $total }/{ $current }. bat-etortzea *[other] { $current }/{ $total } bat-etortzea
} }
# Variables: # Variables:
# $limit (Number) - the maximum number of matches # $limit (Number) - the maximum number of matches
@ -479,8 +488,8 @@ pdfjs-editor-new-alt-text-error-close-button = Itxi
# Variables: # Variables:
# $totalSize (Number) - the total size (in MB) of the AI model. # $totalSize (Number) - the total size (in MB) of the AI model.
# $downloadedSize (Number) - the downloaded size (in MB) of the AI model. # $downloadedSize (Number) - the downloaded size (in MB) of the AI model.
pdfjs-editor-new-alt-text-ai-model-downloading-progress = Testu alternatiboaren AA modeloa deskargatzen ({ $totalSize }/{ $downloadedSize } MB) pdfjs-editor-new-alt-text-ai-model-downloading-progress = Testu alternatiboaren AA modeloa deskargatzen ({ $downloadedSize }/{ $totalSize } MB)
.aria-valuetext = Testu alternatiboaren AA modeloa deskargatzen ({ $totalSize }/{ $downloadedSize } MB) .aria-valuetext = Testu alternatiboaren AA modeloa deskargatzen ({ $downloadedSize }/{ $totalSize } MB)
# This is a button that users can click to edit the alt text they have already added. # This is a button that users can click to edit the alt text they have already added.
pdfjs-editor-new-alt-text-added-button = pdfjs-editor-new-alt-text-added-button =
.aria-label = Testu alternatiboa gehituta .aria-label = Testu alternatiboa gehituta
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Testua kenduta
pdfjs-editor-undo-bar-message-ink = Marrazkia kenduta pdfjs-editor-undo-bar-message-ink = Marrazkia kenduta
pdfjs-editor-undo-bar-message-stamp = Irudia kenduta pdfjs-editor-undo-bar-message-stamp = Irudia kenduta
pdfjs-editor-undo-bar-message-signature = Sinadura kenduta pdfjs-editor-undo-bar-message-signature = Sinadura kenduta
pdfjs-editor-undo-bar-message-comment = Iruzkina kenduta
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -637,6 +647,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Utzi
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Gehitu iruzkina .title = Gehitu iruzkina
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Txandakatu alboko barra (dokumentuak koadro txikiak/eskema/eranskinak/geruzak ditu)
pdfjs-toggle-views-manager-button1-label = Kudeatu orriak
pdfjs-views-manager-sidebar =
.aria-label = Alboko barra
pdfjs-views-manager-sidebar-resizer =
.aria-label = Alboko barra neurriz aldatzekoa
pdfjs-views-manager-view-selector-button =
.title = Ikuspegiak
pdfjs-views-manager-view-selector-button-label = Ikuspegiak
pdfjs-views-manager-pages-title = Orriak
pdfjs-views-manager-outlines-title1 = Dokumentuaren eskema
.title = Dokumentuaren eskema (klik bikoitza elementu guztiak zabaltzeko/tolesteko)
pdfjs-views-manager-attachments-title = Eranskinak
pdfjs-views-manager-layers-title1 = Geruzak
.title = Geruzak (klik bikoitza geruza guztiak egoera lehenetsira berrezartzeko)
pdfjs-views-manager-pages-option-label = Orriak
pdfjs-views-manager-outlines-option-label = Dokumentuaren eskema
pdfjs-views-manager-attachments-option-label = Eranskinak
pdfjs-views-manager-layers-option-label = Geruzak
pdfjs-views-manager-add-file-button =
.title = Gehitu fitxategia
pdfjs-views-manager-add-file-button-label = Gehitu fitxategia
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } hautatuta
*[other] { $count } hautatuta
}
pdfjs-views-manager-pages-status-none-action-label = Hautatu orriak
pdfjs-views-manager-pages-status-action-button-label = Kudeatu
pdfjs-views-manager-pages-status-copy-button-label = Kopiatu
pdfjs-views-manager-pages-status-cut-button-label = Ebaki
pdfjs-views-manager-pages-status-delete-button-label = Ezabatu
pdfjs-views-manager-pages-status-export-selected-button-label = Esportatu hautatutakoa…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] Orri bat moztuta
*[other] { $count } orri moztuta
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] Orri bat kopiatuta
*[other] { $count } orri kopiatuta
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] Orri bat ezabatuta
*[other] { $count } orri ezabatuta
}
pdfjs-views-manager-pages-status-waiting-ready-label = Zuee fitxategia prestatzen…
pdfjs-views-manager-pages-status-waiting-uploading-label = Fitxategia igotzen…
pdfjs-views-manager-status-warning-cut-label = Ezin da moztu. Berritu orria eta saiatu berriro.
pdfjs-views-manager-status-warning-copy-label = Ezin da kopiatu. Berritu orria eta saiatu berriro.
pdfjs-views-manager-status-warning-delete-label = Ezin da ezabatu. Berritu orria eta saiatu berriro.
pdfjs-views-manager-status-warning-save-label = Ezin da gorde. Berritu orria eta saiatu berriro.
pdfjs-views-manager-status-undo-button-label = Desegin
pdfjs-views-manager-status-done-button-label = Eginda
pdfjs-views-manager-status-close-button =
.title = Itxi
pdfjs-views-manager-status-close-button-label = Itxi
pdfjs-views-manager-paste-button-label = Itsatsi
pdfjs-views-manager-paste-button-before =
.title = Itsatsi lehen orriaren aurretik
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Itsatsi { $page }. orriaren aurretik
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = BERRIA
pdfjs-views-manager-waiting-for-file = Fitxategia igotzen…
pdfjs-toggle-views-manager-button1 =
.title = Kudeatu orriak
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Pienoiskuva sivusta { $page } .aria-label = Pienoiskuva sivusta { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Valitse sivu { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Sivu { $page }/{ $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Teksti poistettu
pdfjs-editor-undo-bar-message-ink = Piirustus poistettu pdfjs-editor-undo-bar-message-ink = Piirustus poistettu
pdfjs-editor-undo-bar-message-stamp = Kuva poistettu pdfjs-editor-undo-bar-message-stamp = Kuva poistettu
pdfjs-editor-undo-bar-message-signature = Allekirjoitus poistettu pdfjs-editor-undo-bar-message-signature = Allekirjoitus poistettu
pdfjs-editor-undo-bar-message-comment = Kommentti poistettu
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Peruuta
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Lisää kommentti .title = Lisää kommentti
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Näytä/piilota sivupaneeli (dokumentissa on pienoiskuvat/sisällys/liitteitä/tasoja)
pdfjs-toggle-views-manager-button1-label = Hallitse sivuja
pdfjs-views-manager-sidebar =
.aria-label = Sivupaneeli
pdfjs-views-manager-sidebar-resizer =
.aria-label = Sivupaneelin koon muuttaja
pdfjs-views-manager-view-selector-button =
.title = Näkymät
pdfjs-views-manager-view-selector-button-label = Näkymät
pdfjs-views-manager-pages-title = Sivut
pdfjs-views-manager-outlines-title1 = Dokumentin sisällys
.title = Dokumentin sisällys (napsauta kahdesti laajentaaksesi/supistaaksesi kohteet)
pdfjs-views-manager-attachments-title = Liitteet
pdfjs-views-manager-layers-title1 = Tasot
.title = Tasot (napsauta kahdesti nollataksesi tasot niiden oletustilaan)
pdfjs-views-manager-pages-option-label = Sivut
pdfjs-views-manager-outlines-option-label = Dokumentin sisällys
pdfjs-views-manager-attachments-option-label = Liitteet
pdfjs-views-manager-layers-option-label = Tasot
pdfjs-views-manager-add-file-button =
.title = Lisää tiedosto
pdfjs-views-manager-add-file-button-label = Lisää tiedosto
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } valittu
*[other] { $count } valittu
}
pdfjs-views-manager-pages-status-none-action-label = Valitse sivut
pdfjs-views-manager-pages-status-action-button-label = Hallitse
pdfjs-views-manager-pages-status-copy-button-label = Kopioi
pdfjs-views-manager-pages-status-cut-button-label = Leikkaa
pdfjs-views-manager-pages-status-delete-button-label = Poista
pdfjs-views-manager-pages-status-export-selected-button-label = Vie valitut…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 sivu leikattu
*[other] { $count } sivua leikattu
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 sivu kopioitu
*[other] { $count } sivua kopioitu
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 sivu poistettu
*[other] { $count } sivua poistettu
}
pdfjs-views-manager-pages-status-waiting-ready-label = Tiedostoa valmistellaan…
pdfjs-views-manager-pages-status-waiting-uploading-label = Lähetetään tiedostoa…
pdfjs-views-manager-status-warning-cut-label = Leikkaaminen epäonnistui. Päivitä sivu ja yritä uudelleen.
pdfjs-views-manager-status-warning-copy-label = Kopiointi epäonnistui. Päivitä sivu ja yritä uudelleen.
pdfjs-views-manager-status-warning-delete-label = Poisto epäonnistui. Päivitä sivu ja yritä uudelleen.
pdfjs-views-manager-status-warning-save-label = Tallentaminen epäonnistui. Päivitä sivu ja yritä uudelleen.
pdfjs-views-manager-status-undo-button-label = Kumoa
pdfjs-views-manager-status-done-button-label = Valmis
pdfjs-views-manager-status-close-button =
.title = Sulje
pdfjs-views-manager-status-close-button-label = Sulje
pdfjs-views-manager-paste-button-label = Liitä
pdfjs-views-manager-paste-button-before =
.title = Liitä ennen ensimmäistä sivua
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Liitä sivun { $page } jälkeen
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = UUTTA
pdfjs-views-manager-waiting-for-file = Lähetetään tiedostoa…
pdfjs-toggle-views-manager-button1 =
.title = Hallitse sivuja
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Vignette de la page { $page } .aria-label = Vignette de la page { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Sélectionner la page { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Page { $page } sur { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -530,6 +539,7 @@ pdfjs-editor-undo-bar-message-freetext = Texte supprimé
pdfjs-editor-undo-bar-message-ink = Dessin supprimé pdfjs-editor-undo-bar-message-ink = Dessin supprimé
pdfjs-editor-undo-bar-message-stamp = Image supprimée pdfjs-editor-undo-bar-message-stamp = Image supprimée
pdfjs-editor-undo-bar-message-signature = Signature retirée pdfjs-editor-undo-bar-message-signature = Signature retirée
pdfjs-editor-undo-bar-message-comment = Commentaire supprimé
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -629,6 +639,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Annuler
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Ajouter un commentaire .title = Ajouter un commentaire
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Afficher/Masquer le panneau latéral (le document contient des vignettes/plan/pièces jointes/calques)
pdfjs-toggle-views-manager-button1-label = Gérer les pages
pdfjs-views-manager-sidebar =
.aria-label = Panneau latéral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Redimensionner le panneau latéral
pdfjs-views-manager-view-selector-button =
.title = Vues
pdfjs-views-manager-view-selector-button-label = Vues
pdfjs-views-manager-pages-title = Pages
pdfjs-views-manager-outlines-title1 = Structure du document
.title = Structure du document (double-cliquer pour développer/réduire tous les éléments)
pdfjs-views-manager-attachments-title = Pièces jointes
pdfjs-views-manager-layers-title1 = Calques
.title = Calques (double-cliquer pour réinitialiser tous les calques à leur état par défaut)
pdfjs-views-manager-pages-option-label = Pages
pdfjs-views-manager-outlines-option-label = Signets du document
pdfjs-views-manager-attachments-option-label = Pièces jointes
pdfjs-views-manager-layers-option-label = Calques
pdfjs-views-manager-add-file-button =
.title = Ajouter un fichier
pdfjs-views-manager-add-file-button-label = Ajouter un fichier
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } page sélectionnée
*[other] { $count } pages sélectionnées
}
pdfjs-views-manager-pages-status-none-action-label = Sélectionner des pages
pdfjs-views-manager-pages-status-action-button-label = Gérer
pdfjs-views-manager-pages-status-copy-button-label = Copier
pdfjs-views-manager-pages-status-cut-button-label = Couper
pdfjs-views-manager-pages-status-delete-button-label = Supprimer
pdfjs-views-manager-pages-status-export-selected-button-label = Exporter la sélection…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 page coupée
*[other] { $count } pages coupées
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 page copiée
*[other] { $count } pages copiées
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 page supprimée
*[other] { $count } pages supprimées
}
pdfjs-views-manager-pages-status-waiting-ready-label = Préparation de votre fichier…
pdfjs-views-manager-pages-status-waiting-uploading-label = Envoi du fichier…
pdfjs-views-manager-status-warning-cut-label = Impossible de couper. Actualisez la page et essayez à nouveau.
pdfjs-views-manager-status-warning-copy-label = Copie impossible. Actualisez la page et essayez à nouveau.
pdfjs-views-manager-status-warning-delete-label = Suppression impossible. Actualisez la page et essayez à nouveau.
pdfjs-views-manager-status-warning-save-label = Enregistrement impossible. Actualisez la page et essayez à nouveau.
pdfjs-views-manager-status-undo-button-label = Annuler
pdfjs-views-manager-status-done-button-label = Terminer
pdfjs-views-manager-status-close-button =
.title = Fermer
pdfjs-views-manager-status-close-button-label = Fermer
pdfjs-views-manager-paste-button-label = Coller
pdfjs-views-manager-paste-button-before =
.title = Coller avant la première page
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Coller après la page { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOUVEAU
pdfjs-views-manager-waiting-for-file = Envoi du fichier…
pdfjs-toggle-views-manager-button1 =
.title = Gérer les pages
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -628,6 +628,11 @@ pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = Scomence a scrivi… .placeholder = Scomence a scrivi…
pdfjs-editor-edit-comment-dialog-cancel-button = Anule pdfjs-editor-edit-comment-dialog-cancel-button = Anule
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = Zonte coment
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatuer fan side { $page } .aria-label = Miniatuer fan side { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Side { $page } selektearje
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Side { $page } fan { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Tekst fuortsmiten
pdfjs-editor-undo-bar-message-ink = Tekening fuortsmiten pdfjs-editor-undo-bar-message-ink = Tekening fuortsmiten
pdfjs-editor-undo-bar-message-stamp = Ofbylding fuortsmiten pdfjs-editor-undo-bar-message-stamp = Ofbylding fuortsmiten
pdfjs-editor-undo-bar-message-signature = Hantekening fuortsmiten pdfjs-editor-undo-bar-message-signature = Hantekening fuortsmiten
pdfjs-editor-undo-bar-message-comment = Opmerking fuortsmiten
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Annulearje
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Opmerking tafoegje .title = Opmerking tafoegje
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Sidebalke yn-/útskeakelje (dokumint befettet miniatueren/oersjoch/bylagen/lagen)
pdfjs-toggle-views-manager-button1-label = Siden beheare
pdfjs-views-manager-sidebar =
.aria-label = Sidebalke
pdfjs-views-manager-sidebar-resizer =
.aria-label = Gruttewiziging sydbalke
pdfjs-views-manager-view-selector-button =
.title = Werjeften
pdfjs-views-manager-view-selector-button-label = Werjeften
pdfjs-views-manager-pages-title = Siden
pdfjs-views-manager-outlines-title1 = Dokumintoersjoch
.title = Dokumintoersjoch (dûbelklik om alle items út/yn te klappen)
pdfjs-views-manager-attachments-title = Bylagen
pdfjs-views-manager-layers-title1 = Lagen
.title = Lagen (dûbelklik om alle lagen nei de standertstatus werom te setten)
pdfjs-views-manager-pages-option-label = Siden
pdfjs-views-manager-outlines-option-label = Dokumintoersjoch
pdfjs-views-manager-attachments-option-label = Bylagen
pdfjs-views-manager-layers-option-label = Lagen
pdfjs-views-manager-add-file-button =
.title = Bestân tafoegje
pdfjs-views-manager-add-file-button-label = Bestân tafoegje
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } selektearre
*[other] { $count } selektearre
}
pdfjs-views-manager-pages-status-none-action-label = Siden selektearje
pdfjs-views-manager-pages-status-action-button-label = Beheare
pdfjs-views-manager-pages-status-copy-button-label = Kopiearje
pdfjs-views-manager-pages-status-cut-button-label = Knippe
pdfjs-views-manager-pages-status-delete-button-label = Fuortsmite
pdfjs-views-manager-pages-status-export-selected-button-label = Selektearre eksportearje…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 side knipt
*[other] { $count } siden knipt
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 side kopiearre
*[other] { $count } siden kopiearre
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 side fuortsmiten
*[other] { $count } siden fuortsmiten
}
pdfjs-views-manager-pages-status-waiting-ready-label = Jo bestân tariede…
pdfjs-views-manager-pages-status-waiting-uploading-label = Bestân oplade…
pdfjs-views-manager-status-warning-cut-label = Kin net knippe. Ferfarskje de side en probearje it opnij.
pdfjs-views-manager-status-warning-copy-label = Kin net kopiearje. Ferfarskje de side en probearje it opnij.
pdfjs-views-manager-status-warning-delete-label = Kin net fuortsmite. Ferfarskje de side en probearje it opnij.
pdfjs-views-manager-status-warning-save-label = Kin net bewarje. Ferfarskje de side en probearje it opnij.
pdfjs-views-manager-status-undo-button-label = Ungedien meitsje
pdfjs-views-manager-status-done-button-label = Dien
pdfjs-views-manager-status-close-button =
.title = Slute
pdfjs-views-manager-status-close-button-label = Slute
pdfjs-views-manager-paste-button-label = Plakke
pdfjs-views-manager-paste-button-before =
.title = Plakke foar de earste side
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Plakke nei side { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NIJ
pdfjs-views-manager-waiting-for-file = Bestân oplade…
pdfjs-toggle-views-manager-button1 =
.title = Siden beheare
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Kuatiarogue mbaemirĩ { $page } .aria-label = Kuatiarogue mbaemirĩ { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Eiporavo kuatiarogue { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Kuatiarogue { $page } { $total } mbae
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Moñeẽrã mboguepyre
pdfjs-editor-undo-bar-message-ink = Taãnga mboguepyre pdfjs-editor-undo-bar-message-ink = Taãnga mboguepyre
pdfjs-editor-undo-bar-message-stamp = Taãnga mboguepyre pdfjs-editor-undo-bar-message-stamp = Taãnga mboguepyre
pdfjs-editor-undo-bar-message-signature = Teraguapy mboguepyre pdfjs-editor-undo-bar-message-signature = Teraguapy mboguepyre
pdfjs-editor-undo-bar-message-comment = Jeepy mboguepyre
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -632,6 +642,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Eheja
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Jeerei mbojuaju .title = Jeerei mbojuaju
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Embojopyru tenda ykegua (kuatia oguereko mbaei, kuaakaha/moirũha/ñuãha)
pdfjs-toggle-views-manager-button1-label = Eñangareko kuotiarogue
pdfjs-views-manager-sidebar =
.aria-label = Taãngarupa yke
pdfjs-views-manager-sidebar-resizer =
.aria-label = Tuichakue mongueha tenda yképe
pdfjs-views-manager-view-selector-button =
.title = Hechaha
pdfjs-views-manager-view-selector-button-label = Hechaha
pdfjs-views-manager-pages-title = Kuatiarogue
pdfjs-views-manager-outlines-title1 = Kuatiaite jejapopy
.title = Kuatiaite jejapopy (eikutu joa emyasãi hag̃ua/emomichĩmbaite mbaeporuita)
pdfjs-views-manager-attachments-title = Moirũha
pdfjs-views-manager-layers-title1 = Ñuãhaita
.title = Ñuãhaita (eikutu joa erupaite jey hag̃ua ñuãhaita oĩ haguepevoi)
pdfjs-views-manager-pages-option-label = Kuatiarogueita
pdfjs-views-manager-outlines-option-label = Kuatiaite jejapopy
pdfjs-views-manager-attachments-option-label = Moirũhaita
pdfjs-views-manager-layers-option-label = Ñuãhaita
pdfjs-views-manager-add-file-button =
.title = Embojuaju marandurenda
pdfjs-views-manager-add-file-button-label = Embojuaju marandurenda
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } poravopyre
*[other] { $count } poravopyre
}
pdfjs-views-manager-pages-status-none-action-label = Eiporavo kuatiarogue
pdfjs-views-manager-pages-status-action-button-label = Ñangareko
pdfjs-views-manager-pages-status-copy-button-label = Monguatia
pdfjs-views-manager-pages-status-cut-button-label = Kytĩ
pdfjs-views-manager-pages-status-delete-button-label = Mboguete
pdfjs-views-manager-pages-status-export-selected-button-label = Eguerahauka poravopyre…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 kuatiarogue kytĩmbyre
*[other] { $count } kuatiarogue kytĩmbyre
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 kuatiarogue monguatiapyre
*[other] { $count } kuatiarogue monguatiapyre
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 kuatiarogue mboguepyre
*[other] { $count } kuatiarogue mboguepyre
}
pdfjs-views-manager-pages-status-waiting-ready-label = Embosakoihína ne marandurenda…
pdfjs-views-manager-pages-status-waiting-uploading-label = Ehupihína marandurenda…
pdfjs-views-manager-status-warning-cut-label = Ndaikatúi oñekytĩ. Embopyahu kuatiarogue ha ehaã jey.
pdfjs-views-manager-status-warning-copy-label = Ndaikatúi oñembokuatia. Embopyahu kuatiarogue ha ehaã jey.
pdfjs-views-manager-status-warning-delete-label = Ndaikatúi embogue. Embopyahu kuatiarogue ha ehaã jey.
pdfjs-views-manager-status-warning-save-label = Ndaikatúi eñongatu. Embopyahu kuatiarogue ha ehaã jey.
pdfjs-views-manager-status-undo-button-label = Mboguevi
pdfjs-views-manager-status-done-button-label = Oĩma
pdfjs-views-manager-status-close-button =
.title = Mboty
pdfjs-views-manager-status-close-button-label = Mboty
pdfjs-views-manager-paste-button-label = Mboja
pdfjs-views-manager-paste-button-before =
.title = Emboja togue peteĩha mboyve
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Emboja kuatiarogue { $page } rire
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = PYAHU
pdfjs-views-manager-waiting-for-file = Ehupihína marandurenda…
pdfjs-toggle-views-manager-button1 =
.title = Eñangareko kuotiarogue
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = תצוגה מקדימה של עמוד { $page } .aria-label = תצוגה מקדימה של עמוד { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = בחירת עמוד { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = עמוד { $page } מתוך { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = הטקסט הוסר
pdfjs-editor-undo-bar-message-ink = הציור הוסר pdfjs-editor-undo-bar-message-ink = הציור הוסר
pdfjs-editor-undo-bar-message-stamp = התמונה הוסרה pdfjs-editor-undo-bar-message-stamp = התמונה הוסרה
pdfjs-editor-undo-bar-message-signature = החתימה הוסרה pdfjs-editor-undo-bar-message-signature = החתימה הוסרה
pdfjs-editor-undo-bar-message-comment = ההערה הוסרה
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = ביטול
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = הוספת הערה .title = הוספת הערה
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = החלפת תצוגת סרגל צד (מסמך שמכיל תמונות ממוזערות/תוכן עניינים/קבצים מצורפים/שכבות)
pdfjs-toggle-views-manager-button1-label = ניהול עמודים
pdfjs-views-manager-sidebar =
.aria-label = סרגל צד
pdfjs-views-manager-sidebar-resizer =
.aria-label = שינוי גודל סרגל הצד
pdfjs-views-manager-view-selector-button =
.title = תצוגות
pdfjs-views-manager-view-selector-button-label = תצוגות
pdfjs-views-manager-pages-title = עמודים
pdfjs-views-manager-outlines-title1 = תוכן העניינים של המסמך
.title = הצגת תוכן העניינים של המסמך (יש ללחוץ לחיצה כפולה כדי להרחיב או לצמצם את כל הפריטים)
pdfjs-views-manager-attachments-title = קבצים מצורפים
pdfjs-views-manager-layers-title1 = שכבות
.title = הצגת שכבות (יש ללחוץ לחיצה כפולה כדי לאפס את כל השכבות למצב ברירת המחדל)
pdfjs-views-manager-pages-option-label = עמודים
pdfjs-views-manager-outlines-option-label = תוכן העניינים של המסמך
pdfjs-views-manager-attachments-option-label = קבצים מצורפים
pdfjs-views-manager-layers-option-label = שכבות
pdfjs-views-manager-add-file-button =
.title = הוספת קובץ
pdfjs-views-manager-add-file-button-label = הוספת קובץ
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] אחד נבחר
*[other] { $count } נבחרו
}
pdfjs-views-manager-pages-status-none-action-label = בחירת עמודים
pdfjs-views-manager-pages-status-action-button-label = ניהול
pdfjs-views-manager-pages-status-copy-button-label = העתקה
pdfjs-views-manager-pages-status-cut-button-label = גזירה
pdfjs-views-manager-pages-status-delete-button-label = מחיקה
pdfjs-views-manager-pages-status-export-selected-button-label = ייצוא הפריטים שנבחרו…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] עמוד אחד נגזר
*[other] { $count } עמודים נגזרו
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] עמוד אחד הועתק
*[other] { $count } עמודים הועתקו
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] עמוד אחד נמחק
*[other] { $count } עמודים נמחקו
}
pdfjs-views-manager-pages-status-waiting-ready-label = בתהליך הכנת הקובץ שלך…
pdfjs-views-manager-pages-status-waiting-uploading-label = בתהליך העלאת הקובץ…
pdfjs-views-manager-status-warning-cut-label = לא ניתן היה לגזור. נא לרענן את הדף ולנסות שוב.
pdfjs-views-manager-status-warning-copy-label = לא ניתן היה להעתיק. נא לרענן את הדף ולנסות שוב.
pdfjs-views-manager-status-warning-delete-label = לא ניתן היה למחוק. נא לרענן את הדף ולנסות שוב.
pdfjs-views-manager-status-warning-save-label = לא ניתן היה לשמור. נא לרענן את הדף ולנסות שוב.
pdfjs-views-manager-status-undo-button-label = ביטול פעולה
pdfjs-views-manager-status-done-button-label = סיום
pdfjs-views-manager-status-close-button =
.title = סגירה
pdfjs-views-manager-status-close-button-label = סגירה
pdfjs-views-manager-paste-button-label = הדבקה
pdfjs-views-manager-paste-button-before =
.title = להדביק לפני העמוד הראשון
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = להדביק אחרי עמוד { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = חדש
pdfjs-views-manager-waiting-for-file = בתהליך העלאת הקובץ…
pdfjs-toggle-views-manager-button1 =
.title = ניהול עמודים
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Minijatura stranice { $page } .aria-label = Minijatura stranice { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Odaberi stranicu { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Stranica { $page } od { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -537,6 +546,7 @@ pdfjs-editor-undo-bar-message-freetext = Tekst uklonjen
pdfjs-editor-undo-bar-message-ink = Crtež uklonjen pdfjs-editor-undo-bar-message-ink = Crtež uklonjen
pdfjs-editor-undo-bar-message-stamp = Slika uklonjena pdfjs-editor-undo-bar-message-stamp = Slika uklonjena
pdfjs-editor-undo-bar-message-signature = Potpis uklonjen pdfjs-editor-undo-bar-message-signature = Potpis uklonjen
pdfjs-editor-undo-bar-message-comment = Komentar je uklonjen
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -637,6 +647,67 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Odustani
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Dodaj komentar .title = Dodaj komentar
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-button1-label = Upravljaj stranicama
pdfjs-views-manager-sidebar =
.aria-label = Bočna traka
pdfjs-views-manager-view-selector-button =
.title = Prikazi
pdfjs-views-manager-view-selector-button-label = Prikazi
pdfjs-views-manager-pages-title = Stranice
pdfjs-views-manager-outlines-title1 = Struktura dokumenta
.title = Struktura dokumenta (sažmi/proširi sve stavke dvostrukim klikom)
pdfjs-views-manager-attachments-title = Privici
pdfjs-views-manager-layers-title1 = Slojevi
.title = Slojevi (ponovo postavi sve slojeve na zadano stanje dvostrukim klikom)
pdfjs-views-manager-pages-option-label = Stranice
pdfjs-views-manager-outlines-option-label = Struktura dokumenta
pdfjs-views-manager-attachments-option-label = Privici
pdfjs-views-manager-layers-option-label = Slojevi
pdfjs-views-manager-add-file-button =
.title = Dodaj datoteku
pdfjs-views-manager-add-file-button-label = Dodaj datoteku
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } odabrana
[few] { $count } odabrane
*[other] { $count } odabranih
}
pdfjs-views-manager-pages-status-none-action-label = Odaberi stranice
pdfjs-views-manager-pages-status-action-button-label = Upravljaj
pdfjs-views-manager-pages-status-copy-button-label = Kopiraj
pdfjs-views-manager-pages-status-cut-button-label = Izreži
pdfjs-views-manager-pages-status-delete-button-label = Izbriši
pdfjs-views-manager-status-warning-cut-label = Nije moguće izrezati. Osvježi stranicu i pokušaj ponovo.
pdfjs-views-manager-status-warning-copy-label = Nije moguće kopirati. Osvježi stranicu i pokušaj ponovo.
pdfjs-views-manager-status-warning-delete-label = Nije moguće izbrisati. Osvježi stranicu i pokušaj ponovo.
pdfjs-views-manager-status-warning-save-label = Nije moguće spremiti. Osvježi stranicu i pokušaj ponovo.
pdfjs-views-manager-status-undo-button-label = Poništi
pdfjs-views-manager-status-done-button-label = Gotovo
pdfjs-views-manager-status-close-button =
.title = Zatvori
pdfjs-views-manager-status-close-button-label = Zatvori
pdfjs-views-manager-paste-button-label = Umetni
pdfjs-views-manager-paste-button-before =
.title = Umetni prije prve stranice
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Umetni nakon stranice { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOVO
pdfjs-toggle-views-manager-button1 =
.title = Upravljaj stranicama
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura strony { $page } .aria-label = Miniatura strony { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Stronu { $page } wubrać
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Strona { $page } z { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -540,6 +549,7 @@ pdfjs-editor-undo-bar-message-freetext = Tekst je so wotstronił
pdfjs-editor-undo-bar-message-ink = Rysowanka je so wotstroniła pdfjs-editor-undo-bar-message-ink = Rysowanka je so wotstroniła
pdfjs-editor-undo-bar-message-stamp = Wobraz je so wotstronił pdfjs-editor-undo-bar-message-stamp = Wobraz je so wotstronił
pdfjs-editor-undo-bar-message-signature = Signatura je so wotstroniła pdfjs-editor-undo-bar-message-signature = Signatura je so wotstroniła
pdfjs-editor-undo-bar-message-comment = Komentar je so wotstronił
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -641,6 +651,103 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Přetorhnyć
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Komentar přidać .title = Komentar přidać
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Bóčnicu přepinać (dokument miniatury/rozrjad/přiwěški/woršty wobsahuje)
pdfjs-toggle-views-manager-button1-label = Strony rjadować
pdfjs-views-manager-sidebar =
.aria-label = Bóčnica
pdfjs-views-manager-sidebar-resizer =
.aria-label = Přiměrjenje wulkosće bóčnicy
pdfjs-views-manager-view-selector-button =
.title = Napohlady
pdfjs-views-manager-view-selector-button-label = Napohlady
pdfjs-views-manager-pages-title = Strony
pdfjs-views-manager-outlines-title1 = Dokumentowa struktura
.title = Dokumentowa struktura (klikńće dwójce, zo byšće wšě zapiski pokazał/schował)
pdfjs-views-manager-attachments-title = Přiwěški
pdfjs-views-manager-layers-title1 = Runiny
.title = Runiny (klikńće dwójce, zo byšće wšě runiny na standardny status wróćo stajił)
pdfjs-views-manager-pages-option-label = Strony
pdfjs-views-manager-outlines-option-label = Dokumentowa struktura
pdfjs-views-manager-attachments-option-label = Přiwěški
pdfjs-views-manager-layers-option-label = Runiny
pdfjs-views-manager-add-file-button =
.title = Dataju přidać
pdfjs-views-manager-add-file-button-label = Dataju přidać
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } wubrany
[two] { $count } wubranej
[few] { $count } wubrane
*[other] { $count } wubranych
}
pdfjs-views-manager-pages-status-none-action-label = Strony wubrać
pdfjs-views-manager-pages-status-action-button-label = Rjadować
pdfjs-views-manager-pages-status-copy-button-label = Kopěrować
pdfjs-views-manager-pages-status-cut-button-label = Wutřihać
pdfjs-views-manager-pages-status-delete-button-label = Zhašeć
pdfjs-views-manager-pages-status-export-selected-button-label = Wubrane eksportować…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] { $count } strona wutřihana
[two] { $count } stronje wutřihanej
[few] { $count } strony wutřihane
*[other] { $count } stronow wutřihane
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] { $count } strona kopěrowana
[two] { $count } strona kopěrowanej
[few] { $count } strona kopěrowane
*[other] { $count } strona kopěrowane
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] { $count } strona zhašana
[two] { $count } strona zhašanej
[few] { $count } strona zhašane
*[other] { $count } strona zhašane
}
pdfjs-views-manager-pages-status-waiting-ready-label = Waša dataja so přihotuje…
pdfjs-views-manager-pages-status-waiting-uploading-label = Dataja so nahrawa…
pdfjs-views-manager-status-warning-cut-label = Njeda so wutřihać. Aktualizujće stronu a spytajće hišće raz.
pdfjs-views-manager-status-warning-copy-label = Njeda so kopěrować. Aktualizujće stronu a spytajće hišće raz.
pdfjs-views-manager-status-warning-delete-label = Njeda so zhašeć. Aktualizujće stronu a spytajće hišće raz.
pdfjs-views-manager-status-warning-save-label = Njeda so składować. Aktualizujće stronu a spytajće hišće raz.
pdfjs-views-manager-status-undo-button-label = Cofnyć
pdfjs-views-manager-status-done-button-label = Dokónčeny
pdfjs-views-manager-status-close-button =
.title = Začinić
pdfjs-views-manager-status-close-button-label = Začinić
pdfjs-views-manager-paste-button-label = Zasadźić
pdfjs-views-manager-paste-button-before =
.title = Před prěnjej stronu zasadźić
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Za stronu { $page } zasadźić
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOWY
pdfjs-views-manager-waiting-for-file = Dataja so nahrawa…
pdfjs-toggle-views-manager-button1 =
.title = Strony rjadować
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = { $page }. oldal bélyegképe .aria-label = { $page }. oldal bélyegképe
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = { $page }. oldal kiválasztása
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = { $page }. / { $total } oldal
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Szöveg eltávolítva
pdfjs-editor-undo-bar-message-ink = Rajz eltávolítva pdfjs-editor-undo-bar-message-ink = Rajz eltávolítva
pdfjs-editor-undo-bar-message-stamp = Kép eltávolítva pdfjs-editor-undo-bar-message-stamp = Kép eltávolítva
pdfjs-editor-undo-bar-message-signature = Aláírás eltávolítva pdfjs-editor-undo-bar-message-signature = Aláírás eltávolítva
pdfjs-editor-undo-bar-message-comment = Megjegyzés eltávolítva
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Mégse
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Megjegyzés hozzáadása .title = Megjegyzés hozzáadása
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Oldalsáv be/ki (a dokumentum bélyegképeket/vázlatot/mellékleteket/rétegeket tartalmaz)
pdfjs-toggle-views-manager-button1-label = Oldalak kezelése
pdfjs-views-manager-sidebar =
.aria-label = Oldalsáv
pdfjs-views-manager-sidebar-resizer =
.aria-label = Oldalsáv-átméretező
pdfjs-views-manager-view-selector-button =
.title = Nézetek
pdfjs-views-manager-view-selector-button-label = Nézetek
pdfjs-views-manager-pages-title = Oldalak
pdfjs-views-manager-outlines-title1 = Dokumentumvázlat
.title = Dokumentumvázlat (dupla kattintás az összes elem kinyitásához/becsukásához)
pdfjs-views-manager-attachments-title = Mellékletek
pdfjs-views-manager-layers-title1 = Rétegek
.title = Rétegek (dupla kattintás az összes réteg eredeti állapotba való visszaállításához)
pdfjs-views-manager-pages-option-label = Oldalak
pdfjs-views-manager-outlines-option-label = Dokumentumvázlat
pdfjs-views-manager-attachments-option-label = Mellékletek
pdfjs-views-manager-layers-option-label = Rétegek
pdfjs-views-manager-add-file-button =
.title = Fájl hozzáadása
pdfjs-views-manager-add-file-button-label = Fájl hozzáadása
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } kiválasztva
*[other] { $count } kiválasztva
}
pdfjs-views-manager-pages-status-none-action-label = Oldalak kiválasztása
pdfjs-views-manager-pages-status-action-button-label = Kezelés
pdfjs-views-manager-pages-status-copy-button-label = Másolás
pdfjs-views-manager-pages-status-cut-button-label = Kivágás
pdfjs-views-manager-pages-status-delete-button-label = Törlés
pdfjs-views-manager-pages-status-export-selected-button-label = Kiválasztottak exportálása…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 oldal kivágva
*[other] { $count } oldal kivágva
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 oldal másolva
*[other] { $count } oldal másolva
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 oldal törölve
*[other] { $count } oldal törölve
}
pdfjs-views-manager-pages-status-waiting-ready-label = A fájl előkészítése…
pdfjs-views-manager-pages-status-waiting-uploading-label = Fájl feltöltése…
pdfjs-views-manager-status-warning-cut-label = Nem sikerült kivágni. Frissítse az oldalt, és próbálja újra.
pdfjs-views-manager-status-warning-copy-label = Nem sikerült másolni. Frissítse az oldalt, és próbálja újra.
pdfjs-views-manager-status-warning-delete-label = Nem sikerült törölni. Frissítse az oldalt, és próbálja újra.
pdfjs-views-manager-status-warning-save-label = Nem sikerült menteni. Frissítse az oldalt, és próbálja újra.
pdfjs-views-manager-status-undo-button-label = Visszavonás
pdfjs-views-manager-status-done-button-label = Kész
pdfjs-views-manager-status-close-button =
.title = Bezárás
pdfjs-views-manager-status-close-button-label = Bezárás
pdfjs-views-manager-paste-button-label = Beillesztés
pdfjs-views-manager-paste-button-before =
.title = Beillesztés az első oldal elé
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Beillesztés a(z) { $page }. oldal után
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = ÚJ
pdfjs-views-manager-waiting-for-file = Fájl feltöltése…
pdfjs-toggle-views-manager-button1 =
.title = Oldalak kezelése
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -40,8 +40,8 @@ pdfjs-print-button =
.title = Տպել .title = Տպել
pdfjs-print-button-label = Տպել pdfjs-print-button-label = Տպել
pdfjs-save-button = pdfjs-save-button =
.title = Պահպանել .title = Պահել
pdfjs-save-button-label = Պահպանել pdfjs-save-button-label = Պահել
# Used in Firefox for Android as a tooltip for the download button (“download” is a verb). # Used in Firefox for Android as a tooltip for the download button (“download” is a verb).
pdfjs-download-button = pdfjs-download-button =
.title = Ներբեռնել .title = Ներբեռնել
@ -355,9 +355,9 @@ pdfjs-editor-stamp-add-image-button-label = Հավելել պատկեր
# This refers to the thickness of the line used for free highlighting (not bound to text) # This refers to the thickness of the line used for free highlighting (not bound to text)
pdfjs-editor-free-highlight-thickness-input = Հաստություն pdfjs-editor-free-highlight-thickness-input = Հաստություն
pdfjs-editor-free-highlight-thickness-title = pdfjs-editor-free-highlight-thickness-title =
.title = Փոխել հաստությունը տեքստից բացի այլ տարրեր նշելիս .title = Փոխել հաստությունը՝ տեքստից բացի այլ տարրեր գունանշելիս
pdfjs-editor-add-signature-container = pdfjs-editor-add-signature-container =
.aria-label = Ստորագրության կառավարման տարրեր և պահպանված ստորագրություններ .aria-label = Ստորագրության կառավարման տարրեր և պահված ստորագրություններ
pdfjs-editor-signature-add-signature-button = pdfjs-editor-signature-add-signature-button =
.title = Ավելացնել նոր ստորագրություն .title = Ավելացնել նոր ստորագրություն
pdfjs-editor-signature-add-signature-button-label = Ավելացնել նոր ստորագրություն pdfjs-editor-signature-add-signature-button-label = Ավելացնել նոր ստորագրություն
@ -365,11 +365,22 @@ pdfjs-editor-signature-add-signature-button-label = Ավելացնել նոր ս
# Variables: # Variables:
# $description (String) - a string describing/labeling the signature. # $description (String) - a string describing/labeling the signature.
pdfjs-editor-add-saved-signature-button = pdfjs-editor-add-saved-signature-button =
.title = Պահպանված ստորագրություն՝ { $description } .title = Պահված ստորագրություն՝ { $description }
# .default-content is used as a placeholder in an empty text editor. # .default-content is used as a placeholder in an empty text editor.
pdfjs-free-text2 = pdfjs-free-text2 =
.aria-label = Գրվածքի խմբագիր .aria-label = Գրվածքի խմբագիր
.default-content = Սկսեք մուտքագրել... .default-content = Սկսեք մուտքագրել...
# Used to show how many comments are present in the pdf file.
# Variables:
# $count (Number) - the number of comments.
pdfjs-editor-comments-sidebar-title =
{ $count ->
[one] Մեկնաբանություն
*[other] Մեկնաբանություններ
}
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = Տեսնո՞ւմ եք ինչ-որ ուշագրավ բան։ Գունանշեք այն և թողեք մեկնաբանություն։
pdfjs-editor-comments-sidebar-no-comments-link = Իմանալ ավելին
## Alt-text dialog ## Alt-text dialog
@ -383,7 +394,7 @@ pdfjs-editor-alt-text-add-description-description = Ձգտեք գրել 1-2 նա
pdfjs-editor-alt-text-mark-decorative-label = Նշել որպես դեկորատիվ pdfjs-editor-alt-text-mark-decorative-label = Նշել որպես դեկորատիվ
pdfjs-editor-alt-text-mark-decorative-description = Սա օգտագործվում է դեկորատիվ պատկերների համար, ինչպիսիք են եզրագծերը կամ ջրանիշերը։ pdfjs-editor-alt-text-mark-decorative-description = Սա օգտագործվում է դեկորատիվ պատկերների համար, ինչպիսիք են եզրագծերը կամ ջրանիշերը։
pdfjs-editor-alt-text-cancel-button = Չեղարկել pdfjs-editor-alt-text-cancel-button = Չեղարկել
pdfjs-editor-alt-text-save-button = Պահպանել pdfjs-editor-alt-text-save-button = Պահել
pdfjs-editor-alt-text-decorative-tooltip = Նշել որպես դեկորատիվ pdfjs-editor-alt-text-decorative-tooltip = Նշել որպես դեկորատիվ
# .placeholder: This is a placeholder for the alt text input area # .placeholder: This is a placeholder for the alt text input area
pdfjs-editor-alt-text-textarea = pdfjs-editor-alt-text-textarea =
@ -531,7 +542,7 @@ pdfjs-editor-undo-bar-close-button-label = Փակել
## Add a signature dialog ## Add a signature dialog
pdfjs-editor-add-signature-dialog-label = Այս յուրահատկությունը հնարավորություն է տալիս օգտվողին ստեղծել ստորագրություն՝ PDF փաստաթղթում ավելացնելու համար: Օգտվողը կարող է խմբագրել անունը (որը նաև ծառայում է որպես alt տեքստ) և լրացուցիչ պահպանել այն՝ հետագա օգտագործման համար: pdfjs-editor-add-signature-dialog-label = Այս յուրահատկությունը հնարավորություն է տալիս օգտվողին ստեղծել ստորագրություն՝ PDF փաստաթղթում ավելացնելու համար: Օգտվողը կարող է խմբագրել անունը (որը նաև ծառայում է որպես alt տեքստ) և լրացուցիչ պահել այն՝ հետագա օգտագործման համար:
pdfjs-editor-add-signature-dialog-title = Ավելացնել ստորագրություն pdfjs-editor-add-signature-dialog-title = Ավելացնել ստորագրություն
## Tab names ## Tab names
@ -548,14 +559,14 @@ pdfjs-editor-add-signature-image-button = Պատկեր
## Tab panels ## Tab panels
pdfjs-editor-add-signature-type-input = pdfjs-editor-add-signature-type-input =
.aria-label = Մուտքագրեք ձեր ստորագրությունը .aria-label = Մուտքագրել ստորագրություն
.placeholder = Մուտքագրեք ձեր ստորագրությունը .placeholder = Մուտքագրել ստորագրություն
pdfjs-editor-add-signature-draw-placeholder = Նկարեք ձեր ստորագրությունը pdfjs-editor-add-signature-draw-placeholder = Նկարեք ձեր ստորագրությունը
pdfjs-editor-add-signature-draw-thickness-range-label = Հաստություն pdfjs-editor-add-signature-draw-thickness-range-label = Հաստություն
# Variables: # Variables:
# $thickness (Number) - the thickness (in pixels) of the line used to draw a signature. # $thickness (Number) - the thickness (in pixels) of the line used to draw a signature.
pdfjs-editor-add-signature-draw-thickness-range = pdfjs-editor-add-signature-draw-thickness-range =
.title = Նկաելու հաստությունը՝ { $thickness } .title = Նկարելու հաստությունը՝ { $thickness }
pdfjs-editor-add-signature-image-placeholder = Քաշեք ֆայլը այստեղ՝ վերբեռնելու համար pdfjs-editor-add-signature-image-placeholder = Քաշեք ֆայլը այստեղ՝ վերբեռնելու համար
pdfjs-editor-add-signature-image-browse-link = pdfjs-editor-add-signature-image-browse-link =
{ PLATFORM() -> { PLATFORM() ->
@ -572,8 +583,8 @@ pdfjs-editor-add-signature-description-default-when-drawing = Ստորագրու
pdfjs-editor-add-signature-clear-button-label = Մաքրել ստորագրությունը pdfjs-editor-add-signature-clear-button-label = Մաքրել ստորագրությունը
pdfjs-editor-add-signature-clear-button = pdfjs-editor-add-signature-clear-button =
.title = Մաքրել ստորագրությունը .title = Մաքրել ստորագրությունը
pdfjs-editor-add-signature-save-checkbox = Պահպանել ստորագրությունը pdfjs-editor-add-signature-save-checkbox = Պահել ստորագրությունը
pdfjs-editor-add-signature-save-warning-message = Դուք հասել եք պահպանված ստորագրությունների 5 սահմանաչափին։ Հեռացրեք մեկը՝ ավելին պահպանելու համար։ pdfjs-editor-add-signature-save-warning-message = Դուք հասել եք պահպանված ստորագրությունների 5 սահմանաչափին։ Հեռացրեք մեկը՝ ավելին պահելու համար։
pdfjs-editor-add-signature-image-upload-error-title = Չհաջողվեց վերբեռնել պատկերը pdfjs-editor-add-signature-image-upload-error-title = Չհաջողվեց վերբեռնել պատկերը
pdfjs-editor-add-signature-image-upload-error-description = Ստուգեք ձեր ցանցային կապակցումը կամ փորձեք մեկ այլ պատկեր։ pdfjs-editor-add-signature-image-upload-error-description = Ստուգեք ձեր ցանցային կապակցումը կամ փորձեք մեկ այլ պատկեր։
pdfjs-editor-add-signature-image-no-data-error-title = Այս պատկերը հնարավոր չէ վերածել ստորագրության pdfjs-editor-add-signature-image-no-data-error-title = Այս պատկերը հնարավոր չէ վերածել ստորագրության
@ -586,11 +597,36 @@ pdfjs-editor-add-signature-cancel-button = Չեղարկել
pdfjs-editor-add-signature-add-button = Ավելացնել pdfjs-editor-add-signature-add-button = Ավելացնել
pdfjs-editor-edit-signature-update-button = Թարմացնել pdfjs-editor-edit-signature-update-button = Թարմացնել
## Edit a comment dialog
# No existing comment
pdfjs-editor-edit-comment-dialog-title-when-adding = Ավելացնել մեկնաբանություն
pdfjs-editor-edit-comment-dialog-save-button-when-adding = Ավելացնել
pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = Մուտքագրեք այստեղ…
pdfjs-editor-edit-comment-dialog-cancel-button = Չեղարկել
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = Ավելացնել մեկնաբանություն
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-views-manager-add-file-button =
.title = Ավելացնել ֆայլ
pdfjs-views-manager-add-file-button-label = Ավելացնել ֆայլ
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =
.title = Հեռացնել պահպանված ստորագրությունը .title = Հեռացնել պահված ստորագրությունը
pdfjs-editor-delete-signature-button-label1 = Հեռացնել պահպանված ստորագրությունը pdfjs-editor-delete-signature-button-label1 = Հեռացնել պահված ստորագրությունը
## Editor toolbar ## Editor toolbar

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Vignette del pagina { $page } .aria-label = Vignette del pagina { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seliger pagina { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Pagina { $page } de { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Texto removite
pdfjs-editor-undo-bar-message-ink = Designo removite pdfjs-editor-undo-bar-message-ink = Designo removite
pdfjs-editor-undo-bar-message-stamp = Imagine removite pdfjs-editor-undo-bar-message-stamp = Imagine removite
pdfjs-editor-undo-bar-message-signature = Signatura removite pdfjs-editor-undo-bar-message-signature = Signatura removite
pdfjs-editor-undo-bar-message-comment = Commento removite
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Cancellar
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Adder commento .title = Adder commento
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Monstrar/celar le barra lateral (le documento contine miniaturas/structura/attachamentos/stratos)
pdfjs-toggle-views-manager-button1-label = Gerer paginas
pdfjs-views-manager-sidebar =
.aria-label = Barra lateral
pdfjs-views-manager-sidebar-resizer =
.aria-label = Saltar al declaration
pdfjs-views-manager-view-selector-button =
.title = Vistas
pdfjs-views-manager-view-selector-button-label = Vistas
pdfjs-views-manager-pages-title = Paginas
pdfjs-views-manager-outlines-title1 = Structura de documento
.title = Structura de documento (clicca-duplemente pro expander/collaber tote elementos)
pdfjs-views-manager-attachments-title = Annexos
pdfjs-views-manager-layers-title1 = Stratos
.title = Stratos (clicca-duplemente pro reinitialisar tote le stratos al stato predefinite)
pdfjs-views-manager-pages-option-label = Paginas
pdfjs-views-manager-outlines-option-label = Schema del documento
pdfjs-views-manager-attachments-option-label = Annexos
pdfjs-views-manager-layers-option-label = Stratos
pdfjs-views-manager-add-file-button =
.title = Adder file
pdfjs-views-manager-add-file-button-label = Adder file
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } seligite
*[other] { $count } seligite
}
pdfjs-views-manager-pages-status-none-action-label = Seliger paginas
pdfjs-views-manager-pages-status-action-button-label = Gerer
pdfjs-views-manager-pages-status-copy-button-label = Copiar
pdfjs-views-manager-pages-status-cut-button-label = Secar
pdfjs-views-manager-pages-status-delete-button-label = Deler
pdfjs-views-manager-pages-status-export-selected-button-label = Exportar seligite…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] 1 pagina secate
*[other] { $count } paginas secate
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] 1 pagina copiate
*[other] { $count } paginas copiate
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] 1 pagina delite
*[other] { $count } paginas delite
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparante file…
pdfjs-views-manager-pages-status-waiting-uploading-label = Cargante file…
pdfjs-views-manager-status-warning-cut-label = Impossibile secar. Refresca le pagina e retenta.
pdfjs-views-manager-status-warning-copy-label = Impossibile copiar. Refresca le pagina e retenta.
pdfjs-views-manager-status-warning-delete-label = Impossibile deler. Refresca le pagina e retenta.
pdfjs-views-manager-status-warning-save-label = Impossibile salvar. Refresca le pagina e retenta.
pdfjs-views-manager-status-undo-button-label = Disfacer
pdfjs-views-manager-status-done-button-label = Facite
pdfjs-views-manager-status-close-button =
.title = Clauder
pdfjs-views-manager-status-close-button-label = Clauder
pdfjs-views-manager-paste-button-label = Collar
pdfjs-views-manager-paste-button-before =
.title = Collar ante le prime pagina
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Colla post pagina { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOVA
pdfjs-views-manager-waiting-for-file = Cargante file…
pdfjs-toggle-views-manager-button1 =
.title = Gerer paginas
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -102,7 +102,7 @@ pdfjs-spread-even-button-label = Jafnatöludreifing
pdfjs-document-properties-button = pdfjs-document-properties-button =
.title = Eiginleikar skjals… .title = Eiginleikar skjals…
pdfjs-document-properties-button-label = Eiginleikar skjals… pdfjs-document-properties-button-label = Eiginleikar skjals…
pdfjs-document-properties-file-name = Skráarnafn: pdfjs-document-properties-file-name = Skráarheiti:
pdfjs-document-properties-file-size = Skrárstærð: pdfjs-document-properties-file-size = Skrárstærð:
# Variables: # Variables:
# $kb (Number) - the PDF file size in kilobytes # $kb (Number) - the PDF file size in kilobytes

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = Miniatura della pagina { $page } .aria-label = Miniatura della pagina { $page }
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = Seleziona pagina { $page }
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = Pagina { $page } di { $total }
## Find panel button title and messages ## Find panel button title and messages
@ -534,6 +543,7 @@ pdfjs-editor-undo-bar-message-freetext = Testo rimosso
pdfjs-editor-undo-bar-message-ink = Disegno rimosso pdfjs-editor-undo-bar-message-ink = Disegno rimosso
pdfjs-editor-undo-bar-message-stamp = Immagine rimossa pdfjs-editor-undo-bar-message-stamp = Immagine rimossa
pdfjs-editor-undo-bar-message-signature = Firma rimossa pdfjs-editor-undo-bar-message-signature = Firma rimossa
pdfjs-editor-undo-bar-message-comment = Commento rimosso
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = pdfjs-editor-undo-bar-message-multiple =
@ -633,6 +643,95 @@ pdfjs-editor-edit-comment-dialog-cancel-button = Annulla
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = Aggiungi commento .title = Aggiungi commento
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = Attiva/disattiva barra laterale (il documento contiene miniature, struttura, allegati, livelli)
pdfjs-toggle-views-manager-button1-label = Gestisci pagine
pdfjs-views-manager-sidebar =
.aria-label = Barra laterale
pdfjs-views-manager-sidebar-resizer =
.aria-label = Regolatore della larghezza della barra laterale
pdfjs-views-manager-view-selector-button =
.title = Viste
pdfjs-views-manager-view-selector-button-label = Viste
pdfjs-views-manager-pages-title = Pagine
pdfjs-views-manager-outlines-title1 = Struttura del documento
.title = Struttura del documento (doppio clic per espandere/comprimere tutti gli elementi)
pdfjs-views-manager-attachments-title = Allegati
pdfjs-views-manager-layers-title1 = Livelli
.title = Livelli (doppio clic per ripristinare tutti i livelli allo stato predefinito)
pdfjs-views-manager-pages-option-label = Pagine
pdfjs-views-manager-outlines-option-label = Struttura del documento
pdfjs-views-manager-attachments-option-label = Allegati
pdfjs-views-manager-layers-option-label = Livelli
pdfjs-views-manager-add-file-button =
.title = Aggiungi file
pdfjs-views-manager-add-file-button-label = Aggiungi file
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label =
{ $count ->
[one] { $count } selezionata
*[other] { $count } selezionate
}
pdfjs-views-manager-pages-status-none-action-label = Seleziona pagine
pdfjs-views-manager-pages-status-action-button-label = Gestisci
pdfjs-views-manager-pages-status-copy-button-label = Copia
pdfjs-views-manager-pages-status-cut-button-label = Taglia
pdfjs-views-manager-pages-status-delete-button-label = Elimina
pdfjs-views-manager-pages-status-export-selected-button-label = Esporta selezionate…
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label =
{ $count ->
[one] { $count } pagina tagliata
*[other] { $count } pagine tagliate
}
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label =
{ $count ->
[one] { $count } pagina copiata
*[other] { $count } pagine copiate
}
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label =
{ $count ->
[one] { $count } pagina eliminata
*[other] { $count } pagine eliminate
}
pdfjs-views-manager-pages-status-waiting-ready-label = Preparazione file…
pdfjs-views-manager-pages-status-waiting-uploading-label = Caricamento file…
pdfjs-views-manager-status-warning-cut-label = Taglio non riuscito. Ricarica la pagina e riprova.
pdfjs-views-manager-status-warning-copy-label = Copia non riuscita. Ricarica la pagina e riprova.
pdfjs-views-manager-status-warning-delete-label = Eliminazione non riuscita. Ricarica la pagina e riprova.
pdfjs-views-manager-status-warning-save-label = Salvataggio non riuscito. Ricarica la pagina e prova di nuovo.
pdfjs-views-manager-status-undo-button-label = Annulla
pdfjs-views-manager-status-done-button-label = Fatto
pdfjs-views-manager-status-close-button =
.title = Chiudi
pdfjs-views-manager-status-close-button-label = Chiudi
pdfjs-views-manager-paste-button-label = Incolla
pdfjs-views-manager-paste-button-before =
.title = Incolla dopo la prima pagina
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = Incolla dopo pagina { $page }
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = NOVITÀ
pdfjs-views-manager-waiting-for-file = Caricamento file…
pdfjs-toggle-views-manager-button1 =
.title = Gestisci pagine
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

View File

@ -201,6 +201,15 @@ pdfjs-thumb-page-title =
# $page (Number) - the page number # $page (Number) - the page number
pdfjs-thumb-page-canvas = pdfjs-thumb-page-canvas =
.aria-label = { $page } ページの縮小版 .aria-label = { $page } ページの縮小版
# Variables:
# $page (Number) - the page number
pdfjs-thumb-page-checkbox1 =
.title = { $page } ページを選択します
# Variables:
# $page (Number) - the page number
# $total (Number) - the number of pages
pdfjs-thumb-page-title1 =
.title = { $page } / { $total } ページ
## Find panel button title and messages ## Find panel button title and messages
@ -522,6 +531,7 @@ pdfjs-editor-undo-bar-message-freetext = フリーテキスト注釈が削除さ
pdfjs-editor-undo-bar-message-ink = インク注釈が削除されました pdfjs-editor-undo-bar-message-ink = インク注釈が削除されました
pdfjs-editor-undo-bar-message-stamp = 画像が削除されました pdfjs-editor-undo-bar-message-stamp = 画像が削除されました
pdfjs-editor-undo-bar-message-signature = 署名が削除されました pdfjs-editor-undo-bar-message-signature = 署名が削除されました
pdfjs-editor-undo-bar-message-comment = コメントが削除されました
# Variables: # Variables:
# $count (Number) - the number of removed annotations. # $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple = { $count } 個の注釈が削除されました pdfjs-editor-undo-bar-message-multiple = { $count } 個の注釈が削除されました
@ -617,6 +627,79 @@ pdfjs-editor-edit-comment-dialog-cancel-button = キャンセル
pdfjs-editor-add-comment-button = pdfjs-editor-add-comment-button =
.title = コメントを追加します .title = コメントを追加します
## The view manager is a sidebar displaying different views:
## - thumbnails;
## - outline;
## - attachments;
## - layers.
## The thumbnails view is used to edit the pdf: remove/insert pages, ...
pdfjs-toggle-views-manager-notification-button =
.title = サイドバーを切り替えます (文書に含まれるサムネイル、アウトライン、添付データ、レイヤー)
pdfjs-toggle-views-manager-button1-label = ページを管理
pdfjs-views-manager-sidebar =
.aria-label = サイドバー
pdfjs-views-manager-sidebar-resizer =
.aria-label = サイドバーの幅変更
pdfjs-views-manager-view-selector-button =
.title = ビュー
pdfjs-views-manager-view-selector-button-label = ビュー
pdfjs-views-manager-pages-title = ページ
pdfjs-views-manager-outlines-title1 = 文書のアウトライン
.title = 文書のアウトライン (ダブルクリックですべての項目を展開/折りたたみ)
pdfjs-views-manager-attachments-title = 添付データ
pdfjs-views-manager-layers-title1 = レイヤー
.title = レイヤー (ダブルクリックですべてのレイヤーを既定状態にリセット)
pdfjs-views-manager-pages-option-label = ページ
pdfjs-views-manager-outlines-option-label = 文書のアウトライン
pdfjs-views-manager-attachments-option-label = 添付データ
pdfjs-views-manager-layers-option-label = レイヤー
pdfjs-views-manager-add-file-button =
.title = ファイルを追加します
pdfjs-views-manager-add-file-button-label = ファイルを追加
# Variables:
# $count (Number) - the number of selected pages.
pdfjs-views-manager-pages-status-action-label = { $count } ページ選択中
pdfjs-views-manager-pages-status-none-action-label = ページを選択
pdfjs-views-manager-pages-status-action-button-label = 管理
pdfjs-views-manager-pages-status-copy-button-label = コピー
pdfjs-views-manager-pages-status-cut-button-label = 切り取り
pdfjs-views-manager-pages-status-delete-button-label = 削除
pdfjs-views-manager-pages-status-export-selected-button-label = 選択したページをエクスポート...
# Variables:
# $count (Number) - the number of selected pages to be cut.
pdfjs-views-manager-status-undo-cut-label = { $count } ページを切り取りしました
# Variables:
# $count (Number) - the number of selected pages to be copied.
pdfjs-views-manager-pages-status-undo-copy-label = { $count } ページをコピーしました
# Variables:
# $count (Number) - the number of selected pages to be deleted.
pdfjs-views-manager-pages-status-undo-delete-label = { $count } ページを削除しました
pdfjs-views-manager-pages-status-waiting-ready-label = ファイルを準備しています...
pdfjs-views-manager-pages-status-waiting-uploading-label = ファイルをアップロードしています...
pdfjs-views-manager-status-warning-cut-label = 切り取りできませんでした。ページを更新してもう一度試してください。
pdfjs-views-manager-status-warning-copy-label = コピーできませんでした。ページを更新してもう一度試してください。
pdfjs-views-manager-status-warning-delete-label = 削除できませんでした。ページを更新してもう一度試してください。
pdfjs-views-manager-status-warning-save-label = 保存できませんでした。ページを更新してもう一度試してください。
pdfjs-views-manager-status-undo-button-label = 元に戻す
pdfjs-views-manager-status-done-button-label = 完了
pdfjs-views-manager-status-close-button =
.title = 閉じる
pdfjs-views-manager-status-close-button-label = 閉じる
pdfjs-views-manager-paste-button-label = 貼り付け
pdfjs-views-manager-paste-button-before =
.title = 最初のページの前に貼り付けます
# Variables:
# $page (Number) - the page number after which the paste button is.
pdfjs-views-manager-paste-button-after =
.title = { $page } ページの後に貼り付けます
# Badge used to promote a new feature in the UI, keep it as short as possible.
# It's spelled uppercase for English, but it can be translated as usual.
pdfjs-new-badge-content = 新機能
pdfjs-views-manager-waiting-for-file = ファイルをアップロードしています...
pdfjs-toggle-views-manager-button1 =
.title = ページを管理
## Main menu for adding/removing signatures ## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 = pdfjs-editor-delete-signature-button1 =

Some files were not shown because too many files have changed in this diff Show More