mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #11601 from Snuffleupagus/rm-nativeImageDecoderSupport
[api-minor] Decode all JPEG images with the built-in PDF.js decoder in `src/core/jpg.js`
This commit is contained in:
commit
3b615e4ca3
23 changed files with 57 additions and 682 deletions
|
@ -387,7 +387,6 @@ var Driver = (function DriverClosure() {
|
|||
const loadingTask = pdfjsLib.getDocument({
|
||||
url: absoluteUrl,
|
||||
password: task.password,
|
||||
nativeImageDecoderSupport: task.nativeImageDecoderSupport,
|
||||
cMapUrl: CMAP_URL,
|
||||
cMapPacked: CMAP_PACKED,
|
||||
disableRange: task.disableRange,
|
||||
|
|
|
@ -1637,8 +1637,7 @@
|
|||
"link": true,
|
||||
"firstPage": 2,
|
||||
"lastPage": 2,
|
||||
"type": "eq",
|
||||
"nativeImageDecoderSupport": "none"
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue10529",
|
||||
"file": "pdfs/issue10529.pdf",
|
||||
|
@ -4181,22 +4180,12 @@
|
|||
"link": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4926-built-in-jpg",
|
||||
"file": "pdfs/issue4926.pdf",
|
||||
"md5": "ed881c8ea2f9bc4be94ecb7f2b2c149b",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"lastPage": 1,
|
||||
"type": "eq",
|
||||
"nativeImageDecoderSupport": "none"
|
||||
},
|
||||
{ "id": "decodeACSuccessive",
|
||||
"file": "pdfs/decodeACSuccessive.pdf",
|
||||
"md5": "7749c032624fe27ab8e8d7d5e9a4a93f",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq",
|
||||
"nativeImageDecoderSupport": "none"
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue5592",
|
||||
"file": "pdfs/issue5592.pdf",
|
||||
|
|
|
@ -18,7 +18,6 @@ import { setStubs, unsetStubs } from "../../examples/node/domstubs.js";
|
|||
import { buildGetDocumentParams } from "./test_utils.js";
|
||||
import { getDocument } from "../../src/display/api.js";
|
||||
import { isNodeJS } from "../../src/shared/is_node.js";
|
||||
import { NativeImageDecoding } from "../../src/shared/util.js";
|
||||
import { SVGGraphics } from "../../src/display/svg.js";
|
||||
|
||||
const XLINK_NS = "http://www.w3.org/1999/xlink";
|
||||
|
@ -62,11 +61,7 @@ describe("SVGGraphics", function () {
|
|||
var loadingTask;
|
||||
var page;
|
||||
beforeAll(function (done) {
|
||||
loadingTask = getDocument(
|
||||
buildGetDocumentParams("xobject-image.pdf", {
|
||||
nativeImageDecoderSupport: NativeImageDecoding.DISPLAY,
|
||||
})
|
||||
);
|
||||
loadingTask = getDocument(buildGetDocumentParams("xobject-image.pdf"));
|
||||
loadingTask.promise.then(function (doc) {
|
||||
doc.getPage(1).then(function (firstPage) {
|
||||
page = firstPage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue