Bounding Box

The bounding box of a PostScript image -- the printable figures and text on a page -- is the tightest rectangle which includes the image when the PostScript file is printed.

The bounding box is described by 4 numbers; the x-y coordinates of the lower-left corner of the image, followed by the x-y coordinates of the upper-right corner of the image.

The coordinates are measured from the bottom left corner of the page, in ``points'', where 72 points = 1 inch. With such a tiny unit, whole numbers provide plenty of precision for the bounding box coordinates.

Thus for images on an 8.5"×11" page, the x-coordinates of the bounding box always lie between 0 and 612, while the y-coordinates of the bounding box always lie between 0 and 792. If you view a PostScript image with ghostview (or gs or gv), the x-y coordinates are displayed as you move the mouse to point at different parts of the page.

In general, the bounding box line of a PostScript file (always a text file!) appears as one of the top dozen lines -- often the 2nd line -- in the form
%%BoundingBox: x0 y0 x1 y1
...where (x0,y0) and (x1,y1) are the coordinates of the lower-left and upper-right corners, respectively.

In the PostScript file for the page depicted here (the dotted lines & coordinates are only for illustration and aren't part of the image), the bounding box would be

%%BoundingBox: 166 430 440 631