1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

Ensure that worker-thread image caching doesn't break optional content (issue 14824)

Currently we only insert optionalContent-data into the operatorList the first time that an image is parsed, which will (in hindsight) obviously cause problems for cached images.
Hence we also need to insert the optionalContent-data in the various worker-thread image caches, such that it can be accessed in the fast-paths that are used to skip re-parsing of images.

In order to reduce the amount of repeated code, this patch also adds a new `OperatorList`-method that takes care of inserting the necessary data in the operatorList.
This commit is contained in:
Jonas Jenwald 2022-04-22 14:30:25 +02:00
parent f39219cd45
commit 6c229dffb1
4 changed files with 78 additions and 33 deletions

View file

@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/8540275/PDF.pdf

View file

@ -2965,6 +2965,18 @@
"annotations": true,
"about": "LinkAnnotation with a relative link, and a /Catalog Base-URI."
},
{ "id": "issue14824",
"file": "pdfs/issue14824.pdf",
"md5": "7b8d061ab0a342e3606a3b3ba1925d5b",
"rounds": 1,
"link": true,
"lastPage": 4,
"type": "eq",
"optionalContent": {
"7R": false
},
"about": "Need to test *at least* three pages, since the `GlobalImageCache` is involved."
},
{ "id": "issue1127-text",
"file": "pdfs/issue1127.pdf",
"md5": "4fb2be5ffefeafda4ba977de2a1bb4d8",