This release features improvements in the areas of font conversion and substitution, annotation rendering and data compression, ink tool smoothing, text selection and extraction, image rendering and canvas rendering performance.
Changes since v3.6.172
- Bump versions in
pdfjs.config
by @timvandermeij in #16399 - [api-minor] Update the minimum supported Node.js version to 18 by @Snuffleupagus in #16293
- Introduce some optional chaining in the
src/core/xfa/
folder by @Snuffleupagus in #16398 - Make something similar to Acrobat when Underline annotation has no appearance by @calixteman in #16397
- Compress the data when saving annotions by @calixteman in #16392
- [api-minor] Use a local font or fallback on an embedded one (if it exists) for non-embedded fonts (bug 1766039) by @calixteman in #16363
- Add a cache to avoid to load several times a local font by @calixteman in #16408
- Reduce some duplication when toggling "expanded" buttons in the viewer toolbars by @Snuffleupagus in #16410
- [api-minor] Update the minimum supported Safari version to 15.4 by @Snuffleupagus in #16401
- Move the sidebar-resizing handling into the
PDFSidebar
class by @Snuffleupagus in #16413 - For missing font, use a local font if it exists even if there's no standard substitution by @calixteman in #16416
- Update packages and translations by @Snuffleupagus in #16417
- Enable the
unicorn/no-useless-promise-resolve-reject
ESLint plugin rule by @Snuffleupagus in #16415 - Update
jasmine
to version 5 by @Snuffleupagus in #16418 - Add tests for the font substitution by @calixteman in #16421
- Check the
css
property in thegetFontSubstitution
unit-tests by @Snuffleupagus in #16422 - [GeckoView] Add a Nimbus experiment for the toolbar (bug 1833093) by @calixteman in #16425
- Simplify the code to generate font substitution information by @calixteman in #16420
- For non-embedded fonts, don't generate the fallback several times by @calixteman in #16426
- Update
package-lock.json
to lockfileVersion=3 by @Snuffleupagus in #16430 - Warn when pdf.js can't load an OS font by @calixteman in #16431
- Attempt to fallback to a default font, for non-available ones, in more cases (issue 16432) by @Snuffleupagus in #16434
- For text widgets, get the text from the AP stream instead of from the format callback (bug 1825002) by @calixteman in #16433
- Introduce more optional chaining in the
src/core/
folder by @Snuffleupagus in #16424 - Simplify the
fontID
handling inPartialEvaluator.loadFont
by @Snuffleupagus in #16437 - Add a localization note to explain that 'Open in app' strings are for mobile (bug 1833858) by @marco-c in #16438
- Flush the current chunk when the font changed because of a restore op (issue #14755) by @calixteman in #16439
- Introduce even more modern JavaScript features in the code-base by @Snuffleupagus in #16440
- [api-minor] Slightly shorten some
idFactory
strings by @Snuffleupagus in #16443 - Extend
getNonStdFontMap
for non-embedded Impact fonts (bug 1365930) by @Snuffleupagus in #16446 - Improve performance of canvas::rescaleAndStroke by around 30% (bug 1135277) by @calixteman in #16448
- Stop trying to sort the attachments in the sidebar by @Snuffleupagus in #16449
- Sanitize the glyph bounding box by @calixteman in #16450
- [GeckoView] Add some telemetry for the toolbar buttons (bug 1829216) by @calixteman in #16453
- [Editor] Improve curve smoothing for Ink tool (bug 1789443) by @calixteman in #16445
- Take into account the final space if any in the TJ command by @calixteman in #16462
- Improve "EI" detection in inline images (PR 12028 follow-up, issue 16454) by @Snuffleupagus in #16461
- Ignore named encoding for non-embedded symbol fonts (issue 16464) by @Snuffleupagus in #16465
- Attempt to improve non-embedded Wingdings font support (bug 1652224) by @Snuffleupagus in #16451
- Avoid to have a null fallback if none has been provided by @calixteman in #16467
- [GeckoView] Remove the
Toolbar
-stub since the viewer has an actual toolbar now by @Snuffleupagus in #16466 - Extract all the text of text annotations by @calixteman in #16472
- Reset the formatted value when after a text field has been modified by @calixteman in #16474
- Re-factor the
isPageVisible
-handling in the find-controller (PR 10217 follow-up) by @Snuffleupagus in #16479 - Update packages and translations by @Snuffleupagus in #16481
- Introduce a "thumbnailrendered" event to simplify cleanup after thumbnail rendering (PR 12613 follow-up) by @Snuffleupagus in #16470
- [OTS] Remove cntrmask instruction with no stem in charstring (bug 1529502) by @calixteman in #16483
- Re-factor updating of thumbnails in the
PDFSidebar
-class by @Snuffleupagus in #16484