mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58: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
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
/* globals PDFJS, createPromiseCapability, LocalPdfManager, NetworkPdfManager,
|
||||
NetworkManager, isInt, RANGE_CHUNK_SIZE, MissingPDFException,
|
||||
NetworkManager, isInt, MissingPDFException,
|
||||
UnexpectedResponseException, PasswordException, Promise, warn,
|
||||
PasswordResponses, InvalidPDFException, UnknownErrorException,
|
||||
XRefParseException, Ref, info, globalScope, error, MessageHandler */
|
||||
|
@ -160,7 +160,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
|
|||
return;
|
||||
}
|
||||
source.length = length;
|
||||
if (length <= 2 * RANGE_CHUNK_SIZE) {
|
||||
if (length <= 2 * source.rangeChunkSize) {
|
||||
// The file size is smaller than the size of two chunks, so it does
|
||||
// not make any sense to abort the request and retry with a range
|
||||
// request.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue