mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Support corrupt PDF files with invalid/non-existent Group /CS entries (issue 11045)
The PDF file in question tries to reference a non-existent ColorSpace, which should be quite rare in practice.
This commit is contained in:
parent
a666f1ef00
commit
5ac9c7c384
4 changed files with 16 additions and 2 deletions
|
@ -263,8 +263,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
groupOptions.isolated = (group.get('I') || false);
|
||||
groupOptions.knockout = (group.get('K') || false);
|
||||
if (group.has('CS')) {
|
||||
colorSpace = ColorSpace.parse(group.get('CS'), this.xref, resources,
|
||||
this.pdfFunctionFactory);
|
||||
colorSpace = group.get('CS');
|
||||
if (colorSpace) {
|
||||
colorSpace = ColorSpace.parse(colorSpace, this.xref, resources,
|
||||
this.pdfFunctionFactory);
|
||||
} else {
|
||||
warn('buildFormXObject - invalid/non-existent Group /CS entry: ' +
|
||||
group.getRaw('CS'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue