Merge pull request #519 from notmasteryet/default-mediabox
Reset invalid media box to letter size.
This commit is contained in:
commit
d2a00a4c7b
6
pdf.js
6
pdf.js
@ -3321,8 +3321,10 @@ var Page = (function pagePage() {
|
|||||||
},
|
},
|
||||||
get mediaBox() {
|
get mediaBox() {
|
||||||
var obj = this.inheritPageProp('MediaBox');
|
var obj = this.inheritPageProp('MediaBox');
|
||||||
return shadow(this, 'mediaBox',
|
// Reset invalid media box to letter size.
|
||||||
((IsArray(obj) && obj.length == 4) ? obj : null));
|
if (!IsArray(obj) || obj.length === 4)
|
||||||
|
obj = [0, 0, 612, 792];
|
||||||
|
return shadow(this, 'mediaBox', obj);
|
||||||
},
|
},
|
||||||
get view() {
|
get view() {
|
||||||
var obj = this.inheritPageProp('CropBox');
|
var obj = this.inheritPageProp('CropBox');
|
||||||
|
Loading…
Reference in New Issue
Block a user