From: Chris Jones Date: Sun, 19 Jun 2011 04:18:56 +0000 (-0700) Subject: CharSet is optional X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1be8c5e7ed4d61f52c18580c7e8e0939bf5658ac;p=pdf.js.git CharSet is optional --- diff --git a/pdf.js b/pdf.js index 9c4344f..c0e4791 100644 --- a/pdf.js +++ b/pdf.js @@ -1912,9 +1912,11 @@ var CanvasGraphics = (function() { // Get the font charset if any var charset = descriptor.get("CharSet"); - assertWellFormed(IsString(charset), "invalid charset"); + if (charset) { + assertWellFormed(IsString(charset), "invalid charset"); - charset = charset.split("/"); + charset = charset.split("/"); + } } else if (IsName(encoding)) { var encoding = Encodings[encoding.name]; if (!encoding)