|
|
@ -11664,25 +11664,36 @@ var Catalog = function CatalogClosure() { |
|
|
|
if (!(0, _primitives.isDict)(labelDict)) { |
|
|
|
if (!(0, _primitives.isDict)(labelDict)) { |
|
|
|
throw new _util.FormatError('The PageLabel is not a dictionary.'); |
|
|
|
throw new _util.FormatError('The PageLabel is not a dictionary.'); |
|
|
|
} |
|
|
|
} |
|
|
|
var type = labelDict.get('Type'); |
|
|
|
if (labelDict.has('Type') && !(0, _primitives.isName)(labelDict.get('Type'), 'PageLabel')) { |
|
|
|
if (type && !(0, _primitives.isName)(type, 'PageLabel')) { |
|
|
|
|
|
|
|
throw new _util.FormatError('Invalid type in PageLabel dictionary.'); |
|
|
|
throw new _util.FormatError('Invalid type in PageLabel dictionary.'); |
|
|
|
} |
|
|
|
} |
|
|
|
var s = labelDict.get('S'); |
|
|
|
if (labelDict.has('S')) { |
|
|
|
if (s && !(0, _primitives.isName)(s)) { |
|
|
|
var s = labelDict.get('S'); |
|
|
|
throw new _util.FormatError('Invalid style in PageLabel dictionary.'); |
|
|
|
if (!(0, _primitives.isName)(s)) { |
|
|
|
|
|
|
|
throw new _util.FormatError('Invalid style in PageLabel dictionary.'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
style = s.name; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
style = null; |
|
|
|
} |
|
|
|
} |
|
|
|
style = s ? s.name : null; |
|
|
|
if (labelDict.has('P')) { |
|
|
|
var p = labelDict.get('P'); |
|
|
|
var p = labelDict.get('P'); |
|
|
|
if (p && !(0, _util.isString)(p)) { |
|
|
|
if (!(0, _util.isString)(p)) { |
|
|
|
throw new _util.FormatError('Invalid prefix in PageLabel dictionary.'); |
|
|
|
throw new _util.FormatError('Invalid prefix in PageLabel dictionary.'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
prefix = (0, _util.stringToPDFString)(p); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
prefix = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
prefix = p ? (0, _util.stringToPDFString)(p) : ''; |
|
|
|
if (labelDict.has('St')) { |
|
|
|
var st = labelDict.get('St'); |
|
|
|
var st = labelDict.get('St'); |
|
|
|
if (st && !(Number.isInteger(st) && st >= 1)) { |
|
|
|
if (!(Number.isInteger(st) && st >= 1)) { |
|
|
|
throw new _util.FormatError('Invalid start in PageLabel dictionary.'); |
|
|
|
throw new _util.FormatError('Invalid start in PageLabel dictionary.'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
currentIndex = st; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
currentIndex = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
currentIndex = st || 1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
switch (style) { |
|
|
|
switch (style) { |
|
|
|
case 'D': |
|
|
|
case 'D': |
|
|
@ -11710,9 +11721,9 @@ var Catalog = function CatalogClosure() { |
|
|
|
if (style) { |
|
|
|
if (style) { |
|
|
|
throw new _util.FormatError('Invalid style "' + style + '" in PageLabel dictionary.'); |
|
|
|
throw new _util.FormatError('Invalid style "' + style + '" in PageLabel dictionary.'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
currentLabel = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
pageLabels[i] = prefix + currentLabel; |
|
|
|
pageLabels[i] = prefix + currentLabel; |
|
|
|
currentLabel = ''; |
|
|
|
|
|
|
|
currentIndex++; |
|
|
|
currentIndex++; |
|
|
|
} |
|
|
|
} |
|
|
|
return pageLabels; |
|
|
|
return pageLabels; |
|
|
@ -22350,8 +22361,8 @@ exports.PostScriptCompiler = PostScriptCompiler; |
|
|
|
"use strict"; |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pdfjsVersion = '2.0.451'; |
|
|
|
var pdfjsVersion = '2.0.453'; |
|
|
|
var pdfjsBuild = '24f766b1'; |
|
|
|
var pdfjsBuild = '115fbc47'; |
|
|
|
var pdfjsCoreWorker = __w_pdfjs_require__(74); |
|
|
|
var pdfjsCoreWorker = __w_pdfjs_require__(74); |
|
|
|
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; |
|
|
|
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; |
|
|
|
|
|
|
|
|
|
|
@ -22564,7 +22575,7 @@ var WorkerMessageHandler = { |
|
|
|
var cancelXHRs = null; |
|
|
|
var cancelXHRs = null; |
|
|
|
var WorkerTasks = []; |
|
|
|
var WorkerTasks = []; |
|
|
|
var apiVersion = docParams.apiVersion; |
|
|
|
var apiVersion = docParams.apiVersion; |
|
|
|
var workerVersion = '2.0.451'; |
|
|
|
var workerVersion = '2.0.453'; |
|
|
|
if (apiVersion !== null && apiVersion !== workerVersion) { |
|
|
|
if (apiVersion !== null && apiVersion !== workerVersion) { |
|
|
|
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); |
|
|
|
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); |
|
|
|
} |
|
|
|
} |
|
|
|