{
PdfArray mediaBox = getMediaBox();
if(mediaBox == null)
{
// Create default media box!
mediaBox = new Rectangle(0,0,0,0).getBaseDataObject();
// Assign the media box to the document!
((PdfDictionary)getBaseDataObject().resolve(PdfName.Pages)).put(PdfName.MediaBox,mediaBox);
}
mediaBox.set(2,new PdfReal(value.getWidth()));
mediaBox.set(3,new PdfReal(value.getHeight()));