Limit the size of canvases to 5MP (iOS restriction)
This commit is contained in:
parent
06cdca4576
commit
952545e20f
4 changed files with 51 additions and 5 deletions
|
@ -507,3 +507,12 @@ if (typeof PDFJS === 'undefined') {
|
|||
window.setTimeout(callback, 20);
|
||||
});
|
||||
})();
|
||||
|
||||
(function checkCanvasSizeLimitation() {
|
||||
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
|
||||
var isAndroid = /Android/g.test(navigator.userAgent);
|
||||
if (isIOS || isAndroid) {
|
||||
// 5MP
|
||||
PDFJS.maxCanvasPixels = 5242880;
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue