Skip to Content

What are the differences between PDPageGetMediaBox and PDPageGetSize?

Estimated Reading Time: < 1 Minute

The PDPageGetSize() interface was created first to return PDF page size, returning it as a simple width and depth.

These interfaces were added later to provide more precise definitions of the page added to the PDF document:

  • PDPageGetMediaBox()
  • PDPageGetCropBox()
  • PDPageGetBox()

At this point both PDPageGetMediaBox and PDPageGetSize provide the same values.

The bounding box returned by PDPageGetMediaBox() should have right – left = width and top – bottom = depth of the PDPageGetSize() interface.

What are the differences between PDPageGetMediaBox and PDPageGetSize?
  • COMMENT