[comp.lang.postscript] Definition of EPS vs PS

derosa@motcid.UUCP (John DeRosa) (07/10/90)

I am having an arguement with a fellow worker about
the difference between encapsulate postscript and 
postscript.

We both agree what postscript is, i.e. a language
of commands that can be sent to a postscript engine
of one sort or another.

He says that an EPS file is: "An Encapsulated Postscript 
file is merely a postscript file with two additional
lines added at the begining:

	%!PS-Adobe-2.0 EPSF-1.2
	%%BoundingBox: 0 0 612 792"

I really don't know what it is.  

Will someone hazard a definition of EPS and PS?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=    John DeRosa, Motorola, Inc, Cellular Infrastructure Division           =
=                   e-mail: ...uunet!motcid!derosaj                         =
=                           motcid!derosaj@uunet.uu.net                     =
=                Applelink: N1111                                           =
= I do not hold by employer responsible for any information in this message =
=      nor am I responsible for anything my employer may do or say.         =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

glenn@heaven.woodside.ca.us (Glenn Reid) (07/10/90)

In article <3911@crystal9.UUCP> derosa@motcid.UUCP (John DeRosa) writes:
>I am having an arguement with a fellow worker about
>the difference between encapsulate postscript and 
>postscript.
>
>He says that an EPS file is: "An Encapsulated Postscript 
>file is merely a postscript file with two additional
>lines added at the begining:
>
>	%!PS-Adobe-2.0 EPSF-1.2
>	%%BoundingBox: 0 0 612 792"
>
>I really don't know what it is.  

I wrote the original (now antiquated) specification for Encapsulated
PostScript files, so I'll hazard a guess.  The remarks your friend
made, I would say, are "necessary but not sufficient".  Well, really,
that is being too kind.  They are a hack that *might* turn a file into
an EPS file, if it just happened to already be one.  But in general,
just adding those comments won't do it.  That is a little bit like
making an Objective C program into a vanilla C program by changing the
extension from ".m" to ".c"

If you want a brief description that isn't quite the whole truth, an
Encapsulated PostScript file is a well-behaved PostScript file that
can be safely imbedded into another PostScript program as an
illustration.

This makes EPSF effectively a subset of the PostScript language.  For
instance, you cannot use the operator "erasepage" in an EPS file,
because it would erase the entire page, including the rest of the page
on which it was supposed to be an illustration.  It also must only be
a single page in length (imagine using a 52-page document as an
illustration on page 3 of your newsletter).

For a more complete definition, get a hold of the specification for EPS
files from Adobe.  I imagine you will get several follow-ups to your
posting, one of which is sure to have the details on how to get the spec.

Adding %! to the beginning of the PS file doesn't change anything about
it.  There are, however, many applications that support EPS files, and they
won't even consider importing the file without the necessary header
comments.

NOTE: It is generally a bad idea to add comments to a file by hand.
Those comments are a "guarantee" that the file adheres to the EPSF
specification, and if the file doesn't adhere to it, you wouldn't want
to make it tell untruths to the importing application.  Sometimes you'll
get lucky, often you won't.

I hope this helps a little bit, although it doesn't seem all that clear
when I glance back through it.  Getting a hold of the spec from Adobe
will make it the most clear.

/Glenn

-- 
 Glenn Reid				PostScript/NeXT consultant
 glenn@heaven.woodside.ca.us		Independent Software Developer
 ..{adobe,next}!heaven!glenn		Unparalleled Quality

woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) (07/10/90)

In article <3911@crystal9.UUCP>, derosa@motcid.UUCP (John DeRosa) writes:
> I am having an arguement with a fellow worker about
> the difference between encapsulate postscript and 
> postscript.
> 
> We both agree what postscript is, i.e. a language
> of commands that can be sent to a postscript engine
> of one sort or another.
> 
> He says that an EPS file is: "An Encapsulated Postscript 
> file is merely a postscript file with two additional
> lines added at the begining:
> 
> 	%!PS-Adobe-2.0 EPSF-1.2
> 	%%BoundingBox: 0 0 612 792"

in a sense it is. The above will allow you to import to some packages.
EPS is really an attempt to fix some oversights in the language, by using
structured comments.  These comments mean nothing to the Postscript printer,
but are designed to allow applications to do such things as allocate space
on the page properly, know which fonts are needed etc. etc.  Some print
spoolers apparently utilize this information as well.  There are several
documents on the  fileserver at adobe.  I forget the exact way to get there,
I think it is  ps-file-server@adobe.com.  Send a message    send help
and it will.  Then you can get the complete EPS specs from the server.
In the PC world, there is no use for EPS structuring comments, other than
to allow certain software packages to import EPS files for display or
printing.  Print spoolers are essentialy not needed, and very little used,
and those that are, are things like superspl from AST, and the like that
are NOT postscript aware.
Your friend is correct, in that the above 2 lines are the minimum required
to qualify as "EPS", but as anyone who has tangled with the beast can tell
you, they are not any guarantee of anything.  Seems that each package likes
a different subset of EPS, and there is very little acutal understanding
between packages when it comes to EPS.

Cheers
Woody