Merge pull request #8721 from mukulmishra18/data-send-via-GetDocRequest

Reduces the amount of data send via GetDocRequest.
This commit is contained in:
Jonas Jenwald 2017-07-30 20:16:14 +02:00 committed by GitHub
commit f62d0a10a5

View File

@ -340,7 +340,14 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
} }
return worker.messageHandler.sendWithPromise('GetDocRequest', { return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId, docId,
source, source: {
data: source.data,
url: source.url,
password: source.password,
disableAutoFetch: source.disableAutoFetch,
rangeChunkSize: source.rangeChunkSize,
length: source.length,
},
maxImageSize: getDefaultSetting('maxImageSize'), maxImageSize: getDefaultSetting('maxImageSize'),
disableFontFace: getDefaultSetting('disableFontFace'), disableFontFace: getDefaultSetting('disableFontFace'),
disableCreateObjectURL: getDefaultSetting('disableCreateObjectURL'), disableCreateObjectURL: getDefaultSetting('disableCreateObjectURL'),