diff --git a/src/display/canvas.js b/src/display/canvas.js index aad6f94df..2d807cd51 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -2858,8 +2858,10 @@ class CanvasGraphics { this.ctx.canvas.height ); + this.baseTransformStack.push(this.baseTransform); this.transform(opIdx, ...transform); this.transform(opIdx, ...matrix); + this.baseTransform = getCurrentTransform(this.ctx); } endAnnotation(opIdx) { @@ -2871,6 +2873,7 @@ class CanvasGraphics { delete this.annotationCanvas.savedCtx; delete this.annotationCanvas; } + this.baseTransform = this.baseTransformStack.pop(); } paintImageMaskXObject(opIdx, img) { diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 598cf869e..f75ed2f4d 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -897,3 +897,4 @@ !tiling_patterns_variations.pdf !function_based_shading.pdf !issue16091.pdf +!issue7821.pdf diff --git a/test/pdfs/issue7821.pdf b/test/pdfs/issue7821.pdf new file mode 100755 index 000000000..646cba636 Binary files /dev/null and b/test/pdfs/issue7821.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index d10f84fe4..ab4c82c4e 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -14059,5 +14059,12 @@ "md5": "ac6b2b69d9b3675b317708ec00aaf56c", "rounds": 1, "type": "eq" + }, + { + "id": "issue7821", + "file": "pdfs/issue7821.pdf", + "md5": "7f0f390a70228fffe95835518ec266c5", + "rounds": 1, + "type": "eq" } ]