1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #15943 from Snuffleupagus/deprecate-direct-PDFDataRangeTransport

[api-minor] Deprecate calling `getDocument` directly with a `PDFDataRangeTransport`-instance
This commit is contained in:
Tim van der Meij 2023-01-21 13:50:20 +01:00 committed by GitHub
commit a27d7ba524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -3265,7 +3265,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
});
};
const loadingTask = getDocument(transport);
const loadingTask = getDocument({ range: transport });
const pdfDocument = await loadingTask.promise;
expect(pdfDocument.numPages).toEqual(14);
@ -3310,7 +3310,7 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
});
};
const loadingTask = getDocument(transport);
const loadingTask = getDocument({ range: transport });
const pdfDocument = await loadingTask.promise;
expect(pdfDocument.numPages).toEqual(14);