[comp.lang.postscript] What is encapsulated PostScript?

lampard@janus.trl.oz (Greg Lampard) (08/17/90)

Can someone please tell me what differences there are (if any) between 
'normal' PostScript and 'Encapsulated' PostScript.  
I ask merely for information.
Thanks in advance,  Greg Lampard.
============================================================================
  Greg Lampard			     Telecom Australia Research Laboratories
  ACSnet:  g.lampard@trl.oz.au		    770 Blackburn Rd, Clayton.  3168
  Phone:  +61 3 541 6360				Victoria,  Australia.
  Fax:    +61 3 543 3339
----------------------------------------------------------------------------
Any correspondence between my views and those of my employer is purely
coincidental.

orthlieb@adobe.COM (Carl Orthlieb) (08/18/90)

In article <18349@janus.trl.oz> lampard@janus.trl.oz (Greg Lampard) writes:
>Can someone please tell me what differences there are (if any) between 
>'normal' PostScript and 'Encapsulated' PostScript.  
>I ask merely for information.
>Thanks in advance,  Greg Lampard.

An Encapsulated PostScript file (EPSF) is a standard format for 
importing and exporting PostScript language files in all 
environments. It is usually a single page PostScript language 
program that describes an illustration. The purpose of the EPS 
file is to be included as an illustration in other PostScript 
language page descriptions. The EPS file can contain any 
combination of text, graphics, and images. An EPS file is the 
same as any other PostScript language page description, with 
some restrictions.

EPS files can optionally contain a bitmapped image preview, so 
that systems that can't render PostScript directly can at least 
display a crude representation of what the graphic will look 
like.  There are three preview formats: Mac (PICT), IBM (tiff), 
and a platform independent preview called EPSI.

An EPS file must be a conforming file, that is, it must conform to 
the document structuring conventions (DSC). At a minimum, it must 
include a header comment, %!PS-Adobe-3.0 EPSF-3.0, and a bounding 
box comment, %%BoundingBox: llx lly urx ury, that describes the 
bounds of the illustration.

Optional comments include font usage (%%DocumentFonts: or 
%%DocumentNeededResources: font), EPSI preview comments 
(%%Begin(End)Preview:), extensions (%%Extensions:) and language 
level (%%LanguageLevel:).

There are some operators that should not be used within an EPS file:
	banddevice	cleardictstack	copypage	erasepage
	exitserver	framedevice	grestoreall	initclip
	initgraphics	initmatrix	quit		renderbands
	setglobal	setpagedevice	setshared	startjob
These also include operators from statusdict and userdict operators like
legal, letter, a4, b5, etc.

There are some operators that should be carefully used:
	nulldevice	setgstate	sethalftone	setmatrix
	setscreen	settransfer	undefinefont
There will be a technical note available from Adobe called 'Guidelines for
Specific Operators' that will talk about why some operators are prohibited 
and how to use the others.

There is also a specification available on our server that talks about
EPSF in more detail.

Carl 8-)

----------------------------------------------------------------------------
The PS-File-Server is an automatic mail-response program. That means you
mail it a request, and it mails back the response. It is not accessible 
via anonymous FTP.

To get in touch with the server, send a message to the appropriate address,
either:
	uucp: {sun,decwrl}!adobe!ps-file-server OR
	internet: ps-file-server@adobe.COM
containing the word "help" in either the Subject: field or the message body.
It will reply with a message on how to use the available services.

There are many items available from the server; Documents (as PostScript
files), program sources, Adobe Font Metrics files, PostScript Printer
Description files, and other itmes.

You might send a separate message containing the word "index" to save some
time once you get the help message.

The file server does not respond to requests from users named "root",
"system", "daemon", or "mailer". This is to prevent mail loops from bounced
messages.

Note: If you do not receive help from the server within a day or so, it is
probably because the server's mail to you has bounced. You can try again
and use the "path" command within your message specifying a known return
path that the server should use. For example:
	path pyramid!rutgers!zakkaroo!jj
(substitute whatever address is appropriate)

If you have any problems contacting the server, or you have any suggestions,
please send a message to the moderator (ps-file-person@adobe.COM).

brown@vidiot.UUCP (Vidiot) (08/21/90)

In article <18349@janus.trl.oz> lampard@janus.trl.oz (Greg Lampard) writes:
<Can someone please tell me what differences there are (if any) between 
<'normal' PostScript and 'Encapsulated' PostScript.  
<I ask merely for information.

In a nutshell, extra special comments are added to the code that provides
information for other programs to read in the file.  As far as I know, the
sole purpose of EPS files is for importation into other programs.  You know,
like creating a graphics picture and importing it into your word processing
package.
-- 
      harvard\     att!nicmad\        spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INET:<@spool.cs.wisc.edu,@astroatc:brown@vidiot>