The %%BoundingBox comment is a PostScript document structuring convention (DSC) used mainly for Encapsulated PostScript Files (EPSF). Its primary purpose is to inform an application importing the EPSF of the actual page mark boundaries. This allows the application to properly prepare for, and clip, the imported image. BoundingBox coordinates are determined by computing the smallest rectangle that would enclose the sum of all pages in a job. This rectangle's coordinates are based on PostScript's default user space: origin at the lower left, with X increasing to the right and Y increasing to the top.
As an example, consider a two-page document. Given the following enclosing coordinates of page 1 and 2, the BoundingBox is the rectangle that completely encloses the sum of both pages:
Lower Upper
Left Right
X Y X Y
Page 1 95 102 500 700
Page 2 120 225 557 600
--- --- --- ---
BoundingBox 95 102 557 700
The LaserWriter driver doesn't include the BoundingBox coordinates because it doesn't know what they would be at the time the BoundingBox comment must be generated We would have to run through the entire print job once to compute the BoundingBox, and then a second time to actually print the document. That would be very slow. What you see instead is that BoundingBox is sent with its question mark arguments, but PageBoundingBox is computed for the first page and sent with the job. Since PageBoundingBox only applies to a single page, its values can be computed for the first page as it is generated. It has little real value in the context of a large (multi-page) document, but it is still included, mainly for historical reasons. We've supplied it since the early versions of the LaserWriter driver.
The only way to create usable BoundingBox numbers would be to supply those that enclose the largest possible rectangle. This would ensure that nothing is ever clipped by the receiving program. The outside borders of any page can be defined by the following BoundingBox:
Lower Upper
Left Right
X Y X Y
0 0 612 792
Therefore, supplying these numbers as the BoundingBox would be valid for any printable page or job. Unfortunately there is no simple way to substitute these numbers for the question marks currently used. If the print job were dumped to a disk file, it could be edited to include the numbers, but this seems like it would be very annoying for multiple print jobs.
It seems unlikely that the BoundingBox comment is absolutely required for DEC laser printers, so it would help to know that the information was needed for a spooler or some printer host software. PostScript itself doesn't generally use the BoundingBox comment. As mentioned earlier, it is used so that importing software can know what to expect, and sometimes for spooling software.
It's important to note that our LaserWriter driver performs many PostScript operations that are not compatible with the EPSF format. This is not in any way abnormal for a print driver, but the result of importing a complete LaserWriter job in another document would produce very unpredictable results. The files generated by the LaserWriter driver are not EPSF compliant.