Table of Contents

Property MediaBox



Gets or sets the media box of the page.

public PdfBox MediaBox { get; set; }

Property Value


The media box of the page expressed in PDF's default user space coordinate system. In default user space the positive X axis extends horizontally to the right and the positive Y axis extends vertically upward.


Default value: { 0, 0, Width, Height }.

The media box defines the boundaries of the physical medium on which the page is to be printed. It may include any extended area surrounding the finished page for bleed, printing marks, or other such purposes. It may also include areas close to the edges of the medium that cannot be marked because of physical limitations of the output device. Content falling outside this boundary can safely be discarded without affecting the meaning of the PDF file.

Changing the value of this property resets values of other page boxes (CropBox, BleedBox, TrimBox, ArtBox). Their values will be reset to this property's value.

Additionally, changing the value of this property resets values of Width, Height, Size, Orientation properties.