mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
More robust getPage() error handling.
This commit is contained in:
parent
0c95bc7d83
commit
d0e93721ae
4 changed files with 33 additions and 3 deletions
|
@ -251,6 +251,11 @@ class PDFFindController {
|
|||
// Store the pageContent as a string.
|
||||
this.pageContents[i] = strBuf.join('');
|
||||
extractTextCapability.resolve(i);
|
||||
}, (reason) => {
|
||||
console.error(`Unable to get page ${i + 1} text content`, reason);
|
||||
// Page error -- assuming no text content.
|
||||
this.pageContents[i] = '';
|
||||
extractTextCapability.resolve(i);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue