There's no guaruntee that a MediaBox will start at 0,0.

Given a media box of [ x0 y0 x1 y1 ], the safest way to calculate the width and height is:

    width = x1 - x0
    height = y1 - y0