diff --git a/src/display/canvas.js b/src/display/canvas.js index de0a2ccd0..5f03e6418 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1463,9 +1463,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var textHScale = current.textHScale * fontDirection; var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX; var glyphsLength = glyphs.length; + var isTextInvisible = + current.textRenderingMode === TextRenderingMode.INVISIBLE; var i, glyph, width; - if (fontSize === 0) { + if (isTextInvisible || fontSize === 0) { return; } diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 2e34a2b7c..244481a23 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -65,6 +65,7 @@ !issue5070.pdf !issue5238.pdf !issue5244.pdf +!issue5421.pdf !gradientfill.pdf !bug903856.pdf !bug850854.pdf diff --git a/test/pdfs/issue5421.pdf b/test/pdfs/issue5421.pdf new file mode 100644 index 000000000..f288a7125 Binary files /dev/null and b/test/pdfs/issue5421.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 4d2165928..5032a01a6 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1555,6 +1555,14 @@ "type": "eq", "about": "True type font with encoding dict with no base encoding but with differences." }, + { "id": "issue5421", + "file": "pdfs/issue5421.pdf", + "md5": "273f6813758a2349090003c7c8a0d85e", + "link": false, + "rounds": 1, + "type": "eq", + "about": "Invisible Type3 font used for text selection and searching." + }, { "id": "issue5280", "file": "pdfs/issue5280.pdf", "md5": "0ea1230e2964e74cb6db063a89b78803",