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. 47
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 41
      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 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "2.0.451", "version": "2.0.453",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

10
build/pdf.js

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

47
build/pdf.worker.js vendored

@ -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 + '".'));
} }

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

41
lib/core/obj.js

@ -270,25 +270,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':
@ -316,9 +327,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;

2
lib/core/worker.js

@ -223,7 +223,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 + '".'));
} }

6
lib/display/api.js

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

4
lib/pdf.js

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

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.451'; var pdfjsVersion = '2.0.453';
var pdfjsBuild = '24f766b1'; var pdfjsBuild = '115fbc47';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; 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');
var _pdf_viewer = require('./pdf_viewer.js'); var _pdf_viewer = require('./pdf_viewer.js');
var pdfjsVersion = '2.0.451'; var pdfjsVersion = '2.0.453';
var pdfjsBuild = '24f766b1'; var pdfjsBuild = '115fbc47';
exports.PDFViewer = _pdf_viewer.PDFViewer; exports.PDFViewer = _pdf_viewer.PDFViewer;
exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer; exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer;
exports.PDFPageView = _pdf_page_view.PDFPageView; exports.PDFPageView = _pdf_page_view.PDFPageView;

2
package.json

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

4
web/pdf_viewer.js

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