From: notmasteryet Date: Sat, 8 Oct 2011 03:46:01 +0000 (-0500) Subject: Fixing DescendantFonts object fetching (#600) X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0301b530a903e95c899a736ad79dd46859a03730;p=pdf.js.git Fixing DescendantFonts object fetching (#600) --- diff --git a/pdf.js b/pdf.js index 943986e..6b7bf0c 100644 --- a/pdf.js +++ b/pdf.js @@ -4757,7 +4757,7 @@ var PartialEvaluator = (function partialEvaluator() { if (isRef(df)) df = xref.fetch(df); - dict = xref.fetch(isRef(df) ? df : df[0]); + dict = xref.fetchIfRef(isRef(df) ? df : df[0]); type = dict.get('Subtype'); assertWellFormed(isName(type), 'invalid font Subtype'); diff --git a/test/pdfs/Test-plusminus.pdf b/test/pdfs/Test-plusminus.pdf new file mode 100644 index 0000000..50ae29a Binary files /dev/null and b/test/pdfs/Test-plusminus.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index f074c06..9ad53e1 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -43,6 +43,11 @@ "rounds": 1, "type": "eq" }, + { "id": "plusminus", + "file": "pdfs/Test-plusminus.pdf", + "rounds": 1, + "type": "eq" + }, { "id": "openoffice-pdf", "file": "pdfs/DiwanProfile.pdf", "link": true,