This release contains improvements for accessibility, annotations, the annotation editor, font conversion, image conversion, performance, shading pattern rendering, SMask rendering and the viewer.
Changes since v5.6.205
- Bump the stable version in
pdfjs.configby @timvandermeij in #21004 - [api-minor] Rewrite the ps lexer & parser and add a small Wasm compiler by @calixteman in #21002
- [Node.js] Remove the
node-readable-to-web-readable-streampolyfill by @Snuffleupagus in #21007 - Add attachments when merging/reorganizing a pdf (bug 2026956) by @calixteman in #21013
- Don't use an intermediate canvas when rendering a tiling pattern bigger than the rectangle to fill by @calixteman in #18815
- Avoid expressions duplication in the ps AST and use a local instead when compiling to WASM by @calixteman in #21008
- Add support for function-based shadings (bug 1254066) by @calixteman in #21012
- Add an interpreter for optimized ps code by @calixteman in #21010
- Encrypt pdf data when merging the same pdf (bug 2028369) by @calixteman in #21022
- Use the
MathClamphelper function more by @Snuffleupagus in #21026 - l10n: Update locale files by @github-actions[bot] in #21033
- Use
OffscreenCanvasunconditionally in theweb/pdf_thumbnail_view.jsfile by @Snuffleupagus in #21021 - Fix wrong values when sanitizing fonts by @calixteman in #21031
- A couple of small
collectAnnotationsByTypeimprovements by @Snuffleupagus in #21034 - Move the
MathClamphelper function to its own file by @Snuffleupagus in #21027 - Replace all
Object.prototype.hasOwnPropertyusage withObject.hasOwnby @Snuffleupagus in #21029 - [api-minor] Change
PDFDataRangeTransportto use a single (internal) listener by @Snuffleupagus in #21028 - Fix radial gradient when the two circles have an intersection by @calixteman in #21014
- Add a js fallback for interpreting ps code by @calixteman in #21023
- Get the right transform for a pattern before filling some text by @calixteman in #21019
- Add an eslint plugin for using MathClamp when it's possible by @calixteman in #21030
- Fix the annotation base transform before drawing it by @calixteman in #21020
- Remove the unused
compilePostScriptToIRfunction (PR 21023 follow-up) by @Snuffleupagus in #21037 - [api-minor] Remove
PostScriptCompilerandPostScriptEvaluator, since it's now dead code (PR 21023 follow-up) by @Snuffleupagus in #21005 - Fix comments for (is/has)Singlefile in pdf_editor by @calixteman in #21036
- Update dependencies to the most recent versions by @timvandermeij in #21035
- Use the
calculateMD5helper, fromtest/downloadutils.mjs, intest/add_test.mjsby @Snuffleupagus in #21038 - Introduce a function type enumeration by @timvandermeij in #21041
- Use the original array-data when parsing Type 0 (Sampled) Functions by @Snuffleupagus in #21040
- Fix intermittent failure in the "must check that the comment sidebar is resizable with the keyboard" comment integration test by @timvandermeij in #21045
- Fix intermittent integration test failures related to checking the find count results text by @timvandermeij in #21043
- [api-minor] Update the minimum supported Node.js version to 22 by @Snuffleupagus in #21018
- Remove unnecessary "flooring" of the components when setting the Annotation
borderColorby @Snuffleupagus in #21047 - Replace individual AI/ML disabling preferences with the single killswitch preference in the tests by @timvandermeij in #21046
- Shorten the
src/core/postscript/code a tiny bit by @Snuffleupagus in #21048 - Unconditionally create a gpu device by @calixteman in #21049
- Use the
stringToByteshelper in thePDFEditor.prototype.writePDFmethod by @Snuffleupagus in #21051 - Fix the l10n-id for the sidebar toggleButton, in the
ViewsManagerclass by @Snuffleupagus in #21055 - Reduce allocations when compiling CFF fonts by @Snuffleupagus in #21053
- Fix the way to write numbers when saving a pdf by @calixteman in #21054
- Make sure the thumbnails positions are recomputed after a structural change but after a reflow has been done (bug 2028193) by @calixteman in #21059
- Bump github/codeql-action from 4.33.0 to 4.35.1 by @dependabot[bot] in #21056
- Replace a couple of loops with
TypedArray.prototype.fill()in thesrc/core/ascii_85_stream.jsfile by @Snuffleupagus in #21050 - Bump actions/deploy-pages from 4.0.5 to 5.0.0 by @dependabot[bot] in #21058
- Bump codecov/codecov-action from 5.5.2 to 6.0.0 by @dependabot[bot] in #21057
- Avoid as much as possible to have intermediate canvases by @calixteman in #21061
- Reduce allocations in
CFFCompiler.prototype.compileIndex(PR 21053 follow-up) by @Snuffleupagus in #21062 - Dont revoke blob URLs while printing but do it after by @calixteman in #21065
- Update the position when calling
ChunkedStream.prototype.getByteswithout a length by @Snuffleupagus in #21070 - Add constants for defining the initial BBox and Float32 BBox by @Snuffleupagus in #21071
- Bump basic-ftp from 5.2.0 to 5.2.1 by @dependabot[bot] in #21067
- Use a TypedArray when building the "hmtx" font table by @Snuffleupagus in #21072
- l10n: Update locale files by @github-actions[bot] in #21074
- Move some TrueType header comments to the correct lines by @Snuffleupagus in #21073
- Re-factor the
OpenTypeFileBuilderclass to use aDataViewwhen writing data by @Snuffleupagus in #21076 - Take into account the alignment when printing/saving a comb field by @calixteman in #21069
- Re-factor the
CFFParserclass to useDataViews when reading data by @Snuffleupagus in #21079 - Re-factor the
JpegImageclass, and related code, to useDataViews when reading data by @Snuffleupagus in #21086 - Bump basic-ftp from 5.2.1 to 5.2.2 by @dependabot[bot] in #21083
- Fix how the text is printed/saved in a comb field when it's a RTL one by @calixteman in #21082
- Re-factor the
Jbig2Imageclass, and related code, to useDataViews when reading data by @Snuffleupagus in #21087 - Remove the
int32helper, and replace it withDataViewusage, insrc/core/fonts.jsby @Snuffleupagus in #21088 - Remove pattern fill when setting fill color before drawing a tile by @calixteman in #21090
- [Debugger] Fix the content stream rendering when it's a ref to an array by @calixteman in #21091
- Use the
stopEventhelper function in theAnnotationEditorLayerclass by @Snuffleupagus in #21092 - Avoid infinite recursion while compiling a glyph by @calixteman in #21080
- Update dependencies to the most recent versions by @timvandermeij in #21093
- Re-factor the
FontRendererFactoryclass, and related code, to useDataViews when reading data by @Snuffleupagus in #21077 - Remove
readUint32usage from theisTrueTypeFilefunction by @Snuffleupagus in #21078 - Take into account CharProcs keys when computing the type3 hash by @calixteman in #21095
- Use TypedArrays when building more TrueType tables by @Snuffleupagus in #21097
- Remove the workaround for bug 1820511 by @calixteman in #21098
- Add the UI for merging PDFs (bug 2028071) by @calixteman in #21060
- Fix blending issues while compositing by @calixteman in #21096
- Use the gpu for drawing meshes only when it has more than 16 triangles (bug 2030745) by @calixteman in #21099
- Correctly sync the transform on the scratch canvas by @calixteman in #21094
- Fix dependency tracking in pattern fill by @nicolo-ribaudo in #21102
- Use TypedArrays when building even more TrueType tables by @Snuffleupagus in #21100
- Improve SMask compositing by pre-baking backdrop and filter by @calixteman in #21101
- Remove the basic
Math.sumPrecisepolyfill by @Snuffleupagus in #20958 - Fix saveDocument JSDoc return type by @supermar1010 in #21107
- Use TypedArrays in the
createCmapTablefunction by @Snuffleupagus in #21103 - Fix integration tests failing because the focus isn't on the right element by @calixteman in #21104
- Add an option -j XX for browser tests in order to set the number of jobs by @calixteman in #21108
- Use TypedArrays in the
createNameTablefunction by @Snuffleupagus in #21112 - l10n: Update locale files by @github-actions[bot] in #21114
- Improve reftest runner performance by @calixteman in #21111
- Store the Type1 program
privateDatain a Map, rather than an Object by @Snuffleupagus in #21116 - Update dependencies to the most recent versions by @timvandermeij in #21117
- Update GitHub workflow actions to the most recent versions by @timvandermeij in #21118
- Improve reftest runner memory usage and load balancing by @calixteman in #21115
- Fix the
gets text content, with correct properties (issue 8276)unit test by @timvandermeij in #21123 - Correctly compute the bbox when simplifying the path construction by @calixteman in #21127
- Remove user and password from URLs (bug 2025109) by @calixteman in #21128
- Fix unit test for dependency tracking by @nicolo-ribaudo in #21130
- Use a gh app for making the PR to update l10n data by @calixteman in #21133
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21134
- Add code coverage support for browser/ref tests by @calixteman in #21125
- Improve the "CopyLocalImage" unit-tests by @Snuffleupagus in #21131
- [HCM] Set the correct color for the icon in the merge button when focused with the keyboard (bug 2033603) by @calixteman in #21135
- [api-minor] Replace the CCITT and JBig2 fallback decoders with a JS version of the PDFium decoder by @Snuffleupagus in #21139
- Update qcms bindings by @calixteman in #21144
- Bump fast-xml-parser from 5.5.7 to 5.7.1 by @dependabot[bot] in #21140
- Update quickjs bindings by @calixteman in #21148
- Update the openjpeg decoder compiled with the last version of emscripten by @calixteman in #21143
- Introduce a GitHub Actions workflow for running the unit tests by @timvandermeij in #21121
- Avoid to add outlines having a deleted page which leads to clone a useless page (bug 2033908) by @calixteman in #21136
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #21150
- Switch to a wasm file for the quickjs sandbox by @calixteman in #21149
- Prompt the user for saving a merged pdf (bug 2034461) by @calixteman in #21145
- Remove the unused
MIN_INT_32constant (PR 21139 follow-up) by @Snuffleupagus in #21153 - [Ink] Replace the opacity slider with an alpha-enabled color input by @calixteman in #21142
- Fix status label mismatch after merging with a pre-existing selection (bug 2034111) by @calixteman in #21138
- Download linked PDFs when running
gulp unittestcliby @Snuffleupagus in #21147 - Fix clicking on a thumbnail image not navigating to the correct page when using a screen reader (bug 2034568) by @calixteman in #21151
- Enable the
radixESLint rule by @Snuffleupagus in #21157 - Don't decode name of the checkboxes exported values (bug 2022700) by @calixteman in #21137
- Compute a "proper" hash in the
AnnotationStorage.prototype.modifiedIdsgetter by @Snuffleupagus in #21158 - Move the
hexNumbersArray intoUtil, to enable using it in the viewer by @Snuffleupagus in #21160 - Improve unit-testing for the
PDFDocumentProxy.prototype.getPageIndexmethod by @Snuffleupagus in #21161 - Get the
zIndexcorrectly inPopupElement.prototype.renderCommentButtonby @Snuffleupagus in #21162 - Update dependencies to the most recent versions by @timvandermeij in #21163
- Remove duplicated font tests execution in the GitHub Actions workflow by @timvandermeij in #21164
- A couple of
internal-viewerfixes by @Snuffleupagus in #21166 - Include unit test coverage reporting in the GitHub Actions workflow by @timvandermeij in #21165
- Fix the Codecov token not being usable in the unit tests GitHub Actions workflow by @timvandermeij in #21167
- Include the
web/folder in the coverage report forgulp unittestcliby @Snuffleupagus in #21168 - Add a gh workflow for triggering an event when some pdfs are added in test/pdfs by @calixteman in #21132
- Fix merging a PDF after a page deletion (bug 2034804) by @calixteman in #21154
- Introduce a GitHub Actions workflow for running the integration tests by @timvandermeij in #20371
- Speed up 'gulp typestest' by removing the unused 'generic' dependency by @calixteman in #21170
- Fix array type in CanvasBBoxTracker comment by @nicolo-ribaudo in #21174
- Fix merging PDFs with conflicting AcroForm /DR (bug 2035197) by @calixteman in #21176
- Allow free-highlighting on top of image placeholders (bug 2034980) by @calixteman in #21171