mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fix disableAutoFetch regression in the generic viewer
After PR 5263, setting `disableAutoFetch = true` in the generic viewer no longer works correctly, since the entire file loads even with `disableStream = true`.
This commit is contained in:
parent
29eb147d42
commit
cb3e5903cb
2 changed files with 2 additions and 1 deletions
|
@ -138,7 +138,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
|
|||
}
|
||||
},
|
||||
|
||||
onProgressiveData: PDFJS.disableStream ? null :
|
||||
onProgressiveData: source.disableStream ? null :
|
||||
function onProgressiveData(chunk) {
|
||||
if (!pdfManager) {
|
||||
cachedChunks.push(chunk);
|
||||
|
|
|
@ -1076,6 +1076,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
|
||||
fetchDocument: function WorkerTransport_fetchDocument(source) {
|
||||
source.disableAutoFetch = PDFJS.disableAutoFetch;
|
||||
source.disableStream = PDFJS.disableStream;
|
||||
source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
|
||||
this.messageHandler.send('GetDocRequest', {
|
||||
source: source,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue