[pull] master from mozilla:master - #512
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )