EPS files from ps.map

Chris W Skelly gewcs at jcu.edu.au
Thu Jul 1 20:10:47 EDT 1993


Lars and anybody else having problems importing Postscript
into documents.

ps.map is _NOT_ the only program generating postscript that is
not an eps file, although most pc based software, grapher,
surfer, lotus, etc now generate eps files

eps = encapsulated postscript

you need to replace the top line of your postscript file

"%!PS"

with

%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: {4 numbers defining the size of the image}
%%Pages: 0

and the very last line of your file needs to be

%%Trailer

now I would be interested (and suprised) if these differ on
Mac generated postscript, but it is easy to check.  Just use
any Mac graphics (not Word) programme to generate a postscript
file and then take a look at it.  Post it back here if it is
different (just the first 12 lines or so).

1. the first line above identifies the file as conforming to
   Adobe standard
2. the second line tell the printer how big the image is
   and this is a complete pain in the ass! Each of the 4 numbers
   required are in 72nds of an inch, yes thats right.  It is
   now a printing standard all measurements are in 72nds of
   an inch, so if your figure is 1 inch from all edges of the
   page your bounding box line is:

   %%BoundingBox: 72 72 540 720

   Confused?  Well it goes like this:

   1. 72 distance from right edge of page to right edge of figure
   2. 72 distance from bottom edge of page to bottome edge of figure
   3. 540 dist. from right edge of page to _left_ edge of figure
   4. 720 dist. from bottom of page to _top_ edge of figure

And if this isn't confusing enough, think about us poor sods who use
_METRIC_ paper!!!

   The %%Pages: 0 tells the printer that this will fit onto one
   page, and lets the document postscript file control pagination.

   The %%Trailer line that you put at the bottom simply says that
   this is the end of the figure.

There are to tomes on the Adobe Postscript standard, one is a 
reference work and the other is a how-to-program in Postscript.
Yes for those of us who didn't know this, Postscript is actually
a language.

Cheers,
Chris




More information about the grass-dev mailing list