Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!orstcs!sapphire!pvo From: pvo@sapphire.OCE.ORST.EDU (Paul O'Neill) Newsgroups: comp.lang.postscript Subject: Re: A program to convert .ps to .eps? Message-ID: <19969@orstcs.CS.ORST.EDU> Date: 23 Aug 90 07:03:45 GMT References: <90232.075141HBX@psuvm.psu.edu> Sender: usenet@orstcs.CS.ORST.EDU Reply-To: pvo@sapphire.OCE.ORST.EDU (Paul O'Neill) Organization: Coastal Imaging Lab, Oregon State University, Corvallis, OR Lines: 93 In article <90232.075141HBX@psuvm.psu.edu> HBX@psuvm.psu.edu (Terry Harrison 336 Beam BAB 3-3357) writes: >Is there a program (PD or otherwise) that will take a postscript file and >and convert it to EPS? ........ > PVO's ps -> eps summary: (updated 22 aug 90) Two lines are usually enough to fake the PS -> EPSF conversion 1) Start the postscript file with the line: %!PS-Adobe-2.0 EPSF-1.2 2) Include a BoundingBox: line, eg: %%BoundingBox: 0 0 504 378 3) For framemaker, IMPORT, do not INCLUDE the fake EPSF file. This works for all NeXT apps requiring EPSF (including Frame2.0) and Frame1.3 on Sun's. (On the Next, the file is interpreted and you get to see it!). To calculate the BB: bbfig by Ned Batchelder sometimes works. [rtsg.ee.lbl.gov:dvi2ps.tar.Z] distill by Glenn Read usually works. [ Adobe fileserver To: ps-file-server@adobe.com send programs still.ps] epsinfo.ps usually works [ Adobe fileserver: To: ps-file-server@adobe.com send Programs epsfinfo.ps] printing the file and measuring with a ruler always works. For images: Patch fbps to do 1) and 2) (patch included, below) [nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z] For Unix plot(5) graphs: Use plot2ps instead of psplot. [comp.sources.misc v06i083] ========================================================================== [distill & epsinfo.ps do more than BB calculation, they check for "nasty" instructions and throw in the proper meta-comments here and there] ========================================================================== *** fbps.c.orig Sun Jun 24 22:19:50 1990 --- fbps.c Wed Jul 18 15:01:20 1990 *************** *** 58,63 **** --- 58,64 ---- char *argv[]; { register int i, j; int rows, cols, rowlen; + int bbx, bby; double paperwidth, paperheight; double maxwidth, maxheight; double width = -1, height, llx, lly; *************** *** 145,151 **** /* Write out PostScript Header */ if (scribe) ! { printf ("%%! Scribe @graphic style PostScript\n"); if (title) { printf ("%%%%Title: %s\n", ps_chars (title)); } if (creator) { printf ("%%%%Creator: %s\n", ps_chars (creator)); } printf ("%%%%CreationDate: %s", ctime (&clock)); --- 146,155 ---- /* Write out PostScript Header */ if (scribe) ! { printf ("%%!PS-Adobe-2.0 EPSF-1.2\n"); ! bbx = width * 72; ! bby = height * 72; ! printf ("%%%%BoundingBox: 0 0 %d %d\n", bbx, bby); if (title) { printf ("%%%%Title: %s\n", ps_chars (title)); } if (creator) { printf ("%%%%Creator: %s\n", ps_chars (creator)); } printf ("%%%%CreationDate: %s", ctime (&clock)); Paul O'Neill pvo@oce.orst.edu DoD 000006 Coastal Imaging Lab OSU--Oceanography Corvallis, OR 97331 503-737-3251