*/
    public Rectangle2D.Float getMediaBox() {
        // add all of the pages media box dimensions to a vector and process
        Vector boxDimensions = (Vector) (library.getObject(entries, "MediaBox"));
        if (boxDimensions != null) {
            mediaBox = new PRectangle(boxDimensions);
//            System.out.println("Page - MediaBox " + mediaBox);
        }
        // If mediaBox is null check with the parent pages, as media box is inheritable
        if (mediaBox == null) {
            PageTree pageTree = getParent();
            while (pageTree != null && mediaBox == null) {
                mediaBox = pageTree.getMediaBox();
                pageTree = pageTree.getParent();
            }
        }
        return mediaBox;
    }