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() {
|
||||
var obj = this.inheritPageProp('MediaBox');
|
||||
return shadow(this, 'mediaBox',
|
||||
((IsArray(obj) && obj.length == 4) ? obj : null));
|
||||
// Reset invalid media box to letter size.
|
||||
if (!IsArray(obj) || obj.length === 4)
|
||||
obj = [0, 0, 612, 792];
|
||||
return shadow(this, 'mediaBox', obj);
|
||||
},
|
||||
get view() {
|
||||
var obj = this.inheritPageProp('CropBox');
|
||||
|
Loading…
Reference in New Issue
Block a user