[comp.sys.mac] Format of embedded PostScript

dplatt@coherent.com (Dave Platt) (08/02/88)

One of the users at my site has a text file of PostScript information
(generated via a screen-dump process on a Sun Unix system).  The file is
plain text, and appears to be a valid Adobe PostScript program
complete with the header and trailer.

He'd like to include this image in a PowerPoint document.  PowerPoint
is capable of reading files in EPSF (embedded PostScript) format via
its "Paste from..." command.  I was able to change the file's type from
TEXT to EPSF, and the file did show up in the PowerPoint get-file
dialog box... but PowerPoint refuses to read the file, complaining that
"some of it is missing".

What is the format of an EPSF file?  Is it simply text, with some additional
heading information?  Must I craft up some resources to tell PowerPoint how
big the image is?  Where would I look for more information?
-- 
Dave Platt                                             VOICE: (415) 493-8805
  USNAIL: Coherent Thought Inc.  3350 West Bayshore #205  Palo Alto CA 94303
  UUCP: ...!{ames,sun,uunet}!coherent!dplatt     DOMAIN: dplatt@coherent.com
  INTERNET:   coherent!dplatt@ames.arpa,    ...@sun.com,    ...@uunet.uu.net

brail@topaz.rutgers.edu (Greg Brail) (08/03/88)

In article <7407@coherent.com> dplatt@coherent.com (Dave Platt) writes:
>One of the users at my site has a text file of PostScript information
>(generated via a screen-dump process on a Sun Unix system).  The file is
>plain text, and appears to be a valid Adobe PostScript program
>complete with the header and trailer.
>
>He'd like to include this image in a PowerPoint document.  PowerPoint
>is capable of reading files in EPSF (embedded PostScript) format via
>its "Paste from..." command.  I was able to change the file's type from
>TEXT to EPSF, and the file did show up in the PowerPoint get-file
>dialog box... but PowerPoint refuses to read the file, complaining that
>"some of it is missing".
>
>What is the format of an EPSF file?  Is it simply text, with some additional
>heading information?  Must I craft up some resources to tell PowerPoint how
>big the image is?  Where would I look for more information?

I've done this before with PageMaker.  Encapsulated PostScript (EPSF) can take
on several forms.  Its simplest form is a plain PostScript file, which is just
plain text.  (In fact, I'm pretty sure the file type is supposed to be TEXT).
Adobe Illustrator, Aldus FreeHand, and a few others can also make
Macintosh-format EPSF files.  These have a PICT version of the picture
appended to them so the program can display the picture on the screen easily.
These have a file type of EPSF.  The part PowerPoint says is missing is the
PICT resource.

Your Sun screendump doesn't have this PICT format.  You can make a plain-text
EPS file, though.  The only thing a PostScript file might not have to be a
plain EPS file is a BoundingBox comment in the front.  Edit the text file you
got from the Sun.  Assuming it's standard PostScript, look at the comments at
the beginning.  If there's one called "BoundingBox," you're in luck.  If not,
you have to add one.  The format is something like "%%BoundingBox X1 Y1 X2
Y2."  I'm no PostScript hacker, so I'm not sure.

I also don't know a good way to find out what the bounding box should be.
It's supposed to be a rectangle describing the perimeter of the shape.  As far
as I can see, the best way to find out is to print it and measure it with a
ruler.  I THINK the first two numbers are the lower left-hand corner, and the
second pair is the upper right.  The units are points -- 1/72".  Trial and
error will work eventually.

Once you add this (if it wasn't there already), try to open the file in
PowerPoint.  I don't know if it will work with PowerPoint.  PageMaker will let
you do this, and will give you a grey box the size of the BoundingBox which
you can resize and move around.  Good luck.

					-Greg Brail
					 brail@topaz.rutgers.edu

P.S. -- Adobe sells two good books on PostScript if this doesn't work. Check
out the Adobe PostScript Reference Manual and the PostScript Cookbook.