Browse Source

PDF.js version 2.0.430 - See mozilla/pdf.js@db6e316efd1739fbe854ca39f771eb64dd8096f6

master v2.0.430
pdfjsbot 7 years ago
parent
commit
f5ad4816be
  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. 3
      lib/web/pdf_link_service.js
  14. 4
      lib/web/pdf_viewer.component.js
  15. 2
      package.json
  16. 7
      web/pdf_viewer.js
  17. 2
      web/pdf_viewer.js.map

2
bower.json

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

10
build/pdf.js

@ -3135,8 +3135,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions; @@ -3135,8 +3135,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions;
"use strict";
var pdfjsVersion = '2.0.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayAPI = __w_pdfjs_require__(117);
var pdfjsDisplayTextLayer = __w_pdfjs_require__(124);
@ -8567,7 +8567,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -8567,7 +8567,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.0.428',
apiVersion: '2.0.430',
source: {
data: source.data,
url: source.url,
@ -10001,8 +10001,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -10001,8 +10001,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.428';
exports.build = build = '6662985a';
exports.version = version = '2.0.430';
exports.build = build = 'db6e316e';
}
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

@ -11871,16 +11871,26 @@ var Catalog = function CatalogClosure() { @@ -11871,16 +11871,26 @@ var Catalog = function CatalogClosure() {
return;
}
count = currentNode.get('Count');
var objId = currentNode.objId;
if (objId && !pageKidsCountCache.has(objId)) {
pageKidsCountCache.put(objId, count);
}
if (currentPageIndex + count <= pageIndex) {
currentPageIndex += count;
continue;
if (Number.isInteger(count) && count >= 0) {
var objId = currentNode.objId;
if (objId && !pageKidsCountCache.has(objId)) {
pageKidsCountCache.put(objId, count);
}
if (currentPageIndex + count <= pageIndex) {
currentPageIndex += count;
continue;
}
}
var kids = currentNode.get('Kids');
if (!Array.isArray(kids)) {
if ((0, _primitives.isName)(currentNode.get('Type'), 'Page') || !currentNode.has('Type') && currentNode.has('Contents')) {
if (currentPageIndex === pageIndex) {
capability.resolve([currentNode, null]);
return;
}
currentPageIndex++;
continue;
}
capability.reject(new _util.FormatError('page dictionary kids object is not an array'));
return;
}
@ -11929,11 +11939,14 @@ var Catalog = function CatalogClosure() { @@ -11929,11 +11939,14 @@ var Catalog = function CatalogClosure() {
if (!(0, _primitives.isRef)(kid)) {
throw new _util.FormatError('kid must be a Ref.');
}
if (kid.num === kidRef.num) {
if ((0, _primitives.isRefsEqual)(kid, kidRef)) {
found = true;
break;
}
kidPromises.push(xref.fetchAsync(kid).then(function (kid) {
if (!(0, _primitives.isDict)(kid)) {
throw new _util.FormatError('kid node must be a Dict.');
}
if (kid.has('Count')) {
var count = kid.get('Count');
total += count;
@ -22337,8 +22350,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -22337,8 +22350,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22551,7 +22564,7 @@ var WorkerMessageHandler = { @@ -22551,7 +22564,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.428';
var workerVersion = '2.0.430';
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

@ -477,16 +477,26 @@ var Catalog = function CatalogClosure() { @@ -477,16 +477,26 @@ var Catalog = function CatalogClosure() {
return;
}
count = currentNode.get('Count');
var objId = currentNode.objId;
if (objId && !pageKidsCountCache.has(objId)) {
pageKidsCountCache.put(objId, count);
}
if (currentPageIndex + count <= pageIndex) {
currentPageIndex += count;
continue;
if (Number.isInteger(count) && count >= 0) {
var objId = currentNode.objId;
if (objId && !pageKidsCountCache.has(objId)) {
pageKidsCountCache.put(objId, count);
}
if (currentPageIndex + count <= pageIndex) {
currentPageIndex += count;
continue;
}
}
var kids = currentNode.get('Kids');
if (!Array.isArray(kids)) {
if ((0, _primitives.isName)(currentNode.get('Type'), 'Page') || !currentNode.has('Type') && currentNode.has('Contents')) {
if (currentPageIndex === pageIndex) {
capability.resolve([currentNode, null]);
return;
}
currentPageIndex++;
continue;
}
capability.reject(new _util.FormatError('page dictionary kids object is not an array'));
return;
}
@ -535,11 +545,14 @@ var Catalog = function CatalogClosure() { @@ -535,11 +545,14 @@ var Catalog = function CatalogClosure() {
if (!(0, _primitives.isRef)(kid)) {
throw new _util.FormatError('kid must be a Ref.');
}
if (kid.num === kidRef.num) {
if ((0, _primitives.isRefsEqual)(kid, kidRef)) {
found = true;
break;
}
kidPromises.push(xref.fetchAsync(kid).then(function (kid) {
if (!(0, _primitives.isDict)(kid)) {
throw new _util.FormatError('kid node must be a Dict.');
}
if (kid.has('Count')) {
var count = kid.get('Count');
total += count;

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.428';
var workerVersion = '2.0.430';
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.428',
apiVersion: '2.0.430',
source: {
data: source.data,
url: source.url,
@ -1668,8 +1668,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1668,8 +1668,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.428';
exports.build = build = '6662985a';
exports.version = version = '2.0.430';
exports.build = build = 'db6e316e';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
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.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

3
lib/web/pdf_link_service.js

@ -289,6 +289,9 @@ var PDFLinkService = function () { @@ -289,6 +289,9 @@ var PDFLinkService = function () {
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {
if (!pageRef) {
return;
}
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
this._pagesRefCache[refStr] = pageNum;
}

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.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
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.428",
"version": "2.0.430",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

7
web/pdf_viewer.js

@ -1044,6 +1044,9 @@ var PDFLinkService = function () { @@ -1044,6 +1044,9 @@ var PDFLinkService = function () {
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {
if (!pageRef) {
return;
}
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
this._pagesRefCache[refStr] = pageNum;
}
@ -3180,8 +3183,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16); @@ -3180,8 +3183,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16);
var _pdf_viewer = __w_pdfjs_require__(17);
var pdfjsVersion = '2.0.428';
var pdfjsBuild = '6662985a';
var pdfjsVersion = '2.0.430';
var pdfjsBuild = 'db6e316e';
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