Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ghostscript BoundingBox values

Tags:

ghostscript

I'm just asking myself, what are those bbox values printed out by:

gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox myfile.pdf

%%BoundingBox: 46 911 1668 4537
%%HiResBoundingBox: 46.080002 911.520035 1667.520064 4536.000173

top-left-X, top-left-Y, ....?

And what's the measurement of those values (1/72")?

Thanks for helping

like image 875
Christof Aenderl Avatar asked Jan 27 '26 22:01

Christof Aenderl


1 Answers

These values are given in PostScript "points":

72 points == 1 inch

so yes, the measurement value is 1/72''...

The four values need to be read as two pairs of coordinates describing the lower left and the upper right corner points of a rectangle enclosing the bounding box.

The PostScript coordinate system has its origin in the lower left corner.

The 46 911 part is for the lower left corner point: 46 points distance from the right left edge and 911 points from the bottom edge.

The 1668 4537 part is for the upper right corner point: 1668 points distance from the right left edge and 4537 points from the bottom edge.


(Corrected a somewhat legasthenic error... Thanks to Scolytus for spotting it.)

like image 135
Kurt Pfeifle Avatar answered Feb 01 '26 12:02

Kurt Pfeifle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!