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:
parent
30bd5f0a39
commit
1681e25008
5 changed files with 81 additions and 47 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue