|
|
@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PDFJS.version = '1.1.86'; |
|
|
|
PDFJS.version = '1.1.89'; |
|
|
|
PDFJS.build = '2bbe872'; |
|
|
|
PDFJS.build = 'dfecfca'; |
|
|
|
|
|
|
|
|
|
|
|
(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
|
|
|
@ -18208,7 +18208,11 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
return new ToUnicodeMap(cmap.getMap()); |
|
|
|
return new ToUnicodeMap(cmap.getMap()); |
|
|
|
} else if (isStream(cmapObj)) { |
|
|
|
} else if (isStream(cmapObj)) { |
|
|
|
cmap = CMapFactory.create(cmapObj, |
|
|
|
cmap = CMapFactory.create(cmapObj, |
|
|
|
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null).getMap(); |
|
|
|
{ url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null); |
|
|
|
|
|
|
|
if (cmap instanceof IdentityCMap) { |
|
|
|
|
|
|
|
return new IdentityToUnicodeMap(0, 0xFFFF); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cmap = cmap.getMap(); |
|
|
|
// Convert UTF-16BE
|
|
|
|
// Convert UTF-16BE
|
|
|
|
// NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
|
|
|
|
// NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
|
|
|
|
// to iterate over all keys.
|
|
|
|
// to iterate over all keys.
|
|
|
@ -19703,6 +19707,7 @@ var CMap = (function CMapClosure() { |
|
|
|
// - bf chars are variable-length byte sequences, stored as strings, with
|
|
|
|
// - bf chars are variable-length byte sequences, stored as strings, with
|
|
|
|
// one byte per character.
|
|
|
|
// one byte per character.
|
|
|
|
this._map = []; |
|
|
|
this._map = []; |
|
|
|
|
|
|
|
this.name = ''; |
|
|
|
this.vertical = false; |
|
|
|
this.vertical = false; |
|
|
|
this.useCMap = null; |
|
|
|
this.useCMap = null; |
|
|
|
this.builtInCMap = builtInCMap; |
|
|
|
this.builtInCMap = builtInCMap; |
|
|
@ -19802,13 +19807,28 @@ var CMap = (function CMapClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
out.charcode = 0; |
|
|
|
out.charcode = 0; |
|
|
|
out.length = 1; |
|
|
|
out.length = 1; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get isIdentityCMap() { |
|
|
|
|
|
|
|
if (!(this.name === 'Identity-H' || this.name === 'Identity-V')) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this._map.length !== 0x10000) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (var i = 0; i < 0x10000; i++) { |
|
|
|
|
|
|
|
if (this._map[i] !== i) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
return CMap; |
|
|
|
return CMap; |
|
|
|
})(); |
|
|
|
})(); |
|
|
|
|
|
|
|
|
|
|
|
// A special case of CMap, where the _map array implicitly has a length of
|
|
|
|
// A special case of CMap, where the _map array implicitly has a length of
|
|
|
|
// 65535 and each element is equal to its index.
|
|
|
|
// 65536 and each element is equal to its index.
|
|
|
|
var IdentityCMap = (function IdentityCMapClosure() { |
|
|
|
var IdentityCMap = (function IdentityCMapClosure() { |
|
|
|
function IdentityCMap(vertical, n) { |
|
|
|
function IdentityCMap(vertical, n) { |
|
|
|
CMap.call(this); |
|
|
|
CMap.call(this); |
|
|
@ -19863,7 +19883,11 @@ var IdentityCMap = (function IdentityCMapClosure() { |
|
|
|
return map; |
|
|
|
return map; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
readCharCode: CMap.prototype.readCharCode |
|
|
|
readCharCode: CMap.prototype.readCharCode, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get isIdentityCMap() { |
|
|
|
|
|
|
|
error('should not access .isIdentityCMap'); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return IdentityCMap; |
|
|
|
return IdentityCMap; |
|
|
@ -20328,6 +20352,13 @@ var CMapFactory = (function CMapFactoryClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function parseCMapName(cMap, lexer) { |
|
|
|
|
|
|
|
var obj = lexer.getObj(); |
|
|
|
|
|
|
|
if (isName(obj) && isString(obj.name)) { |
|
|
|
|
|
|
|
cMap.name = obj.name; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function parseCMap(cMap, lexer, builtInCMapParams, useCMap) { |
|
|
|
function parseCMap(cMap, lexer, builtInCMapParams, useCMap) { |
|
|
|
var previous; |
|
|
|
var previous; |
|
|
|
var embededUseCMap; |
|
|
|
var embededUseCMap; |
|
|
@ -20338,6 +20369,8 @@ var CMapFactory = (function CMapFactoryClosure() { |
|
|
|
} else if (isName(obj)) { |
|
|
|
} else if (isName(obj)) { |
|
|
|
if (obj.name === 'WMode') { |
|
|
|
if (obj.name === 'WMode') { |
|
|
|
parseWMode(cMap, lexer); |
|
|
|
parseWMode(cMap, lexer); |
|
|
|
|
|
|
|
} else if (obj.name === 'CMapName') { |
|
|
|
|
|
|
|
parseCMapName(cMap, lexer); |
|
|
|
} |
|
|
|
} |
|
|
|
previous = obj; |
|
|
|
previous = obj; |
|
|
|
} else if (isCmd(obj)) { |
|
|
|
} else if (isCmd(obj)) { |
|
|
@ -20447,6 +20480,9 @@ var CMapFactory = (function CMapFactoryClosure() { |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
warn('Invalid CMap data. ' + e); |
|
|
|
warn('Invalid CMap data. ' + e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (cMap.isIdentityCMap) { |
|
|
|
|
|
|
|
return createBuiltInCMap(cMap.name, builtInCMapParams); |
|
|
|
|
|
|
|
} |
|
|
|
return cMap; |
|
|
|
return cMap; |
|
|
|
} |
|
|
|
} |
|
|
|
error('Encoding required.'); |
|
|
|
error('Encoding required.'); |
|
|
|