1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

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:
Jonas Jenwald 2022-06-09 14:06:51 +02:00
parent a1bc5a8fe2
commit 3d244cb6a8
4 changed files with 12 additions and 4 deletions

View file

@ -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) {