Reset invalid media box to letter size.

This commit is contained in:
notmasteryet 2011-09-23 18:08:23 -05:00
parent b8c7030309
commit ced260c2ff

6
pdf.js
View File

@ -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');