mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
[api-minor] Add an optional param to DocumentInitParameters for specifying the range request chunk size to use. Defaults to 2^16 = 65536.
This commit is contained in:
parent
aae82ec4c5
commit
ef667823dd
3 changed files with 11 additions and 6 deletions
|
@ -19,9 +19,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
// The maximum number of bytes fetched per range request
|
||||
var RANGE_CHUNK_SIZE = 65536;
|
||||
|
||||
// TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
|
||||
var BasePdfManager = (function BasePdfManagerClosure() {
|
||||
function BasePdfManager() {
|
||||
|
@ -153,7 +150,8 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
|||
disableAutoFetch: args.disableAutoFetch,
|
||||
initialData: args.initialData
|
||||
};
|
||||
this.streamManager = new ChunkedStreamManager(args.length, RANGE_CHUNK_SIZE,
|
||||
this.streamManager = new ChunkedStreamManager(args.length,
|
||||
args.rangeChunkSize,
|
||||
args.url, params);
|
||||
|
||||
this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue