mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 23:04:02 +02:00
Fix the issue in the ref test tracemonkey-extract_0_2_12
When getting the extracted document, the url for the wasms wasn't passed and consequently the icc-based color wasn't rendered as expected because of the wasm for qcms.
This commit is contained in:
parent
3127492a38
commit
dde0beafc6
@ -666,7 +666,7 @@ class Driver {
|
||||
task.isOffscreenCanvasSupported === false ? false : undefined;
|
||||
const disableFontFace = task.disableFontFace === true;
|
||||
|
||||
const loadingTask = getDocument({
|
||||
const documentOptions = {
|
||||
url: new URL(task.file, window.location),
|
||||
password: task.password,
|
||||
cMapUrl: CMAP_URL,
|
||||
@ -682,12 +682,15 @@ class Driver {
|
||||
isOffscreenCanvasSupported,
|
||||
styleElement: xfaStyleElement,
|
||||
disableFontFace,
|
||||
});
|
||||
};
|
||||
const loadingTask = getDocument(documentOptions);
|
||||
let promise = loadingTask.promise;
|
||||
|
||||
if (!this.masterMode && task.type === "extract") {
|
||||
promise = promise.then(async doc => {
|
||||
const data = await doc.extractPages([
|
||||
const extractedDocumentOptions = { ...documentOptions };
|
||||
delete extractedDocumentOptions.url;
|
||||
extractedDocumentOptions.data = await doc.extractPages([
|
||||
{
|
||||
document: null,
|
||||
includePages: task.includePages,
|
||||
@ -695,7 +698,7 @@ class Driver {
|
||||
]);
|
||||
await loadingTask.destroy();
|
||||
delete task.includePages;
|
||||
return getDocument(data).promise;
|
||||
return getDocument(extractedDocumentOptions).promise;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user