diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 767d8477c..f6da4a257 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -903,6 +903,11 @@ class PartialEvaluator { let transferArray; if (Array.isArray(tr)) { transferArray = tr; + if (tr.length > 1 && tr.every(map => map === tr[0])) { + // All entries in the array are the same, so we can just use one of + // them. + transferArray = [tr[0]]; + } } else if (isPDFFunction(tr)) { transferArray = [tr]; } else { diff --git a/src/display/canvas.js b/src/display/canvas.js index 94d5c496b..c85bce768 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -2668,6 +2668,7 @@ class CanvasGraphics { ["BM", "source-over"], ["ca", 1], ["CA", 1], + ["TR", null], ]); this.groupStack.push(currentCtx); this.groupLevel++; diff --git a/test/pdfs/issue20722.pdf.link b/test/pdfs/issue20722.pdf.link new file mode 100644 index 000000000..083760164 --- /dev/null +++ b/test/pdfs/issue20722.pdf.link @@ -0,0 +1 @@ +https://github.com/user-attachments/files/25484709/get1d.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index f7a8f866d..850265c48 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -13954,5 +13954,15 @@ "link": true, "lastPage": 1, "type": "eq" + }, + { + "id": "issue20722", + "file": "pdfs/issue20722.pdf", + "md5": "4a2e58e60973af3004dcfe1ff0be833c", + "rounds": 1, + "link": true, + "firstPage": 171, + "lastPage": 171, + "type": "eq" } ]