Index: poppler/Page.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/Page.cc,v retrieving revision 1.16 diff -u -r1.16 Page.cc --- poppler/Page.cc 24 Feb 2007 23:32:23 -0000 1.16 +++ poppler/Page.cc 7 Mar 2007 18:40:28 -0000 @@ -39,6 +39,7 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) { Object obj1; + PDFRectangle mBox; // get old/default values if (attrs) { @@ -61,7 +62,9 @@ } // media box - readBox(dict, "MediaBox", &mediaBox); + if (readBox(dict, "MediaBox", &mBox)) { + mediaBox = mBox; + } // crop box if (readBox(dict, "CropBox", &cropBox)) { @@ -170,6 +173,8 @@ ok = gFalse; } obj2.free(); + if (tmp.x1 == 0 && tmp.x2 == 0 && tmp.y1 == 0 && tmp.y2 == 0) + ok = gFalse; if (ok) { if (tmp.x1 > tmp.x2) { t = tmp.x1; tmp.x1 = tmp.x2; tmp.x2 = t;