Merge pull request #16128 from Snuffleupagus/issue-16127

Support (rare) Type3 fonts with Pattern resources (issue 16127)
This commit is contained in:
Jonas Jenwald 2023-03-08 12:21:53 +01:00 committed by GitHub
commit 6839f15a32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 2 deletions

View file

@ -1443,8 +1443,16 @@ class PartialEvaluator {
);
const patternIR = shadingFill.getIR();
id = `pattern_${this.idFactory.createObjId()}`;
if (this.parsingType3Font) {
id = `${this.idFactory.getDocId()}_type3_${id}`;
}
localShadingPatternCache.set(shading, id);
this.handler.send("obj", [id, this.pageIndex, "Pattern", patternIR]);
if (this.parsingType3Font) {
this.handler.send("commonobj", [id, "Pattern", patternIR]);
} else {
this.handler.send("obj", [id, this.pageIndex, "Pattern", patternIR]);
}
}
return id;
}