|
|
@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PDFJS.version = '1.0.584'; |
|
|
|
PDFJS.version = '1.0.587'; |
|
|
|
PDFJS.build = '2b87ff9'; |
|
|
|
PDFJS.build = 'fa53fcb'; |
|
|
|
|
|
|
|
|
|
|
|
(function pdfjsWrapper() { |
|
|
|
(function pdfjsWrapper() { |
|
|
|
// Use strict in our context only - users might not want it
|
|
|
|
// Use strict in our context only - users might not want it
|
|
|
@ -22616,6 +22616,7 @@ var Font = (function FontClosure() { |
|
|
|
if (!properties.composite /* is simple font */) { |
|
|
|
if (!properties.composite /* is simple font */) { |
|
|
|
toUnicode = []; |
|
|
|
toUnicode = []; |
|
|
|
var encoding = properties.defaultEncoding.slice(); |
|
|
|
var encoding = properties.defaultEncoding.slice(); |
|
|
|
|
|
|
|
var baseEncodingName = properties.baseEncodingName; |
|
|
|
// Merge in the differences array.
|
|
|
|
// Merge in the differences array.
|
|
|
|
var differences = properties.differences; |
|
|
|
var differences = properties.differences; |
|
|
|
for (charcode in differences) { |
|
|
|
for (charcode in differences) { |
|
|
@ -22626,26 +22627,43 @@ var Font = (function FontClosure() { |
|
|
|
var glyphName = encoding[charcode]; |
|
|
|
var glyphName = encoding[charcode]; |
|
|
|
// b) Look up the character name in the Adobe Glyph List (see the
|
|
|
|
// b) Look up the character name in the Adobe Glyph List (see the
|
|
|
|
// Bibliography) to obtain the corresponding Unicode value.
|
|
|
|
// Bibliography) to obtain the corresponding Unicode value.
|
|
|
|
if (glyphName === '' || !(glyphName in GlyphsUnicode)) { |
|
|
|
if (glyphName === '') { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} else if (GlyphsUnicode[glyphName] === undefined) { |
|
|
|
// (undocumented) c) Few heuristics to recognize unknown glyphs
|
|
|
|
// (undocumented) c) Few heuristics to recognize unknown glyphs
|
|
|
|
// NOTE: Adobe Reader does not do this step, but OSX Preview does
|
|
|
|
// NOTE: Adobe Reader does not do this step, but OSX Preview does
|
|
|
|
var code; |
|
|
|
var code = 0; |
|
|
|
// Gxx glyph
|
|
|
|
switch (glyphName[0]) { |
|
|
|
if (glyphName.length === 3 && |
|
|
|
case 'G': // Gxx glyph
|
|
|
|
glyphName[0] === 'G' && |
|
|
|
if (glyphName.length === 3) { |
|
|
|
(code = parseInt(glyphName.substr(1), 16))) { |
|
|
|
code = parseInt(glyphName.substr(1), 16); |
|
|
|
toUnicode[charcode] = String.fromCharCode(code); |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 'g': // g00xx glyph
|
|
|
|
|
|
|
|
if (glyphName.length === 5) { |
|
|
|
|
|
|
|
code = parseInt(glyphName.substr(1), 16); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 'C': // Cddd glyph
|
|
|
|
|
|
|
|
case 'c': // cddd glyph
|
|
|
|
|
|
|
|
if (glyphName.length >= 3) { |
|
|
|
|
|
|
|
code = +glyphName.substr(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (code) { |
|
|
|
|
|
|
|
// If |baseEncodingName| is one the predefined encodings,
|
|
|
|
|
|
|
|
// and |code| equals |charcode|, using the glyph defined in the
|
|
|
|
|
|
|
|
// baseEncoding seems to yield a better |toUnicode| mapping
|
|
|
|
|
|
|
|
// (fixes issue 5070).
|
|
|
|
|
|
|
|
if (baseEncodingName && code === +charcode) { |
|
|
|
|
|
|
|
var baseEncoding = Encodings[baseEncodingName]; |
|
|
|
|
|
|
|
if (baseEncoding && (glyphName = baseEncoding[charcode])) { |
|
|
|
|
|
|
|
toUnicode[charcode] = |
|
|
|
|
|
|
|
String.fromCharCode(GlyphsUnicode[glyphName]); |
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
// g00xx glyph
|
|
|
|
|
|
|
|
if (glyphName.length === 5 && |
|
|
|
|
|
|
|
glyphName[0] === 'g' && |
|
|
|
|
|
|
|
(code = parseInt(glyphName.substr(1), 16))) { |
|
|
|
|
|
|
|
toUnicode[charcode] = String.fromCharCode(code); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// Cddd glyph
|
|
|
|
|
|
|
|
if (glyphName.length >= 3 && |
|
|
|
|
|
|
|
glyphName[0] === 'C' && |
|
|
|
|
|
|
|
(code = +glyphName.substr(1))) { |
|
|
|
|
|
|
|
toUnicode[charcode] = String.fromCharCode(code); |
|
|
|
toUnicode[charcode] = String.fromCharCode(code); |
|
|
|
} |
|
|
|
} |
|
|
|
continue; |
|
|
|
continue; |
|
|
|