This release contains improvements for accessibility, annotation editing, annotation rendering, font conversion, image conversion, performance, scripting, tiling pattern rendering and the viewer.
Changes since v6.4.299
- Bump the stable version in
pdfjs.configby @timvandermeij in #22066 - Fix a few edge cases when converting RGB images in
convertRGBToRGBAandImageResizerby @calixteman in #22046 - Directly call
Set.prototype.deletein theChunkedStreamManagercode by @Snuffleupagus in #22065 - Don't stop at the first broken /Kids entry in
Catalog.getAllPageDicts(issue 22011) by @xjtu-ctgg in #22013 - Keep the sign of negative numbers greater than -1 in
util.printfby @kwy404 in #22017 - Downscale large images without a full-size RGBA buffer by @calixteman in #22067
- Create the
LIGATURE_TO_UNICODEMap only once by @Snuffleupagus in #22068 - Replace
gulp-replacewithtransformfor the Chromium manifest by @calixteman in #22072 - [api-minor] Don't re-layout the
textLayeron update (PR 20492 follow-up) by @Snuffleupagus in #22045 - Bump library version to
6.5by @Snuffleupagus in #22073 - Remove the explicit
gulp-clidependency by @calixteman in #22077 - Replace
ttestwith a local Welch's t-test by @calixteman in #22075 - Add a reference test for issue 7802 by @Snuffleupagus in #22074
- Replace webpack-stream with the Webpack API by @calixteman in #22070
- Match the whole string in the
getCharUnicodeCategoryregular expression (issue 21890) by @Om-singhaI in #21960 - Add pull request viewer previews by @calixteman in #22090
- [api-minor] Offload canvas drawing operations to a worker by @Aditi-1400 in #21860
- Check preview deployment before posting links by @calixteman in #22093
- Bump source-map-js from 1.2.1 to 1.2.2 by @dependabot[bot] in #22091
- Bump github/codeql-action/init from 4.38.1 to 4.38.2 by @dependabot[bot] in #22084
- Bump github/codeql-action/analyze from 4.38.1 to 4.38.2 by @dependabot[bot] in #22085
- Bump github/codeql-action/autobuild from 4.38.1 to 4.38.2 by @dependabot[bot] in #22086
- Ensure that errors in the Optional Content won't prevent all rendering by @Snuffleupagus in #22082
- Replace Metalsmith with a
docsgulp task by @calixteman in #22081 - Don't swallow
postMessageerrors when replying tosendWithPromisemessages (issue 22079) by @Snuffleupagus in #22080 - Collect renderer worker coverage by @calixteman in #22094
- Extract viewer preview checks and preparation into scripts by @calixteman in #22095
- Use CharCodeMap for font character mappings (bug 2077176) by @calixteman in #22092
- Ensure that the
RendererWorkerversion matches the API version, and reduce the size of the builtpdf.renderer.mjsfile (PR 21860 follow-up) by @Snuffleupagus in #22097 - Fix the
DOMCanvasFactoryimport in the new debugger (PR 22097 follow-up) by @Snuffleupagus in #22098 - Resolve PDF.js aliases when linting imports by @calixteman in #22099
- A couple of
RendererWorkerimprovements (PR 21860 follow-up) by @Snuffleupagus in #22103 - Move renderer worker support out of api.js (PR 21860 follow-up) by @calixteman in #22105
- Always check if
crypto.randomUUIDis available in thegetUuidhelper (issue 22107) by @Snuffleupagus in #22108 - Split the
src/display/display_utils.jsfile into multiple ones (PR 21860 follow-up) by @Snuffleupagus in #22101 - Reduce duplication in the
type1FontGlyphMappingfunction by @Snuffleupagus in #22104 - Create
canvasFactoryandfilterFactoryjust once in theRendererMessageHandler(PR 21860 follow-up) by @Snuffleupagus in #22114 - Cache decoded page images in the worker in Firefox (PR 22105 follow-up) by @calixteman in #22112
- Test main-thread and worker rendering paths by @calixteman in #22096
- Use the main-thread pixel ratio for worker image smoothing by @calixteman in #22120
- Fit the Nova zoom select in the compact toolbar (bug 2075731) by @calixteman in #22118
- Add unit-tests for the
StatTimer.prototype.toStringmethod by @Snuffleupagus in #22109 - Add a method in
BaseCanvasFactoryfor getting a no-alpha canvas context by @Snuffleupagus in #22116 - Update the thumbnail status label and controls together (bug 2080269) by @calixteman in #22119
- Keep scripting internals out of the global scope (issue 22121) by @calixteman in #22122
- Parse structure trees without a ParentTree by @calixteman in #22115
- Cache operator lists in the renderer worker (PR 21860 follow-up) by @calixteman in #22126
- Fix repeated
util.scandcalls (PR 21681 follow-up) by @calixteman in #22146 - Fix choice-field currentValueIndices (PR 12826 follow-up) by @calixteman in #22147
- Fix initial radio button selection (PR 12637 follow-up) by @calixteman in #22148
- Run OpenAction once on document open (PR #15822 follow-up) by @calixteman in #22149
- Ensure that Wasm-decoding of images work if multiple PDFs are parsed in parallel in one worker-thread (fixes issue 22131) by @Snuffleupagus in #22145
- Keep Path2D caches out of nested operator lists (PR 21860 follow-up) by @calixteman in #22156
- Fix render completion after errors in nested operators by @calixteman in #22153
- Use MessageChannel to yield in the renderer worker (PR 21860 follow-up) by @calixteman in #22161
- Handle non-object message handler failures by @calixteman in #22154
- Use the canvas factory for worker frame contexts (PR 21860 follow-up) by @calixteman in #22157
- Use the interactive border color for the Nova zoom select (bug 2071594) by @calixteman in #22152
- Use Nova text color for toggled controls (bug 2071599) by @calixteman in #22151
- Only register the window "updatefromsandbox" listener if necessary, when using the standalone viewer-components (issue 22133) by @Snuffleupagus in #22136
- [Editor] Fix saving stamps after removing alt text by @calixteman in #22135
- Ignore collapsed selections after pointer release by @calixteman in #22137
- [Editor] Defer signature undo until a signature is added by @calixteman in #22138
- Preserve page deletions when restoring page order by @calixteman in #22139
- Report PDF modifications to Firefox (bug 2076546) by @calixteman in #22162
- Handle invalid canvas sizes in worker rendering (PR 21860 follow-up) by @calixteman in #22155
- Fall back after renderer worker failures (PR 21860 follow-up) by @calixteman in #22163
- Prevent "uncaught exceptions" from the
PDFFetchStreamRangeReaderandPDFNodeStreamRangeReaderclasses (issue 22171) by @Snuffleupagus in #22173 - Catch
getPermissionserrors inPDFViewer.prototype.setDocumentby @Snuffleupagus in #22168 - Fix JPX images with subsampled components or mismatched component counts by @calixteman in #22169
- Fix the PostScript Wasm compiler for a mod by a constant zero by @calixteman in #22174
- Fix script error reporting by @calixteman in #22166
- Handle document destruction during a hanging range request (issue 22051) by @Snuffleupagus in #22164
- Preserve decoded data in truncated FlateDecode streams (issue 22044) by @calixteman in #22182
- Load documents without waiting for renderer startup (PR 21860 follow-up) by @calixteman in #22167
- Ship the QuickJS license files with the sandbox by @calixteman in #22185
- Improve the performances of the jpx decoder and reduce its size and the jbig2 one by @calixteman in #22175
- Add CodSpeed performance benchmarks by @codspeed[bot] in #22187
- Fix radio button and checkbox scripting by @calixteman in #22160
- Don't parse inferred link-annotations if textLayer rendering was aborted (issue 22179) by @Snuffleupagus in #22184
- Bump actions/upload-artifact from 7.0.1 to 7.0.2 by @dependabot[bot] in #22188
- Bump actions/download-artifact from 8.0.1 to 8.0.2 by @dependabot[bot] in #22189
- Ignore invalid scripting timer handles by @calixteman in #22176
- Use the original eval for PDF actions by @calixteman in #22177
- Simplify scripting helpers by @calixteman in #22181
- Avoid integer conversion traps in PostScript Wasm by @calixteman in #22191
- Hide the page background behind the main canvas (bug 2070624) by @calixteman in #22196
- Add gulp benchmark task by @calixteman in #22197
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #22200
- Add scripting API regression tests by @calixteman in #22178
- Use a
DataViewwhen populating thewarray in thecalculateMD5function by @Snuffleupagus in #22201 - Use a
DataViewwhen populating thewarray in thecalculateSHA256function by @Snuffleupagus in #22203 - Use
DataViews when reading/writing data in thecalculateSHA512function by @Snuffleupagus in #22204 - Let Nova Tools menu rows shrink before scrolling (bug 2076522) by @calixteman in #22205
- Reuse existing popups when saving edited comments by @calixteman in #22206
- Change the
codeLenCodeMap, used withFlateStream, into a Uint8Array by @Snuffleupagus in #22217 - Avoid unnecessary wrapping in multiline text fields (bug 2065923) by @calixteman in #22214
- Fix stream encryption and metadata decryption by @calixteman in #22216
- Use
copyWithin, rather than a manual loop, for non-overlapping data inFlateStream.prototype.#readBlockby @Snuffleupagus in #22220 - Use
fill, rather than a manual loop, for repeated data inFlateStream.prototype.#readBlockby @Snuffleupagus in #22221 - Add some benchmarks by @calixteman in #22199
- Use the renderer workers preloaded by Firefox (bug 2079251) by @calixteman in #22165
- Compute the table entry once in the
FlateStream.prototype.generateHuffmanTablemethod by @Snuffleupagus in #22219 - Avoid some
String.fromCharCodecalls in theLexer.prototype.getStringmethod by @Snuffleupagus in #22227 - Distinguish PostScript booleans from numbers by @calixteman in #22226
- Serialize indirect strings when extracting pages by @calixteman in #22223
- Compile benchmark WebAssembly with TurboFan only by @calixteman in #22228
- Wait for structure trees in accessibility tests by @calixteman in #22222
- Avoid showing an empty canvas when worker rendering pauses by @calixteman in #22230
- Anchor NoRotate annotations at the top-left corner of their rect (bug 2082236) by @calixteman in #22195
- Don't remove a
MessageHandlershared by multipleBasePdfManagerinstances (PR 22145 follow-up) by @Snuffleupagus in #22186 - Skip invalid and pure XFA documents when extracting pages by @calixteman in #22232
- Don't compress metadata streams when writing by @calixteman in #22234
- Drop PDF/X and PDF/E claims from extracted document info by @calixteman in #22235
- Wait for the link to be visible before clicking it in presentation mode by @calixteman in #22233
- Test Wasm fetching after page extraction (PR 22186) by @calixteman in #22237
- Update
actions/setup-nodeto version 7.1.0 by @timvandermeij in #22239 - Update dependencies to the most recent versions by @timvandermeij in #22238
- Tweak the
copyWithinthreshold inFlateStream.prototype.#readBlock(PR 22220 follow-up) by @Snuffleupagus in #22240 - Wait for the WillSave actions to run before saving by @calixteman in #22241
- Bound the work and recursion depth of PostScript Type 4 compilation by @calixteman in #22231
- Support XRef stream offsets larger than 2 GiB by @buondevid in #22172
- Compile benchmark JavaScript with Sparkplug on first call by @calixteman in #22245
- Release discarded canvases by @calixteman in #22248
- Use the
toHexDigitparser-helper in theType1Parsercode by @Snuffleupagus in #22253 - Deflate small streams synchronously by @nicolo-ribaudo in #22273
- Simplify the
Parser.prototype.findASCII85DecodeInlineStreamEndmethod by @Snuffleupagus in #22274 - Reset the alpha of colored Type3 glyphs in the glyph's graphics state by @calixteman in #22282
- Start directly drawn tiling pattern cells from the initial graphics state by @calixteman in #22283
- Bound format 12 cmap expansion by @calixteman in #22255
- Add a
Utilhelper for creating a Uint8Array identity-map with 256 elements by @Snuffleupagus in #22236 - Reset the alpha of colored Type3 glyphs in their operator list by @calixteman in #22284
- Speed up asyncGetBytesFromDecompressionStream by @calixteman in #22276
- Render the existing page in the issue10491-partial reftest by @calixteman in #22287
- Keep pending clip and fill-rule state out of pattern tiles by @calixteman in #22286
- Fix Type3 text advances by @calixteman in #22285
- Use
TypedArray.prototype.setin themeshPackDatafunction by @Snuffleupagus in #22250 - Avoid five-argument Math.min/max calls in Util.axialAlignedBoundingBox by @calixteman in #22290
- Use the font bbox to extend the head table bounds (bug 1888084) by @calixteman in #22298
- Use codspeed macro runners for running the perf benchmarks by @calixteman in #22302
- Bump markdown-it from 14.3.2 to 14.3.3 by @dependabot[bot] in #22292
- Bump @vitest/mocker and vitest by @dependabot[bot] in #22293
- Bump actions/create-github-app-token from 3.2.0 to 3.3.0 by @dependabot[bot] in #22269
- Bump github/codeql-action/init from 4.38.2 to 4.38.3 by @dependabot[bot] in #22268
- Bump github/codeql-action/autobuild from 4.38.2 to 4.38.3 by @dependabot[bot] in #22267
- Bump github/codeql-action/analyze from 4.38.2 to 4.38.3 by @dependabot[bot] in #22266
- Fall back to the Identity crypt filter without a /CF dictionary by @calixteman in #22249
- Use Canvas for toggled controls on LinkText in forced-colors mode (bug 2083002) by @calixteman in #22281
- Avoid loops when initializing data in the
calculateMD5,calculateSHA256, andcalculateSHA512functions by @Snuffleupagus in #22301 - Include the final NFKC range when searching by @calixteman in #22297
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #22305
- Set walltime mode in codspeed by @calixteman in #22311
- Bound CFF and Type1 charstring work by @calixteman in #22303
- Limit whitespace backtracking in find by @calixteman in #22314
- Ignore the search terms reduced to nothing in a multiple term search by @calixteman in #22316
- Keep fullscreen inside the browser window in the Firefox integration tests by @calixteman in #22318
- Avoid quadratic autolinking on pages with many links by @calixteman in #22319
- Rewrite comment in autolinker by @calixteman in #22322
- Use
Array.prototype.fillmore in thesrc/core/bidi.jscode by @Snuffleupagus in #22312 - Use fixed V8 hash and random seeds in the benchmarks by @calixteman in #22323
- Render glyph 0 in full CFF fonts by @calixteman in #22326
- Reuse shared CFF Private DICTs and Subrs by @calixteman in #22324
- Skip unnecessary parsing in
Autolinker.processLinksby @Snuffleupagus in #22327 - Apply annotation changes when extracting pages by @calixteman in #22252
- Improve the find bar integration tests by @timvandermeij in #22069
- Upgrade Vitest to version 5 by @timvandermeij in #22242
- Update
getTextContentto usegetReaderinstead by @Snuffleupagus in #22329 - Remove extra operands from CFF stack-clearing operators by @calixteman in #22328
- Update dependencies to the most recent versions by @timvandermeij in #22330
- [Editor] Smooth ink strokes with a sliding time window by @calixteman in #22304
- Use Python 3.15 in the GitHub workflows by @timvandermeij in #22331
- [JS] Hide implementation details in the scripting sandbox by @calixteman in #21081
- Add a
PDFDocumenthelper method for creating aPageinstance by @Snuffleupagus in #22332 - Rotate fallback glyphs in non-embedded vertical fonts by @calixteman in #22334
- Avoid more unused code in the built
pdf.renderer.mjsfile (PR 22101 follow-up) by @Snuffleupagus in #22337 - Skip more unnecessary parsing when parsing inferred links (PR 22327 follow-up) by @Snuffleupagus in #22336
- Wait for the link annotations to be injected in the autolinker integration tests by @calixteman in #22340
- Use the
Util.pointBoundingBoxhelper in themeshUpdateBoundsfunction by @Snuffleupagus in #22299 - Keep tiling patterns aligned on scaled fallback glyphs by @calixteman in #22333
- [GeckoView] Style the signature editor and keep existing annotations non-editable (bug 2068989) by @calixteman in #22247
- Shorten the
calculationOrderIdsgetter a little bit by @Snuffleupagus in #22344 - Only set the
Glyph.prototype.originalCharCodeproperty when debugging by @Snuffleupagus in #22350 - Avoid an infinite loop when parsing a truncated format 1 CFF charset by @calixteman in #22357
- Hide Nova toolbar items at wider breakpoints (bug 2084084) by @calixteman in #22356
- Bump github/codeql-action/autobuild from 4.38.3 to 4.39.0 by @dependabot[bot] in #22353
- Bump github/codeql-action/analyze from 4.38.3 to 4.39.0 by @dependabot[bot] in #22352
- Bump github/codeql-action/init from 4.38.3 to 4.39.0 by @dependabot[bot] in #22351
- Align tiling patterns on rotated fallback glyphs by @calixteman in #22343
- Only wait for WebGPU after receiving mesh patterns (bug 2086057) by @calixteman in #22358
- Don't wait for WebGPU during document loading (bug 2086057) by @calixteman in #22361
- Advance the position in the PostScript
Lexeron invalid operators/numbers (bug 2086012) by @Snuffleupagus in #22365 - Reduce duplication in the PostScript
Lexer.prototype.nextmethod by @Snuffleupagus in #22377 - Fix the vertical offset of text selections in Firefox by @calixteman in #22360
- Pause translation when changing scroll/spread modes in the viewer by @Snuffleupagus in #22382
- Prevent errors when extracting textContent with zero initial font size (issue 22381) by @Snuffleupagus in #22384
- Decode small Flate streams through asyncGetBytes (bug 2086217) by @calixteman in #22385
- l10n: Update locale files by @sync-l10n-for-pdf-js[bot] in #22395
- Add PDFs for the Talos rendering corpus by @calixteman in #22363
- Lazily create a single
DOMSVGFactoryfor all annotationLayers by @Snuffleupagus in #22408 - Regenerate button appearances for NeedAppearances (bug 2084610) by @calixteman in #22386
- Handle truncated RGB data in convertRGBToRGBA by @calixteman in #22402
- Inline the
AnnotationLayerBuilder.prototype.#initAnnotationLayermethod by @Snuffleupagus in #22409 - Discard the state of a corrupt XRef table/stream before parsing the next one by @andrewfader in #22375
- Prevent unhandled rejections when cancelling an errored stream reader by @andrewfader in #22371