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:
commit
ac3fa1e3d7
8 changed files with 318 additions and 21 deletions
|
@ -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 };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue