1
0
Fork 0
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:
Yury Delendik 2017-08-03 17:24:19 -05:00
parent 0c95bc7d83
commit d0e93721ae
4 changed files with 33 additions and 3 deletions

View file

@ -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);
});
});
}