mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
parent
30e69956db
commit
9c3471dd01
3 changed files with 40 additions and 21 deletions
|
@ -739,6 +739,7 @@ class PartialEvaluator {
|
||||||
!dict.has("Mask") &&
|
!dict.has("Mask") &&
|
||||||
w + h < SMALL_IMAGE_DIMENSIONS
|
w + h < SMALL_IMAGE_DIMENSIONS
|
||||||
) {
|
) {
|
||||||
|
try {
|
||||||
const imageObj = new PDFImage({
|
const imageObj = new PDFImage({
|
||||||
xref: this.xref,
|
xref: this.xref,
|
||||||
res: resources,
|
res: resources,
|
||||||
|
@ -760,6 +761,14 @@ class PartialEvaluator {
|
||||||
[imgData],
|
[imgData],
|
||||||
optionalContent
|
optionalContent
|
||||||
);
|
);
|
||||||
|
} catch (reason) {
|
||||||
|
const msg = `Unable to decode inline image: "${reason}".`;
|
||||||
|
|
||||||
|
if (!this.options.ignoreErrors) {
|
||||||
|
throw new Error(msg);
|
||||||
|
}
|
||||||
|
warn(msg);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
test/pdfs/issue17794.pdf.link
Normal file
2
test/pdfs/issue17794.pdf.link
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
https://github.com/mozilla/pdf.js/files/14607428/image1.pdf
|
||||||
|
|
|
@ -9771,5 +9771,13 @@
|
||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"annotations": true,
|
"annotations": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "issue17794",
|
||||||
|
"file": "pdfs/issue17794.pdf",
|
||||||
|
"md5": "a66b5b938cb44ae241cad845cc3b5d2d",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue