PDF4Java Reference Documentation
com.o2sol.pdf4java Package / PDFPage Class / setMediaBox Method
A com.o2sol.pdf4java.graphics.PDFStandardRectangle expressed in default user space units, defining the boundaries of the physical medium on which the page is intended to be displayed or printed.
Collapse All Expand All
In This Topic

setMediaBox Method
In This Topic
Sets the media box.
Syntax

    public void setMediaBox(
       PDFStandardRectangle mediaBox
    )

#### Parameters

mediaBox
  A com.o2sol.pdf4java.graphics.PDFStandardRectangle expressed in default user space units, defining the boundaries of the physical medium on which the page is intended to be displayed or printed.

Exceptions

Exception | Description
--- | ---
java.lang.IllegalArgumentException | When mediaBox is null.

See Also

#### Reference

PDFPage Class
PDFPage Members

© 2025 O2 Solutions All Rights Reserved.

Send comments on this topic.