[comp.lang.postscript] Encapsulated Postscript

broehl@watdcsu.waterloo.edu (Bernie Roehl) (10/15/87)

Hi.

I'm familiar with Postscript, but have had no luck finding anything on the
"Encapsulted PostScript Format".  If anyone out there in Netland has any
info on EPSF, please post or mail to the address below.  Thanks, as they say,
in advance.

broehl@watdcsu.waterloo.edu (Bernie Roehl) (10/15/87)

In article <3952@watdcsu.waterloo.edu> broehl@watdcsu.waterloo.edu (Bernie Roehl) writes:
>If anyone out there in Netland has any
>info on EPSF, please post or mail to the address below.

Which is...

	broehl@watdcsu.waterloo.edu

	Bernie Roehl
	University of Waterloo Electrical Engineering Dept
	broehl@watdcsu.waterloo.edu
	home: (519) 745-4419
	work: (519) 885-1211 x 2607

jww@sdcsvax.UCSD.EDU (Joel West) (10/17/87)

EPSF is a subset/superset (depending on how you view it) of the
document structuring conventions described in the red book and
"Understanding PostScript Programming."

I got my copy of the spec by sending $1 to
	Altys Corporation
	Attn: EPSF Spec
	720 Avenue F, Suite 108
	Plano, TX  75074
-- 
	Joel West  (c/o UCSD)
	Palomar Software, Inc., P.O. Box 2635, Vista, CA  92083
	{ucbvax,ihnp4}!sdcsvax!jww 	jww@sdcsvax.ucsd.edu

sa@ttidca.TTI.COM (Steve Alter) (12/18/87)

In article <488@tetons.UUCP> gnd@tetons.UUCP (Greg Darnell) writes:
} Can anyone tell me what "Encapsulated" PostScript is?  I have some
} PostScript files I would like to import into Ventura Publisher running
} under MS/DOS 3.2 to incorporate in a document.  When I try to load 
} them into VP it chokes.  VP insists on them being in encapsulated format
} with a default file type of .EPS but I don't know what has to be done.

My off-the-top-of-my-head belief is that you need one of the following:
A. An application that knows how to create a real .EPS (Encapsulated
   PostScript) file, or
B. You need for Ventura Publisher to know how to incorporate straight
   postscript.

I say this, because the format looks pretty hairy for someone to
incorporate manually.  Adobe Systems has published a document entitled
"Encapsulated PostScript File Format" with subtitle "For Apple Macintosh
and IBM PC Applications."  (PostScript is a registered trademark of Adobe
Systems, Incorporated.)  The date of this document is December 18, 1986,
for version 1.2 of the EPS format.

Since this might be proprietary stuff, I'll have to avoid technical
details (anybody from Adobe reading this?)

A failure in any one of the following could be the cause for Ventura
rejecting your PostScript file.

1. Structuring should follow the conventions listed in the PostScript
   Language Reference Manual (the "Red book") Appendix C, and also the
   PostScript Document Structuring Conventions, version 2.0 (available
   from Adobe.)

2. Files must be "well-behaved" in their use (or avoidance) of certain
   operators.

3. The file must include the "%%BoundingBox" comment (described in the
   Structuring Conventions.)

4. There are a bunch of "%%comments" that must or should be included
   if the file does any text work.

5. This last one is the worst.

   For the IBM PC (and its brothers in the universe of clones):
   "The recommended file extension is .EPS.  Other file extensions will
   also be allowed, but it will be assumed that these files are text only
   files with no screen metafile or TIFF section in them."

   This says to me that .EPS files might be required to have a screen
   metafiles or TIFF section!
   (A screen metafile is a Microsoft Windows feature.)
   (TIFF == Tag Image File Format.)
   The document goes on to describe, in explicit detail, the format of the
   .EPS file when a screen metafile or TIFF file is included; this is
   a binary format, with length/position headers and checksums.

Conclusions:
If you can get Ventura Publisher to accept a straight-text file, then
all you might have to do is make sure that the required comments are
in there and that the code is well-behaved.

Good Luck!

-- Steve Alter
...!{csun,rdlvax,trwrb,psivax}!ttidca!alter  or  alter@tti.com
Citicorp/TTI, Santa Monica CA  (213) 452-9191 x2541

olson@endor.harvard.edu (Eric K. Olson) (12/19/87)

In a recent article Greg Darnell writes:
>
>Can anyone tell me what "Encapsulated" PostScript is?
...
>Any information on the definition, an example or a reference would
>be greatly appreciated.  Thanks.

Description:
A set of commenting conventions and additional rules for Postscript
procedures.  Comments can be figured out from the following example.
Other rules include:  Don't use banddevice, copypage, erasepage, exitserver
framedevice grestoreall, initclip, initgraphics, initmatrix, legal, letter, 
note, nulldevice, quit, renderbands, setpageparams, setdevice, setsccbatch,
setmatrix, or stop.  Showpage is permitted, but will be disabled by the
importing application.  All stacks should end as they started.  Do not
overnest save/restore and gsave/grestore, since the importing file might
already have used a lot of the (limited) nesting levels.

EPS files also usually have an optional low-resolution picture in the Resource
Fork if they are on a Macintosh.  IBM EPS files have a small header:

long	'EPSF'
long	byte position in file for PS start
long	byte length of PS
long	byte position in file for MetaFile screen representation
long	byte length of screen representation
long	byte position in file of TIFF screen representation
long	byte length of TIFF
short	checksum (XOR of bytes 0-27 in file; ignored if FFFF)

position and length for MetaFile and TIFF may be 0 and will be ignored.

Reference:
AltSys Corporation
Attn: Jim Von Ehr
720 Ave. F, Suite 108, Dept. EPS
Plano, TX 75074
(214) 424-4888
MCI: ALTSYS

Example of Encapsulated Postscript:
Taken from Adobe Illustrator 1.1; draws a box.

%!PS-Adobe-2.0 EPSF-1.2
%%Creator:Adobe Illustrator(TM) 1.1 M00004385N
%%For:Eric K. Olson Pixelogic, Inc.
%%Title:Box.epsf.mac
%%CreationDate:12/18/87 2:09 PM
%%DocumentProcSets:Adobe_Illustrator_1.1 0 0
%%DocumentSuppliedProcSets:Adobe_Illustrator_1.1 0 0
%%DocumentFonts:Courier
%%BoundingBox:23 -138 144 -21
%%TemplateBox:288 -360 288 -360
%%EndComments
%%BeginProcSet:Adobe_Illustrator_1.1 0 0
% Copyright (C) 1987 Adobe Systems Incorporated.
% All Rights Reserved.
% Adobe Illustrator is a trademark of Adobe Systems Incorporated.
/Adobe_Illustrator_1.1 dup 100 dict def load begin
/Version 0 def
/Revision 0 def
% definition operators
/bdef {bind def} bind def
/ldef {load def} bdef
/xdef {exch def} bdef
% graphic state operators
/_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef
/_k /setcmybcolor where 
{/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def
/g {/_b xdef /p {_b setgray} def} bdef
/G {/_B xdef /P {_B setgray} def} bdef
/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef
/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef
/d /setdash ldef
/_i currentflat def
/i {dup 0 eq {pop _i} if setflat} bdef
/j /setlinejoin ldef
/J /setlinecap ldef
/M /setmiterlimit ldef
/w /setlinewidth ldef
% path construction operators
/_R {.25 sub round .25 add} bdef
/_r {transform _R exch _R exch itransform} bdef
/c {_r curveto} bdef
/C /c ldef
/v {currentpoint 6 2 roll _r curveto} bdef
/V /v ldef
/y {_r 2 copy curveto} bdef
/Y /y ldef
/l {_r lineto} bdef
/L /l ldef
/m {_r moveto} bdef
% error operators
/_e [] def
/_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d
/Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966
_e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} bdef
/_fill {{fill} stopped
{/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} bdef
/_stroke {{stroke} stopped
{/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} bdef
% path painting operators
/n /newpath ldef
/N /n ldef
/F {p _fill} bdef
/f {closepath F} bdef
/S {P _stroke} bdef
/s {closepath S} bdef
/B {gsave F grestore S} bdef
/b {closepath B} bdef
% text block construction and painting operators
/_s /ashow ldef
/_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g setmatrix
_stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef
/_A {_a moveto _t exch 0 exch} bdef
/_L {0 _l neg translate _G currentmatrix pop} bdef
/_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef
/_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg exch neg} bind] def
/z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} bdef
/_g matrix def
/_G matrix def
/_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef
/e {_D p /t {_A _s _L} def} bdef
/r {_D P /t {_A _S _L} def} bdef
/a {_D /t {dup p _A _s P _A _S _L} def} bdef
/o {_D /t {pop _L} def} bdef
/T {grestore} bdef
% group construction operators
/u {} bdef
/U {} bdef
% font construction operators
/Z {findfont begin currentdict dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 ne
{/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq
{Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop
currentdict dup end end /FontName get exch definefont pop} bdef
end
%%EndProcSet
%%EndProlog
%%BeginSetup
Adobe_Illustrator_1.1 begin
n
%%EndSetup
u
0 g
0 G
0 i
0 J
0 j
1 w
10 M
[]0 d
%%Note:
143 -137 m
143 -22 L
24 -22 L
24 -137 L
143 -137 L
f
83.5 -79.5 m
F
U
%%Trailer
_E end

                      (defun maybe (x) (maybe (not x)))
Eric K. Olson     olson@endor.harvard.edu     harvard!endor!olson     D0760
   (Name)                (ArpaNet)                 (UseNet)        (AppleLink)

wg@cbnewsm.ATT.COM (Bill Gieske) (06/29/89)

I have some Postscript files which I would like to convert to encapsulated
format.  I'm not sure what that is or how it differs from a normal Postscript
file, but I need this so as to include the graphics defined by the Postscript
file in a desktop publishing program.  How do I get from one to the other?  Is
there a PD program around to do this?  Or?

Thanks.

Bill Gieske
att!alux2!wg

johnk@peyote.cactus.org (John Knutson) (11/25/89)

A few weeks ago, I got the encapsulated postscript format file description
document from adobe's mail server.  after reading over the document I
decided to try to import the example EPS file into pagemaker and print it.

No such luck.  All I got was a blank page.  I gave up after a few attempts.
When I got home, I sent some mail to my favorite local postscript guru.
I found out that mac and ibm EPS formats were different.  Great.

WHY are there two different formats?  Isn't that defeating the purpose of
having postscript at all?  Wasn't postscript designed to be the page
definition standard?  If so, why have postscript mutations?  "Well if you're
using machine a, then postscript means this, but if you're using machine
b, then postscript means this."

That's kinda like saying "well to display something in pascal on a pc you use
'writeln', but on a mac you use 'scuzzywacker'".

argh.

The whole point in my trying to figure out EPS was to modify a graphics
program I have to produce postscript output, IE I want to print (gasp) bit
mapped images.  As far as I can tell, EPS has better support of bitmaps than
PS, and the same goes for color.  Which reminds me, what if you import (if you
even can) an EPS file that has a bitmap image with a depth of 2+ bits and
you're printing to a printer that doesn't support color?  I'm using, for the
most part, pagemaker to import the EPS files, if that's important (and I'm
sure it is).

Anyway, would I be better off trying to use straight PS or should I try to
make sense out of the two EPS file standards?

chan@hpfcmgw.HP.COM (Chan Benson) (11/28/89)

> A few weeks ago, I got the encapsulated postscript format file description
> document from adobe's mail server. 

What is this machine's name please and where is the eps format 
description located? (I'm assuming it's available via anon-ftp.)

			-- Chan Benson
			HP Fort Collins
			chan@hpfcmi.hp.com
			

jef@well.UUCP (Jef Poskanzer) (11/28/89)

In the referenced message, johnk@peyote.cactus.org (John Knutson) wrote:
}When I got home, I sent some mail to my favorite local postscript guru.
}I found out that mac and ibm EPS formats were different.  Great.
}WHY are there two different formats?

Only two?  Heh.

EPS is just plain old PostScript with the Document Structuring
Conventions junk included.  The bitmap representation part is
*optional*, and if it is included its format is *unspecified*.
Basically, EPS by itself is next to useless for interchange.

WHY, you ask?  I don't know.

However, the EPSF doc (send mail to ps-file-server@adobe.com and ask
for Documents/EPSF.ps) does specify a machine-independent bitmap
representation.  This sub-format is called EPSI, and it would be
quite useful if anyone actually used it.
---
Jef

  Jef Poskanzer  jef@well.sf.ca.us  {ucbvax, apple, hplabs}!well!jef
   "In America, through pressure of conformity, there is freedom of
         choice, but nothing to choose from." -- Peter Ustinov

woody@rpp386.cactus.org (Woodrow Baker) (11/29/89)

In article <740005@hpfcmgw.HP.COM>, chan@hpfcmgw.HP.COM (Chan Benson) writes:
> > A few weeks ago, I got the encapsulated postscript format file description
> > document from adobe's mail server. 
> 
> What is this machine's name please and where is the eps format 
> description located? (I'm assuming it's available via anon-ftp.)
> 
> 			-- Chan Benson
> 			HP Fort Collins
> 			chan@hpfcmi.hp.com
> 			

Information has been posted last week about how to get to the server.

what you do is
mail ps-file-server@adobe.com  <return<
type in a message.
send help     gets you a help file
send index	gets you a area index
send index AFMFiles will get you a list of AFM files, etc.
There is a program, documentaion, and AFM section.

The next day, you should have a reply from the server.  It is a slow way to
do things, but it works....

Cheers

Woody

jcgs@wundt.stars.flab.Fujitsu.JUNET (John Sturdy) (11/30/89)

(This is a re-post, something got mixed up)
johnk@peyote.cactus.org writes
>> I found out that mac and ibm EPS formats were different.  Great.
EPS itself is one format, independent of the machine type. However, on
the Mac filing system, you can add a PICT preview bitmap in the
resource fork, and on the PC you can precede the EPS file proper with
a strange header indicating that the file contains both a real (to my
thinking, that is) EPS section, and also a bitmap section, either in
metafile or TIFF. Although Adobe put this in the EPS spec (pp12-13 in
spec version 2.0) it's not so much Encapsulated PS as a way of saying
there are two logical files stuffed into one real one. (Doubly
encapsulated?)

>>The whole point in my trying to figure out EPS was to modify a graphics
>>program I have to produce postscript output, IE I want to print (gasp) bit
>>mapped images.  As far as I can tell, EPS has better support of
>>bitmaps than PS

The bitmap section of the file is optional, and is intended for
previewing in page makeup programs and so on - not a full resolution
image. You still put the bitmap in the actual PS code.

If you really want to do the preview stuff (which is nice, but most
tools don't bother), there is a device-independent version of the
preview bitmap (pp13-15 of the EPS spec) which you could use. I don't
know whether Mac or PC applications will understand this in practice -
in principle they should.

>>and the same goes for color.
EPS lets you give a description of the colour scheme used, to help out
fancy spooling systems (along the lines of telling it what colour ink
to load into your colour printer!). However, all the colour
information must still be in the actual PostScript.

>>Anyway, would I be better off trying to use straight PS or should I try to
>>make sense out of the two EPS file standards?
Try the one EPS file standard :-)
See the final paragraph of p12 - "it is always permissible.... as long
as it does not contain the preview section"
Besides, I doubt that PageMaker will try to import a non-encapsulated
PostScript file.
--
__John            When asked to attend a court case, Father Moses took with him
          a leaking jug of water. Asked about it, he said: "You ask me to judge
               the faults of another, while mine run out like water behind me."

                jcgs@uk.co.harlqn (UK notation) jcgs@harlqn.co.uk (most places)
    ...!mcvax!ukc!harlqn!jcgs (uucp - really has more stages, but ukc knows us)
John Sturdy                                            Telephone +44-223-872522
                      Harlequin Ltd, Barrington Hall, Barrington, Cambridge, UK

jcgs@wundt.uk.co.harlqn (John Sturdy) (11/30/89)

This is a repost. The first one bounced somewhere. Organization lines
etc may still be strange as on the previous one.


>>I'm sick of dealing with Adobe's poorly written and changing structuring
>>conventions, and even more so with applications that don't make even an
>>effort to comply.  Comments or thoughts?
I agree! I wish the EPS spec didn't change/grow so gradually. At least
it seems to have settled down to numberable versions now. I wrote an
EPS-using application a while ago (basically an EPS editor, to give
interactive/programmed access to most of the things the EPS is meant
to allow). I'll try to summarise what I learnt from this:

(1) EPS is great fun to work with, if done properly. There's nothing
substantially wrong with the file format itself, although there are a
few things I would prefer changed/tightened up. Just picky little
things on the whole, for example:
(1.1) The "%%Creator" line can indicate the person who
drew the picture (or whatever) or the program they used to do it. It
would be much more useful to give these separately - my program had to
try to split them out.
(1.2) Following from the above, it would be nice to know the version
number of the producing package, so that when you merge several files,
you could quickly tell whether they all require the same prologue.

(2) The information you need is quite scattered (two documents from
the Adobe infoserver, and assorted bits of the green book).

(3) Some things are not specified well enough to use them. One I
noticed is the {Begin/End}Object stuff. What constitutes the complete
PS code for an object? Some of the EPS-producing packages I have
written could easily produce "objects", if I thought anyone would read
them as such. Should each object be positioned independently on the
page (ie a moveto from the page origin) or is it OK for them to be
relative to each other? OK, I could have asked Adobe, but for
something I thought no-one would use anyway, I chose to drop the
facility.

(4) Some tools produce poor encapsulation of their PS. For example,
one of the well-known packages put some necessary PS code between
%%EndProlog and the first %%Page marker (to cope with this, I had to
treat everything up to the start of the first page as the prologue - I
don't like having to produce kludges like that to get round other
people's kludges, especially when there is a written spec to follow).

(5) Some tools that encapsulate their PS properly don't produce
conformant PS. One popular word-processor from a company with a good
public reputation, for example, re-encodes fonts the first time each
font is used -- in line -- in the code for a *page*, not in the
prologue at all. Because of this, you can't separate out pages for
printing individually - you can't even print the document entire but
in reverse page order! Not only is the guilty tool one that puts
itself forward as supporting EPS, but it is one that is likely to be
bought and used by end-users who will try to run it with WYSIWYG
layout tools, and who will not all know how to fix things at the
representation level when things go wrong. (I'm not going to name them
here - so you authors of popular WP packages can all go and have a
good look at your output now :-*)



How about a validation service, as well as a program? The program is
fine for those of us who can compile programs etc, but will be of
little use to most end-users. A certificate that can be printed
somewhere on the box for "shrink-wrapped software" could have more
effect in making pressure to improve EPS quality -- perhaps Adobe
could do this? (Rather them than me :-)

And for those of us on the net, perhaps we could have a survey about
EPS usage? My questions would be:

* What features can you reasonably produce in your PS output?
* What features do you want to read, parse and use when importing PS?
* What things would you like to do using EPS if you had suitable tools?
* What horror stories of bad PS do you have? (first-hand or local-site
only).
* What further things would you be interested to see in EPS (read the
specs first - it might be there already, lurking in a dark corner)?
* What things did you find difficult to understand or find in the
documents from Adobe?

Repeating from point (1): Well done overall, Adobe. But I think it now
needs rescuing from misuse and disuse.
--
__John            When asked to attend a court case, Father Moses took with him
          a leaking jug of water. Asked about it, he said: "You ask me to judge
               the faults of another, while mine run out like water behind me."

                jcgs@uk.co.harlqn (UK notation) jcgs@harlqn.co.uk (most places)
    ...!mcvax!ukc!harlqn!jcgs (uucp - really has more stages, but ukc knows us)
John Sturdy                                            Telephone +44-223-872522
                      Harlequin Ltd, Barrington Hall, Barrington, Cambridge, UK

rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (12/02/89)

jcgs@wundt.uk.co.harlqn (John Sturdy) writes:
> (4) Some tools produce poor encapsulation of their PS. For example,
> one of the well-known packages put some necessary PS code between
> %%EndProlog and the first %%Page marker (to cope with this, I had to
> treat everything up to the start of the first page as the prologue - I
> don't like having to produce kludges like that to get round other
> people's kludges, especially when there is a written spec to follow).

This is not a kludge.  Check out %%BeginSetup/%%EndSetup.  This
(between the end of the prolog and the beginning of the first page)
is where you set document-global parameters, such as orientation or
placement, manual feed or number of copies.  Then you can

   gsave showpage grestore

to get around showpage's ugly way of resetting everything.

Remember, the prolog should not *execute* anything, just define things.
The pages should not *define* permanent things.

BAXTER_A@wehi.dn.mu.oz (09/17/90)

How do I go about encapsulating postscript? Email would be great.

REGARDS ALAN

craigb@bhpmrl.oz.au (Craig Blundell) (10/18/90)

Sorry to ask a question that has no doubt been asked (many times ???) 
before but ..............

Could someone please explain the differences between normal and 
encapsulated PostScript ????

and, are there programs available (and how can I get copies of
them) for translating between the two types of PostScript code ???

Many thanks in advance....


                Craig Blundell

     /\/\       Image Processing & Data Analysis Group
    / / /\      BHP Melbourne Research Laboratories
   / / /  \     245 Wellington Rd, Mulgrave, 3170
  / / / /\ \    AUSTRALIA
  \ \/ / / /
   \  / / /     Phone   :  +61-3-560-7066 
    \/\/\/      FAX     :  +61-3-561-6709
                ACSnet  :  craigb@merlin.bhpmrl.oz
                Internet:  craigb%merlin.bhpmrl.oz@uunet.uu.net

--
                Craig Blundell

     /\/\       Image Processing & Data Analysis Group
    / / /\      BHP Melbourne Research Laboratories
   / / /  \     245 Wellington Rd, Mulgrave, 3170
  / / / /\ \    AUSTRALIA
  \ \/ / / /
   \  / / /     Phone   :  +61-3-560-7066 
    \/\/\/      FAX     :  +61-3-561-6709
                ACSnet  :  craigb@merlin.bhpmrl.oz
                Internet:  craigb%merlin.bhpmrl.oz@uunet.uu.net

m1pkd00@arccs3.FRB.GOV (Prasad K. Dharmasena) (10/18/90)

> Could someone please explain the differences between normal and 
> encapsulated PostScript ????

As far as I understand it, EPSF is the same postscript except that EPSF is
bounded to, at most, a single page.  Hence these bounded files can be imported
into other documents (i.e. graphic captions into a text document).  There is
a document describing EPSF available from adobe file server.

> and, are there programs available (and how can I get copies of
> them) for translating between the two types of PostScript code ???

If such a thing exists, I want it too.  So please post to the group.

-Prasad

aerts@media01.UUCP (Ad Aerts - Documentation Manager) (10/19/90)

For more information on the EPSF-format and many other Postscript topics,
try adobe's file server. Send a message with the text "help" in the
message body to ps-file-server@adobe.com.

BTW, most of the documents you can "get" there are "written" in postscript.


-- 
Ad Aerts                            (=====  Disclaimer:
Instruction and Documentation Dpt.  (=====  Who? Me? 
Mediasystemen, Netherlands          (=====  
e-mail: aerts@media01.UUCP          (=====  Don't give me an instruction 
        AERTS@HUTRUU52.BITNET       (=====  manual. I already got one. 

paulg@bhpmrl.oz.au (Paul Gallagher) (10/29/90)

Greetings from afar, Craig:

re: EPS/Postscript files.

Encapsulated postscript files actually contain the postscript commands
for printing device-resolution independant images, followed by a lo-res
PICT (bit-mapped) image for the purposes of previewing the final output.
Hence "encapsulated".

"Normal" postscript files only contain the code.

Regards,
Paul.

     /\/\       Paul Gallagher, PC Support Officer,
    / / /\      Computer Systems Group,
   / / /  \     BHP Melbourne Research Laboratories
  / / / /\ \    245 Wellington Rd Mulgrave Vic 3170 AUSTRALIA
  \ \/ / / /    Phone : +61-3-560-7066,  Fax : +61-3-561-6709
   \  / / /     ACSnet  :  paulg@bhpmrl.OZ.AU        
    \/\/\/

henry@angel.Eng.Sun.COM (Henry McGilton) (10/30/90)

In article <1661@merlin.bhpmrl.oz.au>, paulg@bhpmrl.oz.au (Paul Gallagher) writes:
    *  re: EPS/Postscript files.
    *  Encapsulated postscript files actually contain the
    *  postscript commands for printing device-resolution
    *  independant images,
True, but, . . .
    *  followed by a lo-res PICT (bit-mapped) image for the
    *  purposes of previewing the final output.
The preview section is optional.  It doesn't have to be there at all.
If it is there, it can be PICT, or TIFF, or, following the latest EPSF
specification, can be an all ASCII preview section.  Adobe Illustrator
is (was) a good example of an application that (used to) emit(s) perfectly
good Encapsulated PostScript without a preview section.
    *  Hence "encapsulated".
`Encapsulated' really means that the file of PostScript code
can be incorporated (as a `capsule') into the middle of another
file of PostScript code, and can be correctly positioned, scaled,
rotated, and so on.
    *  "Normal" postscript files only contain the code.
See the note on Adobe Illustrator above.

There are really very few criteria for what differentiates 
Encapsulated PostScript from `normal' PostScript:

    o   an Encapsulated PostScript file should be only one page.

    o   an Encapsulated PostScript file should contain bounding
	box information so as to enable the including application
	to correctly position and scale it on the final output page.

    o   there are other criteria such as being `well behaved', that
	are documented adequately in the Adobe specifications.

In other words, there's no real `magic' about Encapsulated PostScript.

	........  Henry

jef@well.sf.ca.us (Jef Poskanzer) (10/30/90)

In the referenced message, paulg@bhpmrl.oz.au (Paul Gallagher) wrote:
}Encapsulated postscript files actually contain the postscript commands
}for printing device-resolution independant images, followed by a lo-res
}PICT (bit-mapped) image for the purposes of previewing the final output.
}Hence "encapsulated".
}"Normal" postscript files only contain the code.

Not true, but a common misconception.  EPS *allows* such a bitmap
representation to be added (prepended or appended, in pretty much any
bitmap format), but does not require it.  All it really requires is the
identifying comment and the bounding box comment, and non-use of a
small set of PostScript operators.

Please get the EPS spec and read it yourself if you want to find out more.
---
Jef

  Jef Poskanzer  jef@well.sf.ca.us  {ucbvax, apple, hplabs}!well!jef
   "For my purpose holds...  To strive, to seek, to find, and not to
                   yield." -- Alfred, Lord Tennyson

paulg@bhpmrl.oz.au (Paul Gallagher) (10/30/90)

Thanx *ALOT* for the straightening-out ;->

Doug McDougal emailed me with pretty much the same story.

Needless to say, I've burnt the magazine that was the source of my
info.          

Paul.

(btw it was MacUser. Thats the last time I quote them!)  

zentner@ecn.purdue.edu (Michael Zentner) (11/02/90)

I've read some of the recent information on EPS posted here, and have not
seen this problem covered yet.  First, what's meant by EPSI, EPSF, ,ect...
These obviously are not the same thing (according to the programs I'm
trying to use to import them).  

Specifically, I'm trying to import an EPS file created with Sundraw into
Framemaker on the Sun system.  I think the Sundraw file is EPSF.  Framemaker
says they require EPSI, and does not recognise the file a graphics.

Another funny thing that happens that I can't explain:  I create the EPS file
with Sundraw and it exists on the system.  Then I try to look at it with
'more',
'od', 'view', etc...  After I look at it once, the file has a length of
0
and no longer contains any information.  Anybody know what's happening?

--
Mike Zentner
Purdue University, CMET Building       zentner@cn.ecn.purdue.edu
West Lafayette, IN 47907               {ihnp4,ucbvax}!pur-ee!zentner

henry@angel.Eng.Sun.COM (Henry McGilton) (11/02/90)

In article <1990Nov1.145512@ecn.purdue.edu>, zentner@ecn.purdue.edu (Michael Zentner) writes:

    *  I've read some of the recent information on EPS posted
    *  here, and have not seen this problem covered yet.  First,
    *  what's meant by EPSI, EPSF, ,ect...  These obviously are
    *  not the same thing (according to the programs I'm trying to
    *  use to import them).
EPS is Encapsulated PostScript.

EPSF is Encapsulated PostScript File.  From previous discussions,
Encapsulated PostScript files can contain an optional BINARY preview
section so that importing applications lacking a working PostScript
interpreter can display on the screen an approximation of what will
appear on the printing device when the entire page is printed.  The
optional preview section can be in PICT, TIFF, or Metafile.

The BINARY preview section creates a severe problem.  You cannot
easily view or edit this stuff with a regular text editor such as
VI.  `Why do you need to view or edit EPS files?' I hear you ask.  You
need to edit EPS files to fix the PostScript when it's broken for
some reason, as it so frequently is.  So, the EPSI specification is a
fairly recent addition to the preview capability.  EPSI is an all
ASCII readable preview section.  Such an EPS file is all ASCII and
readable and editable.

    *  Specifically, I'm trying to import an EPS file created
    *  with Sundraw into Framemaker on the Sun system.  I
    *  think the Sundraw file is EPSF.
The SunDraw file is EPSF that conforms to the EPSF 1.2 specification.
SunDraw EPSF files contain a binary header, PostScript, and a TIFF
preview section.
    *  Framemaker says they require EPSI, and does not
    *  recognise the file as graphics.
SunDraw's EPSF interchange method was impelemnted before there was 
a completely defined `official' EPSI specification.

    *  Another funny thing that happens that I can't explain:
    *  I create the EPS file with Sundraw and it exists on the
    *  system.  Then I try to look at it with 'more', 'od',
    *  'view', etc...  After I look at it once, the file has a
    *  length of 0 and no longer contains any information.
    *  Anybody know what's happening?
I say Bar Steward -- more tranquilisers please!!!

	........  Henry

jem@bii.COM (joe edward meier) (02/14/91)

  I have FrameMaker running on my SPARC and it is able
to import what they call "encapsulated postcript" graphic
files.  Could someone explain to me what is "encapsulated
postcript"?  
  I also want to know if anyone has a filter that can convert
hpgl files into encapsulated postcript files?  
  Please send responses directly to me at:
    jem@bii.bruker.com

  I will summarize them in a future posting.

Joe Meier

kurtk@ee.ualberta.ca (Kurt Klingbeil) (02/15/91)

What is necessary to convert postscript files normally on their way
to a printer into EPS files which can be loaded and manipulated further?

I haven't come across anything that explicitly defines the relationship
between PS and EPS.  Pagemaker's manual for example says that EPS is just
'well-behaved' PS i.e. no showpage's etc.  Pagemaker also says that its
EPS filter will rip out showpage's etc.  The result is no errors, but
no output either.

thx, kk