1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Merge pull request #8240 from Snuffleupagus/api-stopAtErrors

[api-minor] Always allow e.g. rendering to continue even if there are errors, and add a `stopAtErrors` parameter to `getDocument` to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815)
This commit is contained in:
Yury Delendik 2017-04-13 10:58:49 -05:00 committed by GitHub
commit c4c44c1bbe
8 changed files with 272 additions and 52 deletions

View file

@ -457,16 +457,15 @@ var Annotation = (function AnnotationClosure() {
var self = this;
return resourcesPromise.then(function(resources) {
var opList = new OperatorList();
opList.addOp(OPS.beginAnnotation, [data.rect, transform, matrix]);
return evaluator.getOperatorList(self.appearance, task,
resources, opList).
then(function () {
opList.addOp(OPS.endAnnotation, []);
self.appearance.reset();
return opList;
});
var opList = new OperatorList();
opList.addOp(OPS.beginAnnotation, [data.rect, transform, matrix]);
return evaluator.getOperatorList(self.appearance, task,
resources, opList).then(function () {
opList.addOp(OPS.endAnnotation, []);
self.appearance.reset();
return opList;
});
});
}
};
@ -761,10 +760,9 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
var stream = new Stream(stringToBytes(this.data.defaultAppearance));
return evaluator.getOperatorList(stream, task, this.fieldResources,
operatorList).
then(function () {
return operatorList;
});
operatorList).then(function () {
return operatorList;
});
}
});