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

XFA - Get each page asynchronously in order to avoid blocking the event loop (#14014)

This commit is contained in:
Calixte Denizet 2021-11-05 20:52:13 +01:00
parent 30bd5f0a39
commit 1681e25008
5 changed files with 81 additions and 47 deletions

View file

@ -787,7 +787,8 @@ class PDFDocument {
get numPages() {
let num = 0;
if (this.xfaFactory) {
num = this.xfaFactory.numPages;
// num is a Promise.
num = this.xfaFactory.getNumPages();
} else if (this.linearization) {
num = this.linearization.numPages;
} else {