Merge pull request #8388 from Snuffleupagus/issue-8380

Cache JPEG images, just as we do for other image formats, in `evaluator.js` (issue 8380)
This commit is contained in:
Yury Delendik 2017-05-17 17:25:51 -05:00 committed by GitHub
commit 5dc8dcdc0f
3 changed files with 16 additions and 3 deletions

View File

@ -474,9 +474,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
NativeImageDecoder.isSupported(image, this.xref, resources)) {
// These JPEGs don't need any more processing so we can just send it.
operatorList.addOp(OPS.paintJpegXObject, args);
this.handler.send('obj',
[objId, this.pageIndex, 'JpegStream',
image.getIR(this.options.forceDataSchema)]);
this.handler.send('obj', [objId, this.pageIndex, 'JpegStream',
image.getIR(this.options.forceDataSchema)]);
if (cacheKey) {
imageCache[cacheKey] = {
fn: OPS.paintJpegXObject,
args,
};
}
return;
}

View File

@ -0,0 +1 @@
https://web.archive.org/web/20170507102908/https://www.mbank.pl/download/firma/Dyspozycja-zmiany-typu-rachunku-biecego.pdf?noredir

View File

@ -1249,6 +1249,13 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue8380",
"file": "pdfs/issue8380.pdf",
"md5": "2782af6a4d0540fcea3897560f842094",
"rounds": 1,
"link": true,
"type": "eq"
},
{ "id": "type4psfunc",
"file": "pdfs/type4psfunc.pdf",
"md5": "7e6027a02ff78577f74dccdf84e37189",