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:
Jonas Jenwald 2014-10-01 17:41:56 +02:00
parent 29eb147d42
commit cb3e5903cb
2 changed files with 2 additions and 1 deletions

View File

@ -138,7 +138,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
}
},
onProgressiveData: PDFJS.disableStream ? null :
onProgressiveData: source.disableStream ? null :
function onProgressiveData(chunk) {
if (!pdfManager) {
cachedChunks.push(chunk);

View File

@ -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,