|
@@ -12716,8 +12716,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
|
|
|
}
|
|
|
};
|
|
|
}();
|
|
|
-exports.version = '1.7.395';
|
|
|
-exports.build = '07f7c97b';
|
|
|
+exports.version = '1.7.397';
|
|
|
+exports.build = '72eeb1cc';
|
|
|
exports.getDocument = getDocument;
|
|
|
exports.PDFDataRangeTransport = PDFDataRangeTransport;
|
|
|
exports.PDFWorker = PDFWorker;
|
|
@@ -22837,6 +22837,7 @@ var stringToUTF8String = sharedUtil.stringToUTF8String;
|
|
|
var warn = sharedUtil.warn;
|
|
|
var createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl;
|
|
|
var Util = sharedUtil.Util;
|
|
|
+var Dict = corePrimitives.Dict;
|
|
|
var Ref = corePrimitives.Ref;
|
|
|
var RefSet = corePrimitives.RefSet;
|
|
|
var RefSetCache = corePrimitives.RefSetCache;
|
|
@@ -22856,9 +22857,10 @@ var Catalog = function CatalogClosure() {
|
|
|
this.pdfManager = pdfManager;
|
|
|
this.xref = xref;
|
|
|
this.catDict = xref.getCatalogObj();
|
|
|
+ assert(isDict(this.catDict), 'catalog object is not a dictionary');
|
|
|
this.fontCache = new RefSetCache();
|
|
|
this.builtInCMapCache = Object.create(null);
|
|
|
- assert(isDict(this.catDict), 'catalog object is not a dictionary');
|
|
|
+ this.pageKidsCountCache = new RefSetCache();
|
|
|
this.pageFactory = pageFactory;
|
|
|
this.pagePromises = [];
|
|
|
}
|
|
@@ -23174,6 +23176,7 @@ var Catalog = function CatalogClosure() {
|
|
|
return shadow(this, 'javaScript', javaScript);
|
|
|
},
|
|
|
cleanup: function Catalog_cleanup() {
|
|
|
+ this.pageKidsCountCache.clear();
|
|
|
var promises = [];
|
|
|
this.fontCache.forEach(function (promise) {
|
|
|
promises.push(promise);
|
|
@@ -23200,15 +23203,25 @@ var Catalog = function CatalogClosure() {
|
|
|
getPageDict: function Catalog_getPageDict(pageIndex) {
|
|
|
var capability = createPromiseCapability();
|
|
|
var nodesToVisit = [this.catDict.getRaw('Pages')];
|
|
|
- var currentPageIndex = 0;
|
|
|
- var xref = this.xref;
|
|
|
+ var count,
|
|
|
+ currentPageIndex = 0;
|
|
|
+ var xref = this.xref,
|
|
|
+ pageKidsCountCache = this.pageKidsCountCache;
|
|
|
function next() {
|
|
|
while (nodesToVisit.length) {
|
|
|
var currentNode = nodesToVisit.pop();
|
|
|
if (isRef(currentNode)) {
|
|
|
+ count = pageKidsCountCache.get(currentNode);
|
|
|
+ if (count > 0 && currentPageIndex + count < pageIndex) {
|
|
|
+ currentPageIndex += count;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
xref.fetchAsync(currentNode).then(function (obj) {
|
|
|
if (isDict(obj, 'Page') || isDict(obj) && !obj.has('Kids')) {
|
|
|
if (pageIndex === currentPageIndex) {
|
|
|
+ if (currentNode && !pageKidsCountCache.has(currentNode)) {
|
|
|
+ pageKidsCountCache.put(currentNode, 1);
|
|
|
+ }
|
|
|
capability.resolve([obj, currentNode]);
|
|
|
} else {
|
|
|
currentPageIndex++;
|
|
@@ -23222,7 +23235,11 @@ var Catalog = function CatalogClosure() {
|
|
|
return;
|
|
|
}
|
|
|
assert(isDict(currentNode), 'page dictionary kid reference points to wrong type of object');
|
|
|
- var count = currentNode.get('Count');
|
|
|
+ count = currentNode.get('Count');
|
|
|
+ var objId = currentNode.objId;
|
|
|
+ if (objId && !pageKidsCountCache.has(objId)) {
|
|
|
+ pageKidsCountCache.put(objId, count);
|
|
|
+ }
|
|
|
if (currentPageIndex + count <= pageIndex) {
|
|
|
currentPageIndex += count;
|
|
|
continue;
|
|
@@ -23814,7 +23831,7 @@ var XRef = function XRefClosure() {
|
|
|
var num = ref.num;
|
|
|
if (num in this.cache) {
|
|
|
var cacheEntry = this.cache[num];
|
|
|
- if (isDict(cacheEntry) && !cacheEntry.objId) {
|
|
|
+ if (cacheEntry instanceof Dict && !cacheEntry.objId) {
|
|
|
cacheEntry.objId = ref.toString();
|
|
|
}
|
|
|
return cacheEntry;
|
|
@@ -27891,8 +27908,8 @@ if (!globalScope.PDFJS) {
|
|
|
globalScope.PDFJS = {};
|
|
|
}
|
|
|
var PDFJS = globalScope.PDFJS;
|
|
|
-PDFJS.version = '1.7.395';
|
|
|
-PDFJS.build = '07f7c97b';
|
|
|
+PDFJS.version = '1.7.397';
|
|
|
+PDFJS.build = '72eeb1cc';
|
|
|
PDFJS.pdfBug = false;
|
|
|
if (PDFJS.verbosity !== undefined) {
|
|
|
sharedUtil.setVerbosityLevel(PDFJS.verbosity);
|
|
@@ -43430,8 +43447,8 @@ exports.TilingPattern = TilingPattern;
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
-var pdfjsVersion = '1.7.395';
|
|
|
-var pdfjsBuild = '07f7c97b';
|
|
|
+var pdfjsVersion = '1.7.397';
|
|
|
+var pdfjsBuild = '72eeb1cc';
|
|
|
var pdfjsSharedUtil = __w_pdfjs_require__(0);
|
|
|
var pdfjsDisplayGlobal = __w_pdfjs_require__(26);
|
|
|
var pdfjsDisplayAPI = __w_pdfjs_require__(10);
|