Merge pull request #16128 from Snuffleupagus/issue-16127
Support (rare) Type3 fonts with Pattern resources (issue 16127)
This commit is contained in:
commit
6839f15a32
@ -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;
|
||||
}
|
||||
|
@ -2758,6 +2758,7 @@ class WorkerTransport {
|
||||
break;
|
||||
case "FontPath":
|
||||
case "Image":
|
||||
case "Pattern":
|
||||
this.commonObjs.resolve(id, exportedData);
|
||||
break;
|
||||
default:
|
||||
|
@ -2527,7 +2527,7 @@ class CanvasGraphics {
|
||||
if (this.cachedPatterns.has(objId)) {
|
||||
pattern = this.cachedPatterns.get(objId);
|
||||
} else {
|
||||
pattern = getShadingPattern(this.objs.get(objId));
|
||||
pattern = getShadingPattern(this.getObject(objId));
|
||||
this.cachedPatterns.set(objId, pattern);
|
||||
}
|
||||
if (matrix) {
|
||||
|
1
test/pdfs/issue16127.pdf.link
Normal file
1
test/pdfs/issue16127.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/mozilla/pdf.js/files/10913919/Noto.Color.Emoji.-.Google.Fonts.-.Chrome.112.-.Full.pdf
|
@ -2378,6 +2378,16 @@
|
||||
"type": "eq",
|
||||
"about": "Type3 fonts with image resources; both pages need to be tested, otherwise the bug won't manifest."
|
||||
},
|
||||
{ "id": "issue16127",
|
||||
"file": "pdfs/issue16127.pdf",
|
||||
"md5": "42714567a818876f51ef960df21600f5",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"firstPage": 1,
|
||||
"lastPage": 2,
|
||||
"type": "eq",
|
||||
"about": "Type3 fonts with pattern resources; both pages need to be tested, otherwise the bug won't manifest."
|
||||
},
|
||||
{ "id": "doc_actions",
|
||||
"file": "pdfs/doc_actions.pdf",
|
||||
"md5": "ceae4eb405a0b40394f4d63d7525a870",
|
||||
|
Loading…
x
Reference in New Issue
Block a user