|
@@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {};
|
|
|
}
|
|
|
|
|
|
-PDFJS.version = '1.3.42';
|
|
|
-PDFJS.build = '84a47f8';
|
|
|
+PDFJS.version = '1.3.44';
|
|
|
+PDFJS.build = '361fa83';
|
|
|
|
|
|
(function pdfjsWrapper() {
|
|
|
// Use strict in our context only - users might not want it
|
|
@@ -9914,7 +9914,7 @@ var Page = (function PageClosure() {
|
|
|
}
|
|
|
|
|
|
var annotationsReadyPromise = Annotation.appendToOperatorList(
|
|
|
- annotations, pageOpList, pdfManager, partialEvaluator, task, intent);
|
|
|
+ annotations, pageOpList, partialEvaluator, task, intent);
|
|
|
return annotationsReadyPromise.then(function () {
|
|
|
pageOpList.flush(true);
|
|
|
return pageOpList;
|
|
@@ -12187,25 +12187,22 @@ var Annotation = (function AnnotationClosure() {
|
|
|
|
|
|
function Annotation(params) {
|
|
|
var dict = params.dict;
|
|
|
- var data = this.data = {};
|
|
|
-
|
|
|
- data.subtype = dict.get('Subtype').name;
|
|
|
|
|
|
this.setFlags(dict.get('F'));
|
|
|
- data.annotationFlags = this.flags;
|
|
|
-
|
|
|
this.setRectangle(dict.get('Rect'));
|
|
|
- data.rect = this.rectangle;
|
|
|
-
|
|
|
this.setColor(dict.get('C'));
|
|
|
- data.color = this.color;
|
|
|
-
|
|
|
- this.borderStyle = data.borderStyle = new AnnotationBorderStyle();
|
|
|
this.setBorderStyle(dict);
|
|
|
-
|
|
|
this.appearance = getDefaultAppearance(dict);
|
|
|
- data.hasAppearance = !!this.appearance;
|
|
|
- data.id = params.ref.num;
|
|
|
+
|
|
|
+ // Expose public properties using a data object.
|
|
|
+ this.data = {};
|
|
|
+ this.data.id = params.ref.num;
|
|
|
+ this.data.subtype = dict.get('Subtype').name;
|
|
|
+ this.data.annotationFlags = this.flags;
|
|
|
+ this.data.rect = this.rectangle;
|
|
|
+ this.data.color = this.color;
|
|
|
+ this.data.borderStyle = this.borderStyle;
|
|
|
+ this.data.hasAppearance = !!this.appearance;
|
|
|
}
|
|
|
|
|
|
Annotation.prototype = {
|
|
@@ -12332,6 +12329,7 @@ var Annotation = (function AnnotationClosure() {
|
|
|
* @param {Dict} borderStyle - The border style dictionary
|
|
|
*/
|
|
|
setBorderStyle: function Annotation_setBorderStyle(borderStyle) {
|
|
|
+ this.borderStyle = new AnnotationBorderStyle();
|
|
|
if (!isDict(borderStyle)) {
|
|
|
return;
|
|
|
}
|
|
@@ -12384,13 +12382,11 @@ var Annotation = (function AnnotationClosure() {
|
|
|
},
|
|
|
|
|
|
getOperatorList: function Annotation_getOperatorList(evaluator, task) {
|
|
|
-
|
|
|
if (!this.appearance) {
|
|
|
return Promise.resolve(new OperatorList());
|
|
|
}
|
|
|
|
|
|
var data = this.data;
|
|
|
-
|
|
|
var appearanceDict = this.appearance.dict;
|
|
|
var resourcesPromise = this.loadResources([
|
|
|
'ExtGState',
|
|
@@ -12422,33 +12418,22 @@ var Annotation = (function AnnotationClosure() {
|
|
|
};
|
|
|
|
|
|
Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
|
|
|
- annotations, opList, pdfManager, partialEvaluator, task, intent) {
|
|
|
-
|
|
|
- function reject(e) {
|
|
|
- annotationsReadyCapability.reject(e);
|
|
|
- }
|
|
|
-
|
|
|
- var annotationsReadyCapability = createPromiseCapability();
|
|
|
-
|
|
|
+ annotations, opList, partialEvaluator, task, intent) {
|
|
|
var annotationPromises = [];
|
|
|
for (var i = 0, n = annotations.length; i < n; ++i) {
|
|
|
- if (intent === 'display' && annotations[i].viewable ||
|
|
|
- intent === 'print' && annotations[i].printable) {
|
|
|
+ if ((intent === 'display' && annotations[i].viewable) ||
|
|
|
+ (intent === 'print' && annotations[i].printable)) {
|
|
|
annotationPromises.push(
|
|
|
annotations[i].getOperatorList(partialEvaluator, task));
|
|
|
}
|
|
|
}
|
|
|
- Promise.all(annotationPromises).then(function(datas) {
|
|
|
+ return Promise.all(annotationPromises).then(function(operatorLists) {
|
|
|
opList.addOp(OPS.beginAnnotations, []);
|
|
|
- for (var i = 0, n = datas.length; i < n; ++i) {
|
|
|
- var annotOpList = datas[i];
|
|
|
- opList.addOpList(annotOpList);
|
|
|
+ for (var i = 0, n = operatorLists.length; i < n; ++i) {
|
|
|
+ opList.addOpList(operatorLists[i]);
|
|
|
}
|
|
|
opList.addOp(OPS.endAnnotations, []);
|
|
|
- annotationsReadyCapability.resolve();
|
|
|
- }, reject);
|
|
|
-
|
|
|
- return annotationsReadyCapability.promise;
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
return Annotation;
|
|
@@ -12593,7 +12578,6 @@ var AnnotationBorderStyle = (function AnnotationBorderStyleClosure() {
|
|
|
})();
|
|
|
|
|
|
var WidgetAnnotation = (function WidgetAnnotationClosure() {
|
|
|
-
|
|
|
function WidgetAnnotation(params) {
|
|
|
Annotation.call(this, params);
|
|
|
|
|
@@ -12717,7 +12701,7 @@ var TextAnnotation = (function TextAnnotationClosure() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Util.inherit(TextAnnotation, Annotation, { });
|
|
|
+ Util.inherit(TextAnnotation, Annotation, {});
|
|
|
|
|
|
return TextAnnotation;
|
|
|
})();
|
|
@@ -12793,7 +12777,7 @@ var LinkAnnotation = (function LinkAnnotationClosure() {
|
|
|
return url;
|
|
|
}
|
|
|
|
|
|
- Util.inherit(LinkAnnotation, Annotation, { });
|
|
|
+ Util.inherit(LinkAnnotation, Annotation, {});
|
|
|
|
|
|
return LinkAnnotation;
|
|
|
})();
|