Bug 1424365 - Update pdf.js to version 2.0.197. r=bdahl

--HG--
extra : rebase_source : 31e5f7208e5cb30857ff0d2be9a16f8d0d5292c6
This commit is contained in:
Ryan VanderMeulen 2017-12-08 15:55:38 -05:00
Родитель 52ac315bd7
Коммит 68ba1f8723
6 изменённых файлов: 198 добавлений и 147 удалений

Просмотреть файл

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.0.185
Current extension version is: 2.0.197
Taken from upstream commit: f2994736
Taken from upstream commit: 371ca514

Просмотреть файл

@ -79,6 +79,7 @@ function isDefaultHandler() {
}
function initializeDefaultPreferences() {
/* eslint-disable semi */
var DEFAULT_PREFERENCES =
{
"showPreviousViewOnLoad": true,
@ -101,8 +102,9 @@ function initializeDefaultPreferences() {
"enablePrintAutoRotate": false,
"disablePageMode": false,
"disablePageLabels": false
};
}
/* eslint-enable semi */
var defaultBranch = Services.prefs.getDefaultBranch(PREF_PREFIX + ".");
var defaultValue;

Просмотреть файл

@ -33,6 +33,7 @@ XPCOMUtils.defineLazyServiceGetter(Svc, "mime",
"@mozilla.org/mime;1",
"nsIMIMEService");
/* eslint-disable semi */
var DEFAULT_PREFERENCES =
{
"showPreviousViewOnLoad": true,
@ -55,8 +56,9 @@ var DEFAULT_PREFERENCES =
"enablePrintAutoRotate": false,
"disablePageMode": false,
"disablePageLabels": false
};
}
/* eslint-enable semi */
var PdfjsChromeUtils = {
// For security purposes when running remote, we restrict preferences

Просмотреть файл

@ -98,7 +98,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
__w_pdfjs_require__(9);
@ -904,63 +904,6 @@ function createPromiseCapability() {
});
return capability;
}
var StatTimer = function StatTimerClosure() {
function rpad(str, pad, length) {
while (str.length < length) {
str += pad;
}
return str;
}
function StatTimer() {
this.started = Object.create(null);
this.times = [];
this.enabled = true;
}
StatTimer.prototype = {
time: function StatTimer_time(name) {
if (!this.enabled) {
return;
}
if (name in this.started) {
warn('Timer is already running for ' + name);
}
this.started[name] = Date.now();
},
timeEnd: function StatTimer_timeEnd(name) {
if (!this.enabled) {
return;
}
if (!(name in this.started)) {
warn('Timer has not been started for ' + name);
}
this.times.push({
'name': name,
'start': this.started[name],
'end': Date.now()
});
delete this.started[name];
},
toString: function StatTimer_toString() {
var i, ii;
var times = this.times;
var out = '';
var longest = 0;
for (i = 0, ii = times.length; i < ii; ++i) {
var name = times[i]['name'];
if (name.length > longest) {
longest = name.length;
}
}
for (i = 0, ii = times.length; i < ii; ++i) {
var span = times[i];
var duration = span.end - span.start;
out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
}
return out;
}
};
return StatTimer;
}();
var createBlob = function createBlob(data, contentType) {
if (typeof Blob !== 'undefined') {
return new Blob([data], { type: contentType });
@ -1399,7 +1342,6 @@ exports.NotImplementedException = NotImplementedException;
exports.PageViewport = PageViewport;
exports.PasswordException = PasswordException;
exports.PasswordResponses = PasswordResponses;
exports.StatTimer = StatTimer;
exports.StreamType = StreamType;
exports.TextRenderingMode = TextRenderingMode;
exports.UnexpectedResponseException = UnexpectedResponseException;
@ -1456,7 +1398,7 @@ exports.unreachable = unreachable;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SimpleXMLParser = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.getDefaultSetting = exports.LinkTarget = exports.getFilenameFromUrl = exports.isExternalLinkTargetSet = exports.addLinkAttributes = exports.RenderingCancelledException = exports.CustomStyle = undefined;
exports.DummyStatTimer = exports.StatTimer = exports.SimpleXMLParser = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.getDefaultSetting = exports.LinkTarget = exports.getFilenameFromUrl = exports.isExternalLinkTargetSet = exports.addLinkAttributes = exports.RenderingCancelledException = exports.CustomStyle = undefined;
var _util = __w_pdfjs_require__(0);
@ -1805,6 +1747,67 @@ function isExternalLinkTargetSet() {
return true;
}
}
class StatTimer {
constructor(enable = true) {
this.enabled = !!enable;
this.reset();
}
reset() {
this.started = Object.create(null);
this.times = [];
}
time(name) {
if (!this.enabled) {
return;
}
if (name in this.started) {
(0, _util.warn)('Timer is already running for ' + name);
}
this.started[name] = Date.now();
}
timeEnd(name) {
if (!this.enabled) {
return;
}
if (!(name in this.started)) {
(0, _util.warn)('Timer has not been started for ' + name);
}
this.times.push({
'name': name,
'start': this.started[name],
'end': Date.now()
});
delete this.started[name];
}
toString() {
let times = this.times;
let out = '',
longest = 0;
for (let i = 0, ii = times.length; i < ii; ++i) {
let name = times[i]['name'];
if (name.length > longest) {
longest = name.length;
}
}
for (let i = 0, ii = times.length; i < ii; ++i) {
let span = times[i];
let duration = span.end - span.start;
out += `${span['name'].padEnd(longest)} ${duration}ms\n`;
}
return out;
}
}
class DummyStatTimer {
constructor() {
throw new Error('Cannot initialize DummyStatTimer.');
}
static reset() {}
static time(name) {}
static timeEnd(name) {}
static toString() {
return '';
}
}
exports.CustomStyle = CustomStyle;
exports.RenderingCancelledException = RenderingCancelledException;
exports.addLinkAttributes = addLinkAttributes;
@ -1817,6 +1820,8 @@ exports.DOMCanvasFactory = DOMCanvasFactory;
exports.DOMCMapReaderFactory = DOMCMapReaderFactory;
exports.DOMSVGFactory = DOMSVGFactory;
exports.SimpleXMLParser = SimpleXMLParser;
exports.StatTimer = StatTimer;
exports.DummyStatTimer = DummyStatTimer;
/***/ }),
/* 2 */
@ -1960,7 +1965,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
let apiVersion = '2.0.185';
let apiVersion = '2.0.197';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -2144,8 +2149,7 @@ var PDFPageProxy = function PDFPageProxyClosure() {
this.pageIndex = pageIndex;
this.pageInfo = pageInfo;
this.transport = transport;
this.stats = new _util.StatTimer();
this.stats.enabled = (0, _dom_utils.getDefaultSetting)('enableStats');
this._stats = (0, _dom_utils.getDefaultSetting)('enableStats') ? new _dom_utils.StatTimer() : _dom_utils.DummyStatTimer;
this.commonObjs = transport.commonObjs;
this.objs = new PDFObjects();
this.cleanupAfterRender = false;
@ -2184,7 +2188,7 @@ var PDFPageProxy = function PDFPageProxyClosure() {
return this.annotationsPromise;
},
render: function PDFPageProxy_render(params) {
var stats = this.stats;
let stats = this._stats;
stats.time('Overall');
this.pendingCleanup = false;
var renderingIntent = params.intent === 'print' ? 'print' : 'display';
@ -2202,7 +2206,7 @@ var PDFPageProxy = function PDFPageProxyClosure() {
argsArray: [],
lastChunk: false
};
this.stats.time('Page Request');
stats.time('Page Request');
this.transport.messageHandler.send('RenderPageRequest', {
pageIndex: this.pageNumber - 1,
intent: renderingIntent,
@ -2335,11 +2339,11 @@ var PDFPageProxy = function PDFPageProxyClosure() {
this.pendingCleanup = false;
return Promise.all(waitOn);
},
cleanup: function PDFPageProxy_cleanup() {
cleanup(resetStats = false) {
this.pendingCleanup = true;
this._tryCleanup();
this._tryCleanup(resetStats);
},
_tryCleanup: function PDFPageProxy_tryCleanup() {
_tryCleanup(resetStats = false) {
if (!this.pendingCleanup || Object.keys(this.intentStates).some(function (intent) {
var intentState = this.intentStates[intent];
return intentState.renderTasks.length !== 0 || intentState.receivingOperatorList;
@ -2351,6 +2355,9 @@ var PDFPageProxy = function PDFPageProxyClosure() {
}, this);
this.objs.clear();
this.annotationsPromise = null;
if (resetStats) {
this._stats.reset();
}
this.pendingCleanup = false;
},
_startRenderPage: function PDFPageProxy_startRenderPage(transparency, intent) {
@ -2374,6 +2381,9 @@ var PDFPageProxy = function PDFPageProxyClosure() {
intentState.receivingOperatorList = false;
this._tryCleanup();
}
},
get stats() {
return this._stats instanceof _dom_utils.StatTimer ? this._stats : null;
}
};
return PDFPageProxy;
@ -2804,7 +2814,7 @@ var WorkerTransport = function WorkerTransportClosure() {
return;
}
var page = this.pageCache[data.pageIndex];
page.stats.timeEnd('Page Request');
page._stats.timeEnd('Page Request');
page._startRenderPage(data.transparency, data.intent);
}, this);
messageHandler.on('RenderPageChunk', function transportRender(data) {
@ -3253,8 +3263,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.185';
exports.build = build = 'f2994736';
exports.version = version = '2.0.197';
exports.build = build = '371ca514';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -4627,8 +4637,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.185';
var pdfjsBuild = 'f2994736';
var pdfjsVersion = '2.0.197';
var pdfjsBuild = '371ca514';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(12);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);
@ -4664,7 +4674,6 @@ exports.createBlob = pdfjsSharedUtil.createBlob;
exports.RenderingCancelledException = pdfjsDisplayDOMUtils.RenderingCancelledException;
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
exports.StatTimer = pdfjsSharedUtil.StatTimer;
/***/ }),
/* 9 */
@ -7752,8 +7761,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.185';
PDFJS.build = 'f2994736';
PDFJS.version = '2.0.197';
PDFJS.build = '371ca514';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

Просмотреть файл

@ -98,7 +98,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
__w_pdfjs_require__(20);
@ -904,63 +904,6 @@ function createPromiseCapability() {
});
return capability;
}
var StatTimer = function StatTimerClosure() {
function rpad(str, pad, length) {
while (str.length < length) {
str += pad;
}
return str;
}
function StatTimer() {
this.started = Object.create(null);
this.times = [];
this.enabled = true;
}
StatTimer.prototype = {
time: function StatTimer_time(name) {
if (!this.enabled) {
return;
}
if (name in this.started) {
warn('Timer is already running for ' + name);
}
this.started[name] = Date.now();
},
timeEnd: function StatTimer_timeEnd(name) {
if (!this.enabled) {
return;
}
if (!(name in this.started)) {
warn('Timer has not been started for ' + name);
}
this.times.push({
'name': name,
'start': this.started[name],
'end': Date.now()
});
delete this.started[name];
},
toString: function StatTimer_toString() {
var i, ii;
var times = this.times;
var out = '';
var longest = 0;
for (i = 0, ii = times.length; i < ii; ++i) {
var name = times[i]['name'];
if (name.length > longest) {
longest = name.length;
}
}
for (i = 0, ii = times.length; i < ii; ++i) {
var span = times[i];
var duration = span.end - span.start;
out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
}
return out;
}
};
return StatTimer;
}();
var createBlob = function createBlob(data, contentType) {
if (typeof Blob !== 'undefined') {
return new Blob([data], { type: contentType });
@ -1399,7 +1342,6 @@ exports.NotImplementedException = NotImplementedException;
exports.PageViewport = PageViewport;
exports.PasswordException = PasswordException;
exports.PasswordResponses = PasswordResponses;
exports.StatTimer = StatTimer;
exports.StreamType = StreamType;
exports.TextRenderingMode = TextRenderingMode;
exports.UnexpectedResponseException = UnexpectedResponseException;
@ -17047,7 +16989,7 @@ exports.CFFCompiler = CFFCompiler;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = undefined;
exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = undefined;
var _util = __w_pdfjs_require__(0);
@ -17110,6 +17052,10 @@ var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
t['TimesNewRomanPSMT-Italic'] = 'Times-Italic';
});
var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
t['Calibri'] = 'Helvetica';
t['Calibri-Bold'] = 'Helvetica-Bold';
t['Calibri-BoldItalic'] = 'Helvetica-BoldOblique';
t['Calibri-Italic'] = 'Helvetica-Oblique';
t['CenturyGothic'] = 'Helvetica';
t['CenturyGothic-Bold'] = 'Helvetica-Bold';
t['CenturyGothic-BoldItalic'] = 'Helvetica-BoldOblique';
@ -17681,12 +17627,99 @@ var getSupplementalGlyphMapForArialBlack = (0, _util.getLookupTableFactory)(func
t[264] = 261;
t[291] = 346;
});
let getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(function (t) {
t[1] = 32;
t[4] = 65;
t[17] = 66;
t[18] = 67;
t[24] = 68;
t[28] = 69;
t[38] = 70;
t[39] = 71;
t[44] = 72;
t[47] = 73;
t[58] = 74;
t[60] = 75;
t[62] = 76;
t[68] = 77;
t[69] = 78;
t[75] = 79;
t[87] = 80;
t[89] = 81;
t[90] = 82;
t[94] = 83;
t[100] = 84;
t[104] = 85;
t[115] = 86;
t[116] = 87;
t[121] = 88;
t[122] = 89;
t[127] = 90;
t[258] = 97;
t[268] = 261;
t[271] = 98;
t[272] = 99;
t[273] = 263;
t[282] = 100;
t[286] = 101;
t[295] = 281;
t[296] = 102;
t[336] = 103;
t[346] = 104;
t[349] = 105;
t[361] = 106;
t[364] = 107;
t[367] = 108;
t[371] = 322;
t[373] = 109;
t[374] = 110;
t[381] = 111;
t[383] = 243;
t[393] = 112;
t[395] = 113;
t[396] = 114;
t[400] = 115;
t[401] = 347;
t[410] = 116;
t[437] = 117;
t[448] = 118;
t[449] = 119;
t[454] = 120;
t[455] = 121;
t[460] = 122;
t[463] = 380;
t[853] = 44;
t[855] = 58;
t[856] = 46;
t[876] = 47;
t[878] = 45;
t[882] = 45;
t[894] = 40;
t[895] = 41;
t[896] = 91;
t[897] = 93;
t[923] = 64;
t[1004] = 48;
t[1005] = 49;
t[1006] = 50;
t[1007] = 51;
t[1008] = 52;
t[1009] = 53;
t[1010] = 54;
t[1011] = 55;
t[1012] = 56;
t[1013] = 57;
t[1081] = 37;
t[1085] = 43;
t[1086] = 45;
});
exports.getStdFontMap = getStdFontMap;
exports.getNonStdFontMap = getNonStdFontMap;
exports.getSerifFonts = getSerifFonts;
exports.getSymbolsFonts = getSymbolsFonts;
exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts;
exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack;
exports.getSupplementalGlyphMapForCalibri = getSupplementalGlyphMapForCalibri;
/***/ }),
/* 16 */
@ -20728,8 +20761,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.185';
var pdfjsBuild = 'f2994736';
var pdfjsVersion = '2.0.197';
var pdfjsBuild = '371ca514';
var pdfjsCoreWorker = __w_pdfjs_require__(19);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -20924,7 +20957,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
let apiVersion = docParams.apiVersion;
let workerVersion = '2.0.185';
let workerVersion = '2.0.197';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
}
@ -32329,7 +32362,7 @@ var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() {
};
return OpenTypeFileBuilder;
}();
var ProblematicCharRanges = new Int32Array([0x0000, 0x0020, 0x007F, 0x00A1, 0x00AD, 0x00AE, 0x0600, 0x0780, 0x08A0, 0x10A0, 0x1780, 0x1800, 0x1C00, 0x1C50, 0x2000, 0x2010, 0x2011, 0x2012, 0x2028, 0x2030, 0x205F, 0x2070, 0x25CC, 0x25CD, 0x3000, 0x3001, 0x3164, 0x3165, 0xAA60, 0xAA80, 0xFFF0, 0x10000]);
var ProblematicCharRanges = new Int32Array([0x0000, 0x0020, 0x007F, 0x00A1, 0x00AD, 0x00AE, 0x0600, 0x0780, 0x08A0, 0x10A0, 0x1780, 0x1800, 0x1C00, 0x1C50, 0x2000, 0x2010, 0x2011, 0x2012, 0x2028, 0x2030, 0x205F, 0x2070, 0x25CC, 0x25CD, 0x3000, 0x3001, 0x3164, 0x3165, 0xAA60, 0xAA80, 0xD800, 0xE000, 0xFFF0, 0x10000]);
var Font = function FontClosure() {
function Font(name, file, properties) {
var charCode;
@ -32848,6 +32881,11 @@ var Font = function FontClosure() {
for (charCode in SupplementalGlyphMapForArialBlack) {
map[+charCode] = SupplementalGlyphMapForArialBlack[charCode];
}
} else if (/Calibri/i.test(name)) {
let SupplementalGlyphMapForCalibri = (0, _standard_fonts.getSupplementalGlyphMapForCalibri)();
for (charCode in SupplementalGlyphMapForCalibri) {
map[+charCode] = SupplementalGlyphMapForCalibri[charCode];
}
}
var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap;
if (!isIdentityUnicode) {

Просмотреть файл

@ -1911,7 +1911,7 @@ function webViewerPageRendered(evt) {
let thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageIndex);
thumbnailView.setImage(pageView);
}
if (_pdfjsLib.PDFJS.pdfBug && Stats.enabled && pageView.stats) {
if (_pdfjsLib.PDFJS.pdfBug && typeof Stats !== 'undefined' && Stats.enabled && pageView.stats) {
Stats.add(pageNumber, pageView.stats);
}
if (pageView.error) {
@ -2111,9 +2111,9 @@ function webViewerPageChanging(evt) {
if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {
PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page);
}
if (_pdfjsLib.PDFJS.pdfBug && Stats.enabled) {
if (_pdfjsLib.PDFJS.pdfBug && typeof Stats !== 'undefined' && Stats.enabled) {
let pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1);
if (pageView.stats) {
if (pageView && pageView.stats) {
Stats.add(page, pageView.stats);
}
}