Article View: adobe.postscript.programming
Article #50obtain current position for BoundingBox
From: Daniel_Barna
Date: Fri, 13 Mar 2009 11:34
Date: Fri, 13 Mar 2009 11:34
15 lines
1394 bytes
1394 bytes
Hi,
the bbox device of ghostscript is said to be incorrect (by the manual of ps2eps - Linux), and I also experience this: it prints incorrect bounding boxes. So I would like to implement an automatic method to obtain the correct bounding box, by
1) making a block in the postscript file that I generate, like this:
/CalculateBBox where {
lower_left_x lower_left_y moveto
currentpoint = =
upper_right_x upper_right_y moveto
currentpoint = = } if
2) running gs by defining CalculateBBox: gs -dCalculateBBox myfile.ps;
and grepping the numbers from the output
The problem is, that currentpoint seems to return the current position in a local coordinate system (for example if my eps file is included in a latex document, and I want to obtain the bounding box of this final document, it fails).
Does anybody know how to do this?
Thanks
Technical Details
Message-ID:
<59b8333c.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,b287a5a9bad56b,start X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Daniel_Barna@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.postscript.programming Subject: obtain current position for BoundingBox Message-ID: <59b8333c.-1@webcrossing.la2eafNXanI> Date: Fri, 13 Mar 2009 04:34:09 -0700 Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit