diff --git a/src/fonts.js b/src/fonts.js index 6d674479c..a8cab40f2 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -5577,7 +5577,14 @@ var CFFParser = (function CFFParserClosure() { } var fontDict = cff.fdArray[0]; + // Make the sanitizer happy and remove anything that is only for CID + // fonts. fontDict.setByKey(17, topDict.getByName('CharStrings')); + fontDict.removeByName('CIDFontVersion'); + fontDict.removeByName('CIDFontRevision'); + fontDict.removeByName('CIDFontType'); + fontDict.removeByName('CIDCount'); + fontDict.removeByName('UIDBase'); cff.topDict = fontDict; cff.isCIDFont = false; delete cff.fdArray; diff --git a/test/pdfs/cid_cff.pdf b/test/pdfs/cid_cff.pdf new file mode 100644 index 000000000..264410b61 Binary files /dev/null and b/test/pdfs/cid_cff.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index e47701a60..353296b9c 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -769,5 +769,11 @@ "md5": "9f11e815b485f7f0e1fa5c116c636cf9", "rounds": 1, "type": "eq" + }, + { "id": "cid_cff", + "file": "pdfs/cid_cff.pdf", + "md5": "a19a18eaa626262cc45e0760004d6de9", + "rounds": 1, + "type": "eq" } ]