Skip to content

[pull] master from mozilla:master - #512

Merged
pull[bot] merged 10 commits into
code:masterfrom
mozilla:master
Aug 23, 2026
Merged

[pull] master from mozilla:master#512
pull[bot] merged 10 commits into
code:masterfrom
mozilla:master

Conversation

@pull

@pull pull Bot commented Aug 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Snuffleupagus and others added 10 commits August 22, 2026 12:26
 - Fix metadata logging, since it's accidentally broken by PR 19778 (over a year ago).
 - Modernize, and simplify, the example by using `await` to remove the promise chains.
This private method has two call-sites, which provide *different* `deletedAnnotations` parameters; see
 - https://github.com/mozilla/pdf.js/blob/0f26334f9d6f96119f6e5164fb65832fbbde7344/src/core/document.js#L378-L384
 - https://github.com/mozilla/pdf.js/blob/0f26334f9d6f96119f6e5164fb65832fbbde7344/src/core/document.js#L534-L539

Thanks to the similarities between the `RefMap` and `RefSet` classes this inconsistency hasn't caused any bugs, as far as I know, but it should still be fixed.
Given how the `deletedAnnotations` is being used, a `RefSet` really seems to be the "correct" data-structure to use here since we only need to track references.

Finally, make use of an early `continue` to reduce overall indentation and thus shorten the code in the `Page.prototype.#replaceIdByRef` method.
I happened to glance at this code, and noticed that using the style-value *itself* to compute the current character would shorten this code a little bit.

Note that this particular page label format seems to be somewhat rarely used in practice, compared to e.g. the roman numerals format, which probably isn't that strange given its definition: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2096063
PR 20542 removed the only spot in the code-base where a `Dict` get-method was invoked with three keys, hence we can remove a little bit of effectively dead code.

Note that for any "regular" `Dict` lookup there can be at most two keys, since some PDF properties have shorthand names (e.g. /CS respectively /ColorSpace).
…transfer map

Currently we duplicate the same exact code twice, which seems unnecessary.
Modernize the Node.js `getinfo.mjs` example
Remove the unused `key3` parameter from the various `Dict` get-methods
Fix inconsistencies with the `Page.prototype.#replaceIdByRef` method
…ransferMap

Add a helper method, in the `PartialEvaluator` class, for building a transfer map
Shorten the handling of /A and /a page labels
@pull pull Bot locked and limited conversation to collaborators Aug 23, 2026
@pull pull Bot added the ⤵️ pull label Aug 23, 2026
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot merged commit 3b77a80 into code:master Aug 23, 2026
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 23, 2026 14:03 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants