diff --git a/src/display/font_loader.js b/src/display/font_loader.js index e52847fb33497..b74349ac0f6fc 100644 --- a/src/display/font_loader.js +++ b/src/display/font_loader.js @@ -436,7 +436,7 @@ class FontFaceObject { } catch (ex) { warn(`getPathGenerator - ignoring character: "${ex}".`); } - const path = makePathFromDrawOPS(cmds.path); + const path = makePathFromDrawOPS(cmds?.path); if (!this.fontExtraProperties) { // Remove the raw path-string, since we don't need it anymore. diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 6bef34dd94d3b..352366971bffa 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -765,4 +765,5 @@ !two_paragraphs.pdf !paragraph_and_link.pdf !issue20225.pdf +!issue20513.pdf !issue20516.pdf diff --git a/test/pdfs/issue20513.pdf b/test/pdfs/issue20513.pdf new file mode 100644 index 0000000000000..dafedc3e3fe46 Binary files /dev/null and b/test/pdfs/issue20513.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index a912fb1b35516..c9b9a5400c321 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -13099,5 +13099,12 @@ "enableXfa": true, "lastPage": 1, "type": "eq" + }, + { + "id": "issue20513", + "file": "pdfs/issue20513.pdf", + "md5": "19a3a347773518242fa3cf1c04a9a1e4", + "rounds": 1, + "type": "eq" } ]