[comp.sys.amiga] What is Encapsulated PostScript?

slc@hoptoad.uucp (Steve Costa) (09/05/89)

Using PixelScript (nee PrintScript), I have been dabbling with
PostScript lately. I would like to know what the relationship
of "Encapsulated PostScript" is to regular PostScript. Is it a
subset, a variant, some kind of encoding, or what?

Thanks for any help /    Steve Costa

ain@mentor.cc.purdue.edu (Pat-bob White) (09/05/89)

In article <8443@hoptoad.uucp> slc@hoptoad.UUCP (Steve Costa) writes:
>Using PixelScript (nee PrintScript), I have been dabbling with
>PostScript lately. I would like to know what the relationship
>of "Encapsulated PostScript" is to regular PostScript. Is it a
>subset, a variant, some kind of encoding, or what?

   [Please don't flame me if I'm a bit wrong on this -- I'm only scanning
    the Encapsulated Postscript document for this info...]

     In short, Encapsulated PostScript is a PS file with a bounding box that
   tells how big the image is.  It is designed to be imported into another PS
   (or EPS) file.. and therefore should be very careful about mucking with any
   global parameters and settings that will not be restored by the including PS
   program.  Also, it may optionally have a bitmap with it for previewing
   purposes.


To quote the EPS document from Adobe (without permission.. :-( )

   " Fundamentally, an EPS file is a standard PostScript language file with a
   bitmap screen preview optionally in the format. ... The bitmap is normally
   discarded when printing, and the PostScript language segment of the file is
   used instead.
     An EPS file should conform to at least Version 2.0 of the Adobe Document
   Structuring Conventions.  This does not explicitly require any of the
   structuring comments to be employed, but if used, they should be in
   accordance with that specification.  Aditionally, and EPS file is required
   to contain the %%BoundingBox comment,..."
   ... The file must also be a single page (not a multiple-page document)...

   Required Comments:
     The first comment in te header (and the first line in the file) should be:
     %!PS-Adobe-2.0 EPSF-2.0

     %%BoundingBox: LLx LLy URx URy
     The values are in the PostScript default user coordinate system.. with the
     origin at the lower left corner.  [BTW, this is the end result; as if
     you printed the EPS file and then measured the bounding box from the
     paper]

   Optional Comments:
     %%Title: included_document_title
     %%Creator: creator_name
     %%CreationDate: date_and_time

     %%EndComments

   [There are a whole slew of other comments defined.. I'm not going to list
    them all as that would entail typing in most of the rest of the document..
    but there are Font Management comments, File Management comments and Color
    comments]

   Operators to avoid:
     grestoreall	initgraphics	initmatrix	initclip
     erasepage		copypage	banddevice	framedevice
     nulldevice		renderbands	setpageparams	note
     exitserver		setscreen*	settransfer*

     [*only allowed under certain restrictions]

     All of the PostScript interpreter's stacks (including the dictionary stack)
   should be left in the state that they were in before the imported PostScript
   language code was executed.
     It is recommended that the imported EPS file create its own dictionary
   instead of writing into whatever the current dictionary might be.
     The EPS file should assume that the graphics state is in its default
   state, even though it may not be.  An importing program may choose to scale
   the coordinate system or to change the transfer function to change the
   behavior of the EPS file somewhat.
     The importing application is responsible for returning the color to black,
   the current dash pattern, line endings, adn other miscellaneous aspects of
   the graphics state to their default condition.

      The exact format of this screen representation [the bitmap mentioned
    earlier] is machine specific.  ...  An interchange representation is
    specified that should be implemented by everyone, and any
    environment-specific formats can be supported in addition.. "

   
   Well, that's about it.. I've left a whole lot of stuff out, but this is the
gist of it.


hope this helps..
Pat White (ain@mentor)

warb@faatcrl.UUCP (Dan Warburton) (09/09/89)

Adobe runs a mail-response server so you can get the document yourself
by sending mail to ps-file-server@adobe. To get thier description of
Encapsulated PostScript the text of your message should contain:
               send documents EPSF.ps

You should receive a postscript file in the mail. Try send help and
send index. Use seperate messages.