Configuration:
await this.pdfManager.requestRange(ex.begin, ex.end);
;// src/core/xref.js
async fetchAsync(ref, suppressEncryption) {
try {
return this.fetch(ref, suppressEncryption);
} catch (ex) {
if (!(ex instanceof MissingDataException)) {
throw ex;
}
await this.pdfManager.requestRange(ex.begin, ex.end);
return this.fetchAsync(ref, suppressEncryption);
}
}
I can get less chunks when I comment this line of code and the program also seems to run fine
If I do nothing,the range request in network like this
In v2.12.313, PDFJS will check that the last page can be sucessfully loaded during document initialization, to ensure that numPages
is correct, and fallback to walking the entire /Pages-tree. #14570