1. You will observe that the bbox value is of type ASFixedRect. This contains four ASFixed values. THESE ARE NOT INTEGERS as you are assuming.
2. Once you have converted your ASFixed values you will have a value in default page units, that is 1/72 inch.
3. The media box may not be the page size. To match the page size in all cases you need to ALSO consider the crop box and page rotate values.