Browse Source

PDF.js version 1.1.179

master v1.1.179
Pdf Bot 10 years ago
parent
commit
f29f158545
  1. 2
      bower.json
  2. 62
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 62
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

62
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.177'; PDFJS.version = '1.1.179';
PDFJS.build = 'd3fa65e'; PDFJS.build = '5c3c516';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -8964,17 +8964,33 @@ var Page = (function PageClosure() {
return this.pageDict.get(key); return this.pageDict.get(key);
}, },
getInheritedPageProp: function Page_inheritPageProp(key) { getInheritedPageProp: function Page_getInheritedPageProp(key) {
var dict = this.pageDict; var dict = this.pageDict, valueArray = null, loopCount = 0;
var MAX_LOOP_COUNT = 100;
// Always walk up the entire parent chain, to be able to find
// e.g. \Resources placed on multiple levels of the tree.
while (dict) {
var value = dict.get(key); var value = dict.get(key);
while (value === undefined) { if (value) {
dict = dict.get('Parent'); if (!valueArray) {
if (!dict) { valueArray = [];
}
valueArray.push(value);
}
if (++loopCount > MAX_LOOP_COUNT) {
warn('Page_getInheritedPageProp: maximum loop count exceeded.');
break; break;
} }
value = dict.get(key); dict = dict.get('Parent');
}
if (!valueArray) {
return Dict.empty;
} }
return value; if (valueArray.length === 1 || !isDict(valueArray[0]) ||
loopCount > MAX_LOOP_COUNT) {
return valueArray[0];
}
return Dict.merge(this.xref, valueArray);
}, },
get content() { get content() {
@ -8982,14 +8998,10 @@ var Page = (function PageClosure() {
}, },
get resources() { get resources() {
var value = this.getInheritedPageProp('Resources');
// For robustness: The spec states that a \Resources entry has to be // For robustness: The spec states that a \Resources entry has to be
// present, but can be empty. Some document omit it still. In this case // present, but can be empty. Some document omit it still, in this case
// return an empty dictionary: // we return an empty dictionary.
if (value === undefined) { return shadow(this, 'resources', this.getInheritedPageProp('Resources'));
value = Dict.empty;
}
return shadow(this, 'resources', value);
}, },
get mediaBox() { get mediaBox() {
@ -9647,6 +9659,24 @@ var Dict = (function DictClosure() {
Dict.empty = new Dict(null); Dict.empty = new Dict(null);
Dict.merge = function Dict_merge(xref, dictArray) {
var mergedDict = new Dict(xref);
for (var i = 0, ii = dictArray.length; i < ii; i++) {
var dict = dictArray[i];
if (!isDict(dict)) {
continue;
}
for (var keyName in dict.map) {
if (mergedDict.map[keyName]) {
continue;
}
mergedDict.map[keyName] = dict.map[keyName];
}
}
return mergedDict;
};
return Dict; return Dict;
})(); })();

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.177'; PDFJS.version = '1.1.179';
PDFJS.build = 'd3fa65e'; PDFJS.build = '5c3c516';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

62
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.177'; PDFJS.version = '1.1.179';
PDFJS.build = 'd3fa65e'; PDFJS.build = '5c3c516';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -2611,17 +2611,33 @@ var Page = (function PageClosure() {
return this.pageDict.get(key); return this.pageDict.get(key);
}, },
getInheritedPageProp: function Page_inheritPageProp(key) { getInheritedPageProp: function Page_getInheritedPageProp(key) {
var dict = this.pageDict; var dict = this.pageDict, valueArray = null, loopCount = 0;
var MAX_LOOP_COUNT = 100;
// Always walk up the entire parent chain, to be able to find
// e.g. \Resources placed on multiple levels of the tree.
while (dict) {
var value = dict.get(key); var value = dict.get(key);
while (value === undefined) { if (value) {
dict = dict.get('Parent'); if (!valueArray) {
if (!dict) { valueArray = [];
}
valueArray.push(value);
}
if (++loopCount > MAX_LOOP_COUNT) {
warn('Page_getInheritedPageProp: maximum loop count exceeded.');
break; break;
} }
value = dict.get(key); dict = dict.get('Parent');
}
if (!valueArray) {
return Dict.empty;
} }
return value; if (valueArray.length === 1 || !isDict(valueArray[0]) ||
loopCount > MAX_LOOP_COUNT) {
return valueArray[0];
}
return Dict.merge(this.xref, valueArray);
}, },
get content() { get content() {
@ -2629,14 +2645,10 @@ var Page = (function PageClosure() {
}, },
get resources() { get resources() {
var value = this.getInheritedPageProp('Resources');
// For robustness: The spec states that a \Resources entry has to be // For robustness: The spec states that a \Resources entry has to be
// present, but can be empty. Some document omit it still. In this case // present, but can be empty. Some document omit it still, in this case
// return an empty dictionary: // we return an empty dictionary.
if (value === undefined) { return shadow(this, 'resources', this.getInheritedPageProp('Resources'));
value = Dict.empty;
}
return shadow(this, 'resources', value);
}, },
get mediaBox() { get mediaBox() {
@ -3294,6 +3306,24 @@ var Dict = (function DictClosure() {
Dict.empty = new Dict(null); Dict.empty = new Dict(null);
Dict.merge = function Dict_merge(xref, dictArray) {
var mergedDict = new Dict(xref);
for (var i = 0, ii = dictArray.length; i < ii; i++) {
var dict = dictArray[i];
if (!isDict(dict)) {
continue;
}
for (var keyName in dict.map) {
if (mergedDict.map[keyName]) {
continue;
}
mergedDict.map[keyName] = dict.map[keyName];
}
}
return mergedDict;
};
return Dict; return Dict;
})(); })();

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.1.177", "version": "1.1.179",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

Loading…
Cancel
Save