From 34f438b77676080de9f01907a035a97647181dd8 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Sun, 2 Oct 2011 16:53:22 -0500 Subject: [PATCH] Properly bypass Type3 fonts (ref #577) --- pdf.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdf.js b/pdf.js index ae8984907..4632ae942 100644 --- a/pdf.js +++ b/pdf.js @@ -4563,6 +4563,8 @@ var PartialEvaluator = (function partialEvaluator() { break; default: warn('Unknown type of font: ' + type); + baseEncoding = []; + break; } } @@ -4749,9 +4751,7 @@ var PartialEvaluator = (function partialEvaluator() { // This case is here for compatibility. var descriptor = xref.fetchIfRef(dict.get('FontDescriptor')); if (!descriptor) { - var baseFontName = dict.get('BaseFont'); - if (!isName(baseFontName)) - return null; + var baseFontName = dict.get('BaseFont') || new Name('sans-serif'); // Using base font name as a font name. baseFontName = baseFontName.name.replace(/,/g, '_');