1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Merge pull request #13146 from calixteman/xfa_fonts

XFA -- Load fonts permanently from the pdf
This commit is contained in:
Brendan Dahl 2021-04-16 12:55:12 -07:00 committed by GitHub
commit ac3fa1e3d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 318 additions and 21 deletions

View file

@ -193,6 +193,17 @@ class WorkerMessageHandler {
pdfManager.ensureDoc("fingerprint"),
pdfManager.ensureDoc("isPureXfa"),
]);
if (isPureXfa) {
const task = new WorkerTask("Load fonts for Xfa");
startWorkerTask(task);
await pdfManager
.loadXfaFonts(handler, task)
.catch(reason => {
// Ignore errors, to allow the document to load.
})
.then(() => finishWorkerTask(task));
}
return { numPages, fingerprint, isPureXfa };
}