Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent failures in the Annotation code if the Rect array contains indirect objects (issue 7115) #7118

Merged
merged 1 commit into from
Mar 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ var Annotation = (function AnnotationClosure() {
var dict = params.dict;

this.setFlags(dict.get('F'));
this.setRectangle(dict.get('Rect'));
this.setRectangle(dict.getArray('Rect'));
this.setColor(dict.get('C'));
this.setBorderStyle(dict);
this.appearance = getDefaultAppearance(dict);
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
!issue6782.pdf
!issue6961.pdf
!issue7020.pdf
!issue7115.pdf
!filled-background.pdf
!ArabicCIDTrueType.pdf
!ThuluthFeatures.pdf
Expand Down
Binary file added test/pdfs/issue7115.pdf
Binary file not shown.
9 changes: 9 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,15 @@
"type": "eq",
"about": "XObject with BBox array containing indirect object."
},
{ "id": "issue7115",
"file": "pdfs/issue7115.pdf",
"md5": "63c78e25a0433dd5a01ddff6ec720f29",
"link": false,
"rounds": 1,
"type": "eq",
"annotations": true,
"about": "Annotation with Rect array containing indirect objects."
},
{ "id": "issue4934",
"file": "pdfs/issue4934.pdf",
"md5": "6099da44f677702ae65a648b51a2226d",
Expand Down