Browse Source

PDF.js version 2.0.453 - See mozilla/pdf.js@115fbc47fed6f9894776c2bb1be9778fe7f9c918

master v2.0.453
pdfjsbot 7 years ago
parent
commit
731514526c
  1. 2
      bower.json
  2. 10
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 35
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 29
      lib/core/obj.js
  9. 2
      lib/core/worker.js
  10. 6
      lib/display/api.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 4
      lib/web/pdf_viewer.component.js
  14. 2
      package.json
  15. 4
      web/pdf_viewer.js
  16. 2
      web/pdf_viewer.js.map

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "2.0.451",
"version": "2.0.453",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

10
build/pdf.js

@ -3004,8 +3004,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions; @@ -3004,8 +3004,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions;
"use strict";
var pdfjsVersion = '2.0.451';
var pdfjsBuild = '24f766b1';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayAPI = __w_pdfjs_require__(117);
var pdfjsDisplayTextLayer = __w_pdfjs_require__(125);
@ -8436,7 +8436,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -8436,7 +8436,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.0.451',
apiVersion: '2.0.453',
source: {
data: source.data,
url: source.url,
@ -9867,8 +9867,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -9867,8 +9867,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.451';
exports.build = build = '24f766b1';
exports.version = version = '2.0.453';
exports.build = build = '115fbc47';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

35
build/pdf.worker.js vendored

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

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

29
lib/core/obj.js

@ -270,25 +270,36 @@ var Catalog = function CatalogClosure() { @@ -270,25 +270,36 @@ var Catalog = function CatalogClosure() {
if (!(0, _primitives.isDict)(labelDict)) {
throw new _util.FormatError('The PageLabel is not a dictionary.');
}
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.');
}
if (labelDict.has('S')) {
var s = labelDict.get('S');
if (s && !(0, _primitives.isName)(s)) {
if (!(0, _primitives.isName)(s)) {
throw new _util.FormatError('Invalid style in PageLabel dictionary.');
}
style = s ? s.name : null;
style = s.name;
} else {
style = null;
}
if (labelDict.has('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.');
}
prefix = p ? (0, _util.stringToPDFString)(p) : '';
prefix = (0, _util.stringToPDFString)(p);
} else {
prefix = '';
}
if (labelDict.has('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.');
}
currentIndex = st || 1;
currentIndex = st;
} else {
currentIndex = 1;
}
}
switch (style) {
case 'D':
@ -316,9 +327,9 @@ var Catalog = function CatalogClosure() { @@ -316,9 +327,9 @@ var Catalog = function CatalogClosure() {
if (style) {
throw new _util.FormatError('Invalid style "' + style + '" in PageLabel dictionary.');
}
currentLabel = '';
}
pageLabels[i] = prefix + currentLabel;
currentLabel = '';
currentIndex++;
}
return pageLabels;

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = { @@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.451';
var workerVersion = '2.0.453';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}

6
lib/display/api.js

@ -234,7 +234,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -234,7 +234,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.0.451',
apiVersion: '2.0.453',
source: {
data: source.data,
url: source.url,
@ -1665,8 +1665,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1665,8 +1665,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.451';
exports.build = build = '24f766b1';
exports.version = version = '2.0.453';
exports.build = build = '115fbc47';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.451';
var pdfjsBuild = '24f766b1';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayAPI = require('./display/api.js');
var pdfjsDisplayTextLayer = require('./display/text_layer.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
*/
'use strict';
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;

4
lib/web/pdf_viewer.component.js

@ -48,8 +48,8 @@ var _pdf_single_page_viewer = require('./pdf_single_page_viewer'); @@ -48,8 +48,8 @@ var _pdf_single_page_viewer = require('./pdf_single_page_viewer');
var _pdf_viewer = require('./pdf_viewer.js');
var pdfjsVersion = '2.0.451';
var pdfjsBuild = '24f766b1';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
exports.PDFViewer = _pdf_viewer.PDFViewer;
exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer;
exports.PDFPageView = _pdf_page_view.PDFPageView;

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "2.0.451",
"version": "2.0.453",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

4
web/pdf_viewer.js

@ -3179,8 +3179,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16); @@ -3179,8 +3179,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16);
var _pdf_viewer = __w_pdfjs_require__(17);
var pdfjsVersion = '2.0.451';
var pdfjsBuild = '24f766b1';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
exports.PDFViewer = _pdf_viewer.PDFViewer;
exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer;
exports.PDFPageView = _pdf_page_view.PDFPageView;

2
web/pdf_viewer.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save