mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Limit image size to 1024*1024 for b2g.
This commit is contained in:
parent
d71948038f
commit
bcc085ec52
5 changed files with 26 additions and 2 deletions
10
src/api.js
10
src/api.js
|
@ -21,6 +21,13 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The maximum allowed image size in total pixels e.g. width * height. Images
|
||||
* above this value will not be drawn. Use -1 for no limit.
|
||||
* @var {Number}
|
||||
*/
|
||||
PDFJS.maxImageSize = PDFJS.maxImageSize === undefined ? -1 : PDFJS.maxImageSize;
|
||||
|
||||
/**
|
||||
* This is the main entry point for loading a PDF and interacting with it.
|
||||
* NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
|
||||
|
@ -760,7 +767,8 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
|
||||
this.messageHandler.send('GetDocRequest', {
|
||||
source: source,
|
||||
disableRange: PDFJS.disableRange
|
||||
disableRange: PDFJS.disableRange,
|
||||
maxImageSize: PDFJS.maxImageSize
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue