Why PDF needs more than one page rectangle
PDF was designed for both screen documents and professional print workflows. A single page boundary is not enough to describe every stage of that process. The format therefore allows multiple page boxes, each describing a different intended region. They are coordinates in the page's user space, not instructions to erase content outside them.
The five standard page boxes
| Box | Purpose |
|---|---|
| MediaBox | The physical medium or full page canvas. It is required and provides the broad page boundary. |
| CropBox | The region a viewer should normally display or print. If absent, viewers generally fall back to the MediaBox. |
| BleedBox | The region to which page contents should extend when a printed piece needs bleed beyond its final trim edge. |
| TrimBox | The intended finished dimensions of a printed page after trimming. |
| ArtBox | A creator-defined boundary around meaningful artwork or content. |
Cropping usually changes visibility, not the underlying page
A non-destructive crop can simply change the CropBox. Objects outside that box may remain in the PDF. If another tool later expands or removes the crop, those objects can become visible again. This is convenient for reversible layout work but it is not a security feature.
Coordinates can have non-zero origins
Many simple PDFs use a MediaBox that begins at 0,0, but the format does not require that. A page can begin at another coordinate, and inherited boxes can come from the parent page tree rather than appearing directly on the page object. Robust software therefore has to resolve the effective box instead of assuming every page is [0 0 width height].
What about reversed or oversized rectangles?
Real-world PDFs are not always tidy. Rectangle corners can arrive in an unexpected order, and a CropBox may extend beyond the MediaBox. A viewer normally normalises and clips what it considers visible. Editing software has to make the same decision or an annotation overlay can be stretched, mirrored or offset when it is written back to the PDF.
NoblePDF's editor normalises CropBox corners and intersects the visible rectangle with MediaBox before placing a non-destructive annotation overlay. That behaviour was added after deliberately testing reversed-corner and oversized boxes rather than assuming files are well formed.
Rotation adds another coordinate system
The page dictionary can carry a rotation such as 90, 180 or 270 degrees. The underlying PDF coordinates do not simply become screen coordinates. A viewer rotates the page for display, while annotations or overlays written to the PDF need a transform that maps what the user saw back into page space. This is why page geometry bugs often appear only on rotated or cropped PDFs.
How to check a crop safely
- Keep an original copy.
- Crop a duplicate and reopen it in a second viewer.
- Check each edge at high zoom.
- If you plan to annotate after cropping, place a temporary mark near each corner and export once.
- If the crop is intended to hide sensitive information, stop and use redaction instead.