Ignore non-existing /Shading resources during parsing (issue 18765)
This commit is contained in:
parent
96cdff4a73
commit
67af371e58
@ -2132,14 +2132,26 @@ class PartialEvaluator {
|
||||
break;
|
||||
|
||||
case OPS.shadingFill:
|
||||
var shadingRes = resources.get("Shading");
|
||||
if (!shadingRes) {
|
||||
throw new FormatError("No shading resource found");
|
||||
}
|
||||
let shading;
|
||||
try {
|
||||
const shadingRes = resources.get("Shading");
|
||||
if (!shadingRes) {
|
||||
throw new FormatError("No shading resource found");
|
||||
}
|
||||
|
||||
var shading = shadingRes.get(args[0].name);
|
||||
if (!shading) {
|
||||
throw new FormatError("No shading object found");
|
||||
shading = shadingRes.get(args[0].name);
|
||||
if (!shading) {
|
||||
throw new FormatError("No shading object found");
|
||||
}
|
||||
} catch (reason) {
|
||||
if (reason instanceof AbortException) {
|
||||
continue;
|
||||
}
|
||||
if (self.options.ignoreErrors) {
|
||||
warn(`getOperatorList - ignoring Shading: "${reason}".`);
|
||||
continue;
|
||||
}
|
||||
throw reason;
|
||||
}
|
||||
const patternId = self.parseShading({
|
||||
shading,
|
||||
|
||||
1
test/pdfs/issue18765.pdf.link
Normal file
1
test/pdfs/issue18765.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/user-attachments/files/17065251/LUCID.-.Asif.Rasha-1.pdf
|
||||
@ -3021,6 +3021,16 @@
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue18765",
|
||||
"file": "pdfs/issue18765.pdf",
|
||||
"md5": "7763ead2aa69db3a5263f92bb1922e31",
|
||||
"link": true,
|
||||
"talos": false,
|
||||
"rounds": 1,
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue11139",
|
||||
"file": "pdfs/issue11139.pdf",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user