pdfjs-dist
Advanced tools
Comparing version 2.0.451 to 2.0.453
{ | ||
"name": "pdfjs-dist", | ||
"version": "2.0.451", | ||
"version": "2.0.453", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "build/pdf.js", |
@@ -273,21 +273,32 @@ /** | ||
} | ||
var type = labelDict.get('Type'); | ||
if (type && !(0, _primitives.isName)(type, 'PageLabel')) { | ||
if (labelDict.has('Type') && !(0, _primitives.isName)(labelDict.get('Type'), 'PageLabel')) { | ||
throw new _util.FormatError('Invalid type in PageLabel dictionary.'); | ||
} | ||
var s = labelDict.get('S'); | ||
if (s && !(0, _primitives.isName)(s)) { | ||
throw new _util.FormatError('Invalid style in PageLabel dictionary.'); | ||
if (labelDict.has('S')) { | ||
var s = labelDict.get('S'); | ||
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; | ||
var p = labelDict.get('P'); | ||
if (p && !(0, _util.isString)(p)) { | ||
throw new _util.FormatError('Invalid prefix in PageLabel dictionary.'); | ||
if (labelDict.has('P')) { | ||
var p = labelDict.get('P'); | ||
if (!(0, _util.isString)(p)) { | ||
throw new _util.FormatError('Invalid prefix in PageLabel dictionary.'); | ||
} | ||
prefix = (0, _util.stringToPDFString)(p); | ||
} else { | ||
prefix = ''; | ||
} | ||
prefix = p ? (0, _util.stringToPDFString)(p) : ''; | ||
var st = labelDict.get('St'); | ||
if (st && !(Number.isInteger(st) && st >= 1)) { | ||
throw new _util.FormatError('Invalid start in PageLabel dictionary.'); | ||
if (labelDict.has('St')) { | ||
var st = labelDict.get('St'); | ||
if (!(Number.isInteger(st) && st >= 1)) { | ||
throw new _util.FormatError('Invalid start in PageLabel dictionary.'); | ||
} | ||
currentIndex = st; | ||
} else { | ||
currentIndex = 1; | ||
} | ||
currentIndex = st || 1; | ||
} | ||
@@ -320,5 +331,5 @@ switch (style) { | ||
} | ||
currentLabel = ''; | ||
} | ||
pageLabels[i] = prefix + currentLabel; | ||
currentLabel = ''; | ||
currentIndex++; | ||
@@ -325,0 +336,0 @@ } |
@@ -226,3 +226,3 @@ /** | ||
var apiVersion = docParams.apiVersion; | ||
var workerVersion = '2.0.451'; | ||
var workerVersion = '2.0.453'; | ||
if (apiVersion !== null && apiVersion !== workerVersion) { | ||
@@ -229,0 +229,0 @@ throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); |
@@ -237,3 +237,3 @@ /** | ||
docId: docId, | ||
apiVersion: '2.0.451', | ||
apiVersion: '2.0.453', | ||
source: { | ||
@@ -1669,4 +1669,4 @@ data: source.data, | ||
{ | ||
exports.version = version = '2.0.451'; | ||
exports.build = build = '24f766b1'; | ||
exports.version = version = '2.0.453'; | ||
exports.build = build = '115fbc47'; | ||
} | ||
@@ -1673,0 +1673,0 @@ exports.getDocument = getDocument; |
@@ -24,4 +24,4 @@ /** | ||
var pdfjsVersion = '2.0.451'; | ||
var pdfjsBuild = '24f766b1'; | ||
var pdfjsVersion = '2.0.453'; | ||
var pdfjsBuild = '115fbc47'; | ||
var pdfjsSharedUtil = require('./shared/util.js'); | ||
@@ -28,0 +28,0 @@ var pdfjsDisplayAPI = require('./display/api.js'); |
@@ -24,5 +24,5 @@ /** | ||
var pdfjsVersion = '2.0.451'; | ||
var pdfjsBuild = '24f766b1'; | ||
var pdfjsVersion = '2.0.453'; | ||
var pdfjsBuild = '115fbc47'; | ||
var pdfjsCoreWorker = require('./core/worker.js'); | ||
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; |
@@ -51,4 +51,4 @@ /** | ||
var pdfjsVersion = '2.0.451'; | ||
var pdfjsBuild = '24f766b1'; | ||
var pdfjsVersion = '2.0.453'; | ||
var pdfjsBuild = '115fbc47'; | ||
exports.PDFViewer = _pdf_viewer.PDFViewer; | ||
@@ -55,0 +55,0 @@ exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer; |
{ | ||
"name": "pdfjs-dist", | ||
"version": "2.0.451", | ||
"version": "2.0.453", | ||
"main": "build/pdf.js", | ||
@@ -5,0 +5,0 @@ "description": "Generic build of Mozilla's PDF.js library.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11057504
138626