This release contains improvements for accessibility, annotation editing, annotation rendering, font conversion, image decoding, performance, text selection and the viewer.
Changes since v6.2.108
- Bump the stable version in
pdfjs.configby @timvandermeij in #21655 - [Editor] Restore pinch-to-resize on an editor which came back from an undo by @calixteman in #21644
- Use more more optional chaining in the
src/folder by @Snuffleupagus in #21661 - Avoid duplicate shared object clones by @calixteman in #21658
- Avoid mutating source widget parents by @calixteman in #21660
- Fix the selection rendering when a page has been destroyed and rendered again (bug 2054348) by @calixteman in #21666
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21669
- Sync the viewer chrome with the Firefox design system by @calixteman in #21665
- [api-minor] Convert
getJSActionsto return data in a Map by @Snuffleupagus in #21664 - Use the client coordinates for the pinch-zoom origin by @calixteman in #21659
- Re-factor the
EventBusto use Map/Set internally by @Snuffleupagus in #21673 - Replace simple return
ifstatements with ternary operators by @Snuffleupagus in #21672 - Let pointerup/cancel propagate in TouchManager by @calixteman in #21674
- Shorten the
ViewHistoryclass a little bit by @Snuffleupagus in #21678 - Don't throw on an invalid XML character reference by @calixteman in #21682
- Fix the regex used to normalize css fonts in XFA by @calixteman in #21680
- Trim the response headers with a backward scan by @calixteman in #21684
- Find the PDF filename in a URL hash in two linear steps by @calixteman in #21685
- Scan backwards to delete a word in a text field by @calixteman in #21687
- Add scripts correctly in
Field.prototype.setAction(PR 12569 follow-up) by @Snuffleupagus in #21691 - Update dependencies to the most recent versions by @timvandermeij in #21689
- Exclude "&" from the XML entity names by @calixteman in #21692
- [api-minor] Convert
getFieldObjectsto return data in a Map by @Snuffleupagus in #21671 - Anchor the regex used to extract the XFA path positions by @calixteman in #21686
- Don't write numbers in exponential notation when saving a pdf by @calixteman in #21683
- Bound the email parts in the autolinker regex by @calixteman in #21693
- Safely serialize CSS font family names by @calixteman in #21694
- Add a go to first/last menu-item helper method in the
Menuclass by @Snuffleupagus in #21690 - Document how to use the viewer to open files by @martinthomson in #21695
- Add integration tests for the Home/End keys in the
Menuclass by @calixteman in #21706 - Bump undici from 7.28.0 to 7.29.0 by @dependabot[bot] in #21701
- Bump github/codeql-action/analyze from 4.37.2 to 4.37.3 by @dependabot[bot] in #21705
- Bump github/codeql-action/init from 4.37.2 to 4.37.3 by @dependabot[bot] in #21704
- Bump github/codeql-action/autobuild from 4.37.2 to 4.37.3 by @dependabot[bot] in #21703
- Shorten the
Menuconstructor a tiny bit by @Snuffleupagus in #21700 - Enable the
regexp/no-super-linear-moveESLint rule by @calixteman in #21708 - Bump fast-uri from 3.1.4 to 3.1.5 by @dependabot[bot] in #21712
- Remove the ambiguity from the PostScript number regex by @calixteman in #21709
- Avoid an infinite loop on cyclic field Parent chains by @calixteman in #21699
- Enable a few more
eslint-plugin-regexprules by @calixteman in #21710 - Give copied annotations distinct references by @calixteman in #21707
- Use the
MathClamphelper in thesrc/core/annotation.jsfile by @Snuffleupagus in #21715 - Update
PDFViewerApplication._initializeAutoPrintto handlegetJSActionsreturning a Map (PR 21664 follow-up) by @Snuffleupagus in #21716 - Move
SCALE_MATRIXintoCanvasGraphicsand initialize itsDOMMatrixlazily (issue 21720) by @Snuffleupagus in #21721 - Convert
TranslatedFont.prototype.loadType3Datato an asynchronous method by @Snuffleupagus in #21719 - Don't re-encode the
fileparameter in the viewer by @calixteman in #21718 - Add helper methods for populating
dateActionsCache/scandCachein thesrc/scripting_api/util.jsfile by @Snuffleupagus in #21681 - Handle image-only PDF exports by @calixteman in #21717
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21724
- Compute the next ParentTree key correctly by @calixteman in #21714
- Expose the table structure attributes in the struct tree by @calixteman in #21702
- Track container touches in TouchManager by @calixteman in #21722
- Change the inline image cache, in the
Parserclass, to a Map by @Snuffleupagus in #21727 - Convert the
charProcOperatorList, used with Type3 fonts, to a Map by @Snuffleupagus in #21730 - [api-minor] Convert
getPermissionsto return data in a Set by @Snuffleupagus in #21738 - Improve glyph mapping for non-embedded CID fonts by @calixteman in #21726
- Re-name the
RefSetCacheclass toRefMapby @Snuffleupagus in #21737 - Expose more tagged PDF structure roles by @calixteman in #21734
- Hide unavailable alt text settings by @calixteman in #21735
- Keep pinching when the touch set changes by @calixteman in #21731
- Replace most
toBeTruthy()/toBeFalsy()matchers with more specific ones in the unit-tests by @Snuffleupagus in #21739 - Change
RefSetandRefMapto use actually private class fields by @Snuffleupagus in #21728 - Improve ink drawing responsiveness by @calixteman in #21733
- Fix the license text bundled for pdf.js.qcms by @calixteman in #21747
- Fix the license file for the bundled Liberation fonts by @calixteman in #21750
- Cache the result of
buildSymbolGlyphIdEncoding(PR 21726 follow-up) by @Snuffleupagus in #21740 - Improve some
Array.from()usage by @Snuffleupagus in #21742 - Re-use the
stringToByteshelper in theencodeASCIIStringfunction by @Snuffleupagus in #21743 - [Editor] End active touch gestures on destroy by @calixteman in #21744
- Ignore degenerate touch spans when scaling by @calixteman in #21741
- Remove overridden/duplicated
[$getChildren]methods by @Snuffleupagus in #21736 - Remove unnecessary
rectmodification in theCanvasGraphics.prototype.beginAnnotationmethod by @Snuffleupagus in #21729 - Fix intermittent thumbnail dragging integration test by @calixteman in #21751
- Enable the
unicorn/no-incorrect-query-selectorESLint plugin rule by @Snuffleupagus in #21754 - Bump github/codeql-action/init from 4.37.3 to 4.37.6 by @dependabot[bot] in #21755
- Bump github/codeql-action/autobuild from 4.37.3 to 4.37.6 by @dependabot[bot] in #21756
- Bump github/codeql-action/analyze from 4.37.3 to 4.37.6 by @dependabot[bot] in #21757
- Fix intermittent pinch-resize integration test by @calixteman in #21753
- Fix coalesced-events test at fractional device pixel ratios by @calixteman in #21758
- Expose PDF alternative text without prohibited ARIA names by @calixteman in #21759
- Support two-finger panning by @calixteman in #21752
- Tweak the TR/TR2 check in the
PartialEvaluator.prototype.setGStatemethod by @Snuffleupagus in #21764 - Avoid spilling xref entries into dynamically allocated slots (bug 2060459) by @calixteman in #21766
- Add a simple integration-test for the "updatedPreference" event by @Snuffleupagus in #21767
- Only define the
getRawDataAPI methods when building INTERNAL_VIEWER by @Snuffleupagus in #21772 - Remove unnecessary
typeofcheck inField.prototype.currentValueIndicesby @Snuffleupagus in #21774 - Avoid creating a couple of intermediate Arrays by @Snuffleupagus in #21773
- Fix the two MathClamp calls the prefer-math-clamp fixer mis-ordered by @Jaybhade in #21725
- Simplify the
Stepper.prototype.getNextBreakPointmethod by @Snuffleupagus in #21762 - Let the
StructElementNode.prototype.tableAttributesgetter return a Map by @Snuffleupagus in #21761 - l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21775
- [Editor] Make HighlightEditor extend DrawingEditor by @calixteman in #21769
- Normalize the line ending of test/pdfs/issue9186.pdf.link by @calixteman in #21776
- Add a gulp task for releasing pdf.js in the Firefox git tree by @calixteman in #21777
- Shorten some
Array.prototype.map()callbacks by @Snuffleupagus in #21780 - Use
Array.prototype.filter(Boolean)more, when filtering out truthy values by @Snuffleupagus in #21781 - Nova-ify the viewer (bug 2063405) by @calixteman in #21779
- Modernize the
XRefMockunit-test helper by @Snuffleupagus in #21782 - Use the structure tree to position annotations by @calixteman in #21768
- Update dependencies to the most recent versions by @timvandermeij in #21784
- Improve Firefox watch builds by @calixteman in #21783
- Fix flaky hand tool integration test by @calixteman in #21785
- Enable the
unicorn/no-multiple-promise-resolver-callslinting rule by @timvandermeij in #21786 - Define the visible-page sort function, used in
getVisibleElements, once by @Snuffleupagus in #21787 - Remove unnecessary
!lzwStatecheck inLZWStream.prototype.readBlockby @Snuffleupagus in #21788 - Fix the RTL layout of the views manager header (bug 2060033) by @calixteman in #21790
- Set the direction of the floating toolbar in RTL locales (bug 2060032) by @calixteman in #21791
- Fix intermittent reorganize pages integration tests by @calixteman in #21789
- Use
Uint8Array.fromHexin theCFFParserunit-tests setup by @Snuffleupagus in #21793 - Let link annotations own their text by @calixteman in #21792
- Fix Firefox-only tests in Chrome CI by @calixteman in #21795
- Downscale large JPEG images with ImageDecoder (bug 2063570) by @calixteman in #21794
- Remove unused l10n IDs by @calixteman in #21798
- Avoid creating a couple of intermediate Arrays by @Snuffleupagus in #21797
- Improve the
watchScrollhelper function a little bit by @Snuffleupagus in #21796 - Auto-close the marked content sections left open in a text object (bug 1898053) by @calixteman in #18151
- Improve
JpegImage.canUseImageDecoderreturn value consistency by @Snuffleupagus in #21800 - Cache the
TextDecoderinstances used by thestringToPDFStringhelper by @Snuffleupagus in #21801 - Remove a few unnecessary checks after calling
BaseStream.prototype.getBytesby @Snuffleupagus in #21804 - Cache the
TextDecoder/TextEncoderinstances used when compiling/decompiling font-data by @Snuffleupagus in #21806 - Vertically center the text in single-line and comb text fields (bug 2055455) by @calixteman in #21802
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21808
- Avoid zooming during fast two-finger panning by @calixteman in #21807
- Remove the unused /Decode handling from the
JpegStream/JpegImageclasses by @Snuffleupagus in #21809 - Modernize the Node.js
getinfo.mjsexample by @Snuffleupagus in #21811 - Remove the unused
key3parameter from the variousDictget-methods by @Snuffleupagus in #21815 - Fix inconsistencies with the
Page.prototype.#replaceIdByRefmethod by @Snuffleupagus in #21812 - Add a helper method, in the
PartialEvaluatorclass, for building a transfer map by @Snuffleupagus in #21816 - Shorten the handling of /A and /a page labels by @Snuffleupagus in #21814
- Re-use
computeLuminancein theDOMFilterFactory.prototype.addHCMFiltermethod by @Snuffleupagus in #21813 - Bump github/codeql-action/autobuild from 4.37.6 to 4.37.7 by @dependabot[bot] in #21823
- Bump github/codeql-action/init from 4.37.6 to 4.37.7 by @dependabot[bot] in #21822
- Bump github/codeql-action/analyze from 4.37.6 to 4.37.7 by @dependabot[bot] in #21821
- Shorten the
Parser.prototype.#hasCryptFiltermethod by @Snuffleupagus in #21824 - Remove unused /FS branch from the
FileSpecconstructor by @Snuffleupagus in #21819 - Remove the "duplicated"
Page.prototype.createAnnotationEvaluatormethod by @Snuffleupagus in #21817 - Add more unit-tests for the
src/core/primitives.jsfile by @Snuffleupagus in #21820 - Use ImageDecoder for JPEG dimension mismatches without resizing (bug 2066163) by @calixteman in #21818
- Change
Word64.prototype.shiftRightto only supportplaces < 32(PR 4938 follow-up) by @Snuffleupagus in #21826 - Add a helper function for writing lineTo/curveTo when creating Appearance-streams for Annotations by @Snuffleupagus in #21831
- Remove unused
BasePdfManager/LocalPdfManagermethods by @Snuffleupagus in #21827 - [api-minor] Convert
documentInfoto return any "Custom" data in a Map by @Snuffleupagus in #21828 - Localize the comment dialog save button through its label span by @calixteman in #21830
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21833
- [api-minor] Convert
markInfoto return data in a Map by @Snuffleupagus in #21834 - Improve unit-test coverage for the
getViewerPreferencesfunctionality by @Snuffleupagus in #21835 - Remove the unused
getOutputLengthmethod from theColorSpaceclasses (PR 21637 follow-up) by @Snuffleupagus in #21837 - Tweak the
WorkerTaskclass and thehasJSActionsgetter by @Snuffleupagus in #21841