mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #17395 from Snuffleupagus/pypdf-2332
Support Annotations with corrupt /BS-entries
This commit is contained in:
commit
988d3a188f
5 changed files with 20 additions and 20 deletions
|
@ -999,12 +999,15 @@ class Annotation {
|
|||
}
|
||||
if (borderStyle.has("BS")) {
|
||||
const dict = borderStyle.get("BS");
|
||||
const dictType = dict.get("Type");
|
||||
|
||||
if (!dictType || isName(dictType, "Border")) {
|
||||
this.borderStyle.setWidth(dict.get("W"), this.rectangle);
|
||||
this.borderStyle.setStyle(dict.get("S"));
|
||||
this.borderStyle.setDashArray(dict.getArray("D"));
|
||||
if (dict instanceof Dict) {
|
||||
const dictType = dict.get("Type");
|
||||
|
||||
if (!dictType || isName(dictType, "Border")) {
|
||||
this.borderStyle.setWidth(dict.get("W"), this.rectangle);
|
||||
this.borderStyle.setStyle(dict.get("S"));
|
||||
this.borderStyle.setDashArray(dict.getArray("D"));
|
||||
}
|
||||
}
|
||||
} else if (borderStyle.has("Border")) {
|
||||
const array = borderStyle.getArray("Border");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue