[comp.graphics] Postscript <=> EPS

rcj2@cbnewsd.ATT.COM (ray.c.jender) (01/17/90)

	I think I know how postscript works. But exactly what
	is Encapsulated PS, how does it work and can I convert
	one to the other? I have 2 programs. One creates Postscript
	the other reads Encapsulated Postscript. Needless to say,
	I can't use one with the other. 

	Am I on another planet or what?????


				Ray Jender
				att!cbnewsd!rcj2

rick@hanauma.stanford.edu (Richard Ottolini) (01/17/90)

In article <12702@cbnewsd.ATT.COM> rcj2@cbnewsd.ATT.COM (ray.c.jender) writes:
>
>	I think I know how postscript works. But exactly what
>	is Encapsulated PS, how does it work and can I convert
>	one to the other? I have 2 programs. One creates Postscript
>	the other reads Encapsulated Postscript. Needless to say,
>	I can't use one with the other. 
Encapsulated Postscript contains the bitmap of the rendered image
before the drawing commands.  Some versions contain only the bitmap.
The bitmap is not as good as the drawing commands because it implements
a device resolution.

woody@rpp386.cactus.org (Woodrow Baker) (01/17/90)

In article <12702@cbnewsd.ATT.COM>, rcj2@cbnewsd.ATT.COM (ray.c.jender) writes:
> 
> 	I think I know how postscript works. But exactly what
> 	is Encapsulated PS, how does it work and can I convert
> 	one to the other? I have 2 programs. One creates Postscript
> 	the other reads Encapsulated Postscript. Needless to say,
> 	I can't use one with the other. 
> 
> 	Am I on another planet or what?????
> 
> 
> 				Ray Jender
> 				att!cbnewsd!rcj2

perhaps.  This topic has been dealt with over and over on  comp.lang.postscript
but to summarize, EPS is simply a semi-standard formatting specification.
It uses comments to separate sections of the postscript file.  Certain
comments convey information about the image, such as BoundingBox info
and the like.  A EPS aware program can parse these comments, and know how
to transform, place and size the documents.  You can get a copy of the
documents from the     ps-fileserver@adobe.com

mail a message:

send help

for help in useing the server.

mail a message

send index     
for an index

send index Documents

will get you a list of documents

send Document xxxx

will get you document xxxx.  One note, these things
are in the form of postscript files and need a printer to print them.

Cheers
Woody
 

pdsmith@bbn.com (Peter D. Smith) (01/17/90)

Well, not exactly.  EPS does not have to include a bitmap.  Basically,
an EPS file is a DEAD NORMAL PS file except that
 -1- There are some extra double-% comments; the most important of
     which is '%%BoundingBox: llx lly urx ury
 -2- There are a series of forbidden PS commands, among them
     erasepage, grestoreall, initclip, inigraphics, initmatrix.
     showpage IS allowed (the other program must neutralize it).
 -3- Since the point of an EPS file is that it is swallowed up,
     lock, stock, and barrel by another program which will surround
     (encapsulate!) it, it is CRITICAL that the stack be left just 
     the way it started. 

The book 'Understanding Postscript programming (second edition)' by
David A. Holzgang is a lousy reference, but has a very clear EPSF
section.
     

Note on competance: I am in the finishing stages of converting my
companies product from producing Postscript to producing EPS.


				Peter D. Smith

keithm@ashtate (Keith Mund) (02/09/90)

Encapsulated PostScript can be described as most any PostScript file
that includes special instructions, disquised as comments, to describe
the item.

A minimum for the header is:

%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: llx lly urx ury

The two corners are represented as numeric values in a real file. 

There are certain restrictions on which commands may be used, but
they are sensible, like don't use "grestorall" etc. 

Adobe has a ducument entitled "Encapsulated PostScript File Format"
EPSF Version 1.2, March, 1987 (newer revision too?) that describes
this and the rest of the story. They are in Sunnyvale, CA. The
company has been happy to offer information, so I think they will help
you.

There are files like this, often in PostScript language format for 
great printing, available from them. They are also on Compuserve, and
hopefully somewhere relating to this net. 

Hope this has helped.


Keith Mund