Merge pull request #20727 from calixteman/issue20722

Reset transfer functions when entering in a new group
This commit is contained in:
Tim van der Meij 2026-02-24 23:22:45 +01:00 committed by GitHub
commit 943810a9ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 0 deletions

View File

@ -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 {

View File

@ -2668,6 +2668,7 @@ class CanvasGraphics {
["BM", "source-over"],
["ca", 1],
["CA", 1],
["TR", null],
]);
this.groupStack.push(currentCtx);
this.groupLevel++;

View File

@ -0,0 +1 @@
https://github.com/user-attachments/files/25484709/get1d.pdf

View File

@ -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"
}
]