From 219ca38c869d9425b9432b81a69d47b6f2ea4192 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 17 Jul 2024 14:08:54 +0200 Subject: [PATCH] Remove active smask when restoring the initial canvas state Fixes #18444. --- src/display/canvas.js | 1 + test/pdfs/issue18444.pdf.link | 1 + test/test_manifest.json | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 test/pdfs/issue18444.pdf.link diff --git a/src/display/canvas.js b/src/display/canvas.js index 811e625a72df61..247870f3b2d3cd 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1006,6 +1006,7 @@ class CanvasGraphics { this.restore(); } + this.current.activeSMask = null; this.ctx.restore(); if (this.transparentCanvas) { diff --git a/test/pdfs/issue18444.pdf.link b/test/pdfs/issue18444.pdf.link new file mode 100644 index 00000000000000..f1e437217b2644 --- /dev/null +++ b/test/pdfs/issue18444.pdf.link @@ -0,0 +1 @@ +https://github.com/user-attachments/files/16264442/9.170.1.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index f970556c0b5126..c718e23dfca777 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -10160,5 +10160,15 @@ "firstPage": 2, "lastPage": 2, "type": "eq" + }, + { + "id": "issue18444", + "file": "pdfs/issue18444.pdf.pdf", + "md5": "233b7b72d67133044338a728d52d58a9", + "rounds": 1, + "link": true, + "firstPage": 1, + "lastPage": 1, + "type": "eq" } ]