Browse Source

PDF.js version 1.0.139

master v1.0.139
Yury Delendik 11 years ago
parent
commit
7941bd83e4
  1. 2
      bower.json
  2. 31
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 31
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.137", "version": "1.0.139",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

31
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.137'; PDFJS.version = '1.0.139';
PDFJS.build = 'c68ba07'; PDFJS.build = 'ae92b6f';
(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
@ -9568,32 +9568,28 @@ var Page = (function PageClosure() {
return stream; return stream;
}, },
loadResources: function(keys) { loadResources: function Page_loadResources(keys) {
if (!this.resourcesPromise) { if (!this.resourcesPromise) {
// TODO: add async getInheritedPageProp and remove this. // TODO: add async getInheritedPageProp and remove this.
this.resourcesPromise = this.pdfManager.ensure(this, 'resources'); this.resourcesPromise = this.pdfManager.ensure(this, 'resources');
} }
var promise = new LegacyPromise(); return this.resourcesPromise.then(function resourceSuccess() {
this.resourcesPromise.then(function resourceSuccess() {
var objectLoader = new ObjectLoader(this.resources.map, var objectLoader = new ObjectLoader(this.resources.map,
keys, keys,
this.xref); this.xref);
objectLoader.load().then(function objectLoaderSuccess() { return objectLoader.load();
promise.resolve();
});
}.bind(this)); }.bind(this));
return promise;
}, },
getOperatorList: function Page_getOperatorList(handler, intent) { getOperatorList: function Page_getOperatorList(handler, intent) {
var self = this; var self = this;
var promise = new LegacyPromise(); var capability = createPromiseCapability();
function reject(e) { function reject(e) {
promise.reject(e); capability.reject(e);
} }
var pageListPromise = new LegacyPromise(); var pageListCapability = createPromiseCapability();
var pdfManager = this.pdfManager; var pdfManager = this.pdfManager;
var contentStreamPromise = pdfManager.ensure(this, 'getContentStream', var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
@ -9627,17 +9623,18 @@ var Page = (function PageClosure() {
intent: intent intent: intent
}); });
partialEvaluator.getOperatorList(contentStream, self.resources, opList); partialEvaluator.getOperatorList(contentStream, self.resources, opList);
pageListPromise.resolve(opList); pageListCapability.resolve(opList);
}); });
var annotationsPromise = pdfManager.ensure(this, 'annotations'); var annotationsPromise = pdfManager.ensure(this, 'annotations');
Promise.all([pageListPromise, annotationsPromise]).then(function(datas) { Promise.all([pageListCapability.promise, annotationsPromise]).then(
function(datas) {
var pageOpList = datas[0]; var pageOpList = datas[0];
var annotations = datas[1]; var annotations = datas[1];
if (annotations.length === 0) { if (annotations.length === 0) {
pageOpList.flush(true); pageOpList.flush(true);
promise.resolve(pageOpList); capability.resolve(pageOpList);
return; return;
} }
@ -9645,11 +9642,11 @@ var Page = (function PageClosure() {
annotations, pageOpList, pdfManager, partialEvaluator, intent); annotations, pageOpList, pdfManager, partialEvaluator, intent);
annotationsReadyPromise.then(function () { annotationsReadyPromise.then(function () {
pageOpList.flush(true); pageOpList.flush(true);
promise.resolve(pageOpList); capability.resolve(pageOpList);
}, reject); }, reject);
}, reject); }, reject);
return promise; return capability.promise;
}, },
extractTextContent: function Page_extractTextContent() { extractTextContent: function Page_extractTextContent() {

4
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.137'; PDFJS.version = '1.0.139';
PDFJS.build = 'c68ba07'; PDFJS.build = 'ae92b6f';
(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

31
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.137'; PDFJS.version = '1.0.139';
PDFJS.build = 'c68ba07'; PDFJS.build = 'ae92b6f';
(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
@ -4987,32 +4987,28 @@ var Page = (function PageClosure() {
return stream; return stream;
}, },
loadResources: function(keys) { loadResources: function Page_loadResources(keys) {
if (!this.resourcesPromise) { if (!this.resourcesPromise) {
// TODO: add async getInheritedPageProp and remove this. // TODO: add async getInheritedPageProp and remove this.
this.resourcesPromise = this.pdfManager.ensure(this, 'resources'); this.resourcesPromise = this.pdfManager.ensure(this, 'resources');
} }
var promise = new LegacyPromise(); return this.resourcesPromise.then(function resourceSuccess() {
this.resourcesPromise.then(function resourceSuccess() {
var objectLoader = new ObjectLoader(this.resources.map, var objectLoader = new ObjectLoader(this.resources.map,
keys, keys,
this.xref); this.xref);
objectLoader.load().then(function objectLoaderSuccess() { return objectLoader.load();
promise.resolve();
});
}.bind(this)); }.bind(this));
return promise;
}, },
getOperatorList: function Page_getOperatorList(handler, intent) { getOperatorList: function Page_getOperatorList(handler, intent) {
var self = this; var self = this;
var promise = new LegacyPromise(); var capability = createPromiseCapability();
function reject(e) { function reject(e) {
promise.reject(e); capability.reject(e);
} }
var pageListPromise = new LegacyPromise(); var pageListCapability = createPromiseCapability();
var pdfManager = this.pdfManager; var pdfManager = this.pdfManager;
var contentStreamPromise = pdfManager.ensure(this, 'getContentStream', var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
@ -5046,17 +5042,18 @@ var Page = (function PageClosure() {
intent: intent intent: intent
}); });
partialEvaluator.getOperatorList(contentStream, self.resources, opList); partialEvaluator.getOperatorList(contentStream, self.resources, opList);
pageListPromise.resolve(opList); pageListCapability.resolve(opList);
}); });
var annotationsPromise = pdfManager.ensure(this, 'annotations'); var annotationsPromise = pdfManager.ensure(this, 'annotations');
Promise.all([pageListPromise, annotationsPromise]).then(function(datas) { Promise.all([pageListCapability.promise, annotationsPromise]).then(
function(datas) {
var pageOpList = datas[0]; var pageOpList = datas[0];
var annotations = datas[1]; var annotations = datas[1];
if (annotations.length === 0) { if (annotations.length === 0) {
pageOpList.flush(true); pageOpList.flush(true);
promise.resolve(pageOpList); capability.resolve(pageOpList);
return; return;
} }
@ -5064,11 +5061,11 @@ var Page = (function PageClosure() {
annotations, pageOpList, pdfManager, partialEvaluator, intent); annotations, pageOpList, pdfManager, partialEvaluator, intent);
annotationsReadyPromise.then(function () { annotationsReadyPromise.then(function () {
pageOpList.flush(true); pageOpList.flush(true);
promise.resolve(pageOpList); capability.resolve(pageOpList);
}, reject); }, reject);
}, reject); }, reject);
return promise; return capability.promise;
}, },
extractTextContent: function Page_extractTextContent() { extractTextContent: function Page_extractTextContent() {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.137", "version": "1.0.139",
"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