mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #11263 from Snuffleupagus/viewer-disableAutoFetch-pagesCount
Attempt to reduce resource usage, by not eagerly fetching all pages, for long/large documents
This commit is contained in:
commit
d7f651aa98
1 changed files with 4 additions and 1 deletions
|
@ -454,7 +454,10 @@ class BaseViewer {
|
|||
this.findController.setDocument(pdfDocument); // Enable searching.
|
||||
}
|
||||
|
||||
if (pdfDocument.loadingParams['disableAutoFetch']) {
|
||||
// In addition to 'disableAutoFetch' being set, also attempt to reduce
|
||||
// resource usage when loading *very* long/large documents.
|
||||
if (pdfDocument.loadingParams['disableAutoFetch'] ||
|
||||
pagesCount > 7500) {
|
||||
// XXX: Printing is semi-broken with auto fetch disabled.
|
||||
pagesCapability.resolve();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue