Render PopupAnnotations even if they have missing or empty /Rect-entries (issue 15012, PR 14439 follow-up)
This only applies to *corrupt* PDF documents, where Annotations are missing the required /Rect-entry. Rendering PopupAnnotations unconditionally shouldn't be a problem, since we're not using a `BaseSVGFactory`-instance in that case.
This commit is contained in:
parent
a1bc5a8fe2
commit
3d244cb6a8
@ -2410,14 +2410,14 @@ class AnnotationLayer {
|
||||
if (!data) {
|
||||
continue;
|
||||
}
|
||||
const { width, height } = getRectDims(data.rect);
|
||||
if (width <= 0 || height <= 0) {
|
||||
continue;
|
||||
}
|
||||
if (data.annotationType === AnnotationType.POPUP) {
|
||||
popupAnnotations.push(data);
|
||||
continue;
|
||||
}
|
||||
const { width, height } = getRectDims(data.rect);
|
||||
if (width <= 0 || height <= 0) {
|
||||
continue; // Ignore empty annotations.
|
||||
}
|
||||
sortedAnnotations.push(data);
|
||||
}
|
||||
if (popupAnnotations.length) {
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -507,6 +507,7 @@
|
||||
!xfa_issue14315.pdf
|
||||
!poppler-67295-0.pdf
|
||||
!poppler-85140-0.pdf
|
||||
!issue15012.pdf
|
||||
!poppler-395-0-fuzzed.pdf
|
||||
!GHOSTSCRIPT-698804-1-fuzzed.pdf
|
||||
!issue14814.pdf
|
||||
|
BIN
test/pdfs/issue15012.pdf
Normal file
BIN
test/pdfs/issue15012.pdf
Normal file
Binary file not shown.
@ -4951,6 +4951,13 @@
|
||||
"type": "eq",
|
||||
"forms": true
|
||||
},
|
||||
{ "id": "issue15012",
|
||||
"file": "pdfs/issue15012.pdf",
|
||||
"md5": "cc5e89507262cb3ec6862f68cb3eefd1",
|
||||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"annotations": true
|
||||
},
|
||||
{ "id": "gesamt",
|
||||
"file": "pdfs/gesamt.pdf",
|
||||
"md5": "743aaa6f46ed0a42864f079d632d942e",
|
||||
|
Loading…
Reference in New Issue
Block a user