diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index c81eefc4d..5324476a8 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -401,7 +401,9 @@ var TextAnnotationElement = (function TextAnnotationElementClosure() { */ var WidgetAnnotationElement = (function WidgetAnnotationElementClosure() { function WidgetAnnotationElement(parameters) { - AnnotationElement.call(this, parameters, true); + var isRenderable = parameters.renderInteractiveForms || + (!parameters.data.hasAppearance && !!parameters.data.fieldValue); + AnnotationElement.call(this, parameters, isRenderable); } Util.inherit(WidgetAnnotationElement, AnnotationElement, { diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 8603aa58d..c00a37454 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -204,6 +204,9 @@ !bug946506.pdf !issue3885.pdf !bug859204.pdf +!annotation-tx.pdf +!annotation-tx2.pdf +!annotation-tx3.pdf !coons-allflags-withfunction.pdf !tensor-allflags-withfunction.pdf !issue4246.pdf diff --git a/test/pdfs/annotation-tx2.pdf b/test/pdfs/annotation-tx2.pdf new file mode 100644 index 000000000..383dd4ec8 Binary files /dev/null and b/test/pdfs/annotation-tx2.pdf differ diff --git a/test/pdfs/annotation-tx3.pdf b/test/pdfs/annotation-tx3.pdf new file mode 100644 index 000000000..4df7bd183 Binary files /dev/null and b/test/pdfs/annotation-tx3.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 94cc7e68e..785daeefb 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -732,6 +732,14 @@ "rounds": 1, "type": "load" }, + { "id": "f1040-annotations", + "file": "pdfs/f1040.pdf", + "md5": "7323b50c6d28d959b8b4b92c469b2469", + "link": true, + "rounds": 1, + "type": "eq", + "annotations": true + }, { "id": "f1040-forms", "file": "pdfs/f1040.pdf", "md5": "7323b50c6d28d959b8b4b92c469b2469", @@ -2519,7 +2527,43 @@ "rounds": 1, "type": "eq", "annotations": true, - "about": "Text widget annotation witout appearance streams." + "about": "Text widget annotation without appearance streams." + }, + { "id": "annotation-tx-forms", + "file": "pdfs/annotation-tx.pdf", + "md5": "56321ea830be9c4f8437ca17ac535b2d", + "rounds": 1, + "type": "eq", + "forms": true, + "about": "Text widget annotation without appearance streams." + }, + { "id": "annotation-tx2-annotations", + "file": "pdfs/annotation-tx2.pdf", + "md5": "b7a32a751895d394fc07bb6ddb40c420", + "rounds": 1, + "type": "eq", + "annotations": true + }, + { "id": "annotation-tx2-forms", + "file": "pdfs/annotation-tx2.pdf", + "md5": "b7a32a751895d394fc07bb6ddb40c420", + "rounds": 1, + "type": "eq", + "forms": true + }, + { "id": "annotation-tx3-annotations", + "file": "pdfs/annotation-tx3.pdf", + "md5": "3aec45c6465ca4959c25df17c4356a1c", + "rounds": 1, + "type": "eq", + "annotations": true + }, + { "id": "annotation-tx3-forms", + "file": "pdfs/annotation-tx3.pdf", + "md5": "3aec45c6465ca4959c25df17c4356a1c", + "rounds": 1, + "type": "eq", + "forms": true }, { "id": "gesamt", "file": "pdfs/gesamt.pdf", @@ -3151,6 +3195,13 @@ "type": "eq", "annotations": true }, + { "id": "annotation-text-widget-annotations", + "file": "pdfs/annotation-text-widget.pdf", + "md5": "cc9672539ad5b837152a9c6961e5f106", + "rounds": 1, + "type": "eq", + "annotations": true + }, { "id": "annotation-text-widget-forms", "file": "pdfs/annotation-text-widget.pdf", "md5": "cc9672539ad5b837152a9c6961e5f106",