Article View: comp.lang.postscript
Article #1851Converting PS to EPS
From: David A. Tong
Date: Fri, 21 Aug 1992 15:05
Date: Fri, 21 Aug 1992 15:05
35 lines
2510 bytes
2510 bytes
I wondered how to convert PS to EPS, so I searched, and searched, ... Well finally I found "Encapsulated PostScript Files Specification Version 2.0" from Adobe. The important section was titled %%BoundingBox: LLx LLy URx URy and here is what it says: "The values are in the PostScript default user coordinate system, in points (1/72 of an inch, or 2.835 mm), with the origin at the lower left corner. The bounding box must be expressed in default user coordinate space. This seems to be a big question among implementors of this specification. Regardless of the coordinate system in which your application operates, here is a foolproof way of determining the correct boundingbox: PRINT the page, get out a point ruler, and MEASURE first to the lower left corner, then to the upper right corner, using the lower-left corner of the physical paper as your origin. This works because it measures the end result (the marks on the page), an none of the computation matters." So basically, to convert a PS single page image (or any portion of the page) to EPS, measure the lower-left and upper-right corners of the portion of the page you want to include in the EPS file. Add the comment line %%BoundingBox with the measurements to the file that produced the image (the old PS file). Next, change the first line to include the EPS specification (see the FAQ recently posted). You now have an EPS file. BTW, if you don't have a point ruler, measure in inches, then divide by 72. This does work, because I tried it out with the PSfig package for LaTeX. It worked on the first go (believe it or not). I know that physically measuring the the corners of the image you want to include in another document is a pain (not to mention low-tech), but what works is what works. I have not found a better way (ie high-tech, automated, etc). If anyone knows of such a beast, please post. David A. Tong dat@sumex-aim.stanford.edu
Technical Details
Message-ID:
<1992Aug21.150534.987@morrow.stanford.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!morrow.stanford.edu!camis.Stanford.EDU!datReferences:
<Bt94AM.A9p@dswe.navy.mil.nz> <l96cogINNcgb@exodus.Eng.Sun.COM> <1992Aug21.142144.1641@rcvie.co.at>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!morrow.stanford.edu!camis.Stanford.EDU!dat From: dat@camis.Stanford.EDU (David A. Tong) Subject: Converting PS to EPS Message-ID: <1992Aug21.150534.987@morrow.stanford.edu> Followup-To: dat@sumex-aim.stanford.edu Summary: How to measure the BoundingBox of an image Sender: David A. Tong Organization: Stanford School of Medicine References: <Bt94AM.A9p@dswe.navy.mil.nz> <l96cogINNcgb@exodus.Eng.Sun.COM> <1992Aug21.142144.1641@rcvie.co.at> Date: Fri, 21 Aug 1992 15:05:34 GMT Lines: 37