ghostscript BoundingBox values

眉间皱痕 提交于 2019-12-04 13:54:15

问题


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


回答1:


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.)



来源:https://stackoverflow.com/questions/6250064/ghostscript-boundingbox-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!