1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Revert "XFA - An image can be a stream in the pdf (bug 1718521)"

This commit is contained in:
calixteman 2021-07-05 12:47:14 +02:00 committed by GitHub
parent b370d4714f
commit 783cbc1793
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 49 additions and 127 deletions

View file

@ -869,28 +869,6 @@ class PDFDocument {
return null;
}
async loadXfaImages() {
const xfaImagesDict = await this.pdfManager.ensureCatalog("xfaImages");
if (!xfaImagesDict) {
return;
}
const keys = xfaImagesDict.getKeys();
const objectLoader = new ObjectLoader(xfaImagesDict, keys, this.xref);
await objectLoader.load();
const xfaImages = new Map();
for (const key of keys) {
const stream = xfaImagesDict.get(key);
if (!isStream(stream)) {
continue;
}
xfaImages.set(key, stream.getBytes());
}
this.xfaFactory.setImages(xfaImages);
}
async loadXfaFonts(handler, task) {
const acroForm = await this.pdfManager.ensureCatalog("acroForm");
if (!acroForm) {