Merge pull request #11987 from Snuffleupagus/svg-paintImageXObject-GlobalImageCache

Update `SVGGraphics` to account for globally cached images (PR 11912 follow-up)
This commit is contained in:
Tim van der Meij 2020-06-10 23:37:45 +02:00 committed by GitHub
commit c9934de87c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1560,7 +1560,9 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
}
paintImageXObject(objId) {
const imgData = this.objs.get(objId);
const imgData = objId.startsWith("g_")
? this.commonObjs.get(objId)
: this.objs.get(objId);
if (!imgData) {
warn(`Dependent image with object ID ${objId} is not ready yet`);
return;