[comp.lang.postscript] Encapsulated Postscript to Postscript

arcarese@andromeda.rutgers.edu.rutgers.edu (John C Arcarese) (10/11/88)

Question.  Is there a program which takes encapsulated postscript, &
spits out regular postscript?  I'm trying to dump some PageMaker stuff
to an lps-40, but the lps-40 doesn't like it.  Any help, anyone out 
there can offer me, would be very helpful.  Thanks,
						John A.
						

thomson@wasatch.UUCP (Rich Thomson) (10/11/88)

In article <897@galaxy> arcarese@andromeda.rutgers.edu.UUCP
    (John C Arcarese) writes:
>Question.  Is there a program which takes encapsulated postscript, &
>spits out regular postscript?

I'm new to the idea of PostScript, at least in terms of the details anyway.
What's the difference between encapsulated PostScript and regular PostScript?

							-- Rich
-- 
Rich Thomson	thomson@cs.utah.edu  {bellcore,hplabs}!utah-cs!thomson
"Tyranny, like hell, is not easily conquered; yet we have this consolation with
us, that the harder the conflict, the more glorious the triumph. What we obtain
too cheap, we esteem too lightly." Thomas Paine, _The Crisis_, Dec. 23rd, 1776

fp0a+@andrew.cmu.edu (F. Pierce, III) (10/11/88)

Encapsulated Postscript is a file protocol which contains both
postscript code to generate an image and a screen bitmap of the same
image.  The idea is that programs can generate EPSF files for other
programs to import; the importing program displays the bitmap on
screen and then prints the postscript portion of the EPSF to the
printer later on.  (An example is Adobe Illustrator, which can
generate EPS files. Aldus Pagemaker can import those files during page
composition.)

On a Mac, the screen bitmap is stored as a PICT resource in the EPSF
file.  To convert to text -- that is, to extract the "raw" postscript
-- just use ResEdit to delete the PICT resource and convert the file
type from "EPSF" to "TEXT."  Converting EPSF to postscript on a PC
may be a bit trickier; I'll let somebody else handle it.

Oh, an interesting note:  A postscript file that conforms to Adobe's
EPSF structuring conventions doesn't need a screen representation.  In
the EPSF standard supplement (I forget the full name), Adobe
highlights the fact that the PICT resource on a Mac is optional.
Obviously, without it the importing program won't be able to give a
screen representation of the EPSF, but normally this isn't that much
of a problem.  Pagemaker, for instance, just displays a grey box.  And
Adobe has decreed that importing programs must be able to recognize
TEXT-type files as EPSF provided they conform to the structuring
conventions.  So you don't need to change the file type to EPSF to
import postscript code.

The current EPSF structuring conventions are available via Adobe's
mail server.  To figure out how to access the server, send a message
containing the line "send help" to adobe!ps-file-server@decwrl.dec.com.

Hope this helps.

--Howdy Pierce
  Carnegie Mellon University

  fp0a+@andrew.cmu.edu

lupin3@ucscb.UCSC.EDU (-=/ Larry Hastings /=-) (10/11/88)

+-In article <EXIMn-J38k-0A6VVEc@andrew.cmu.edu>, fp0a+@andrew.cmu.edu (F. Pierce, III) wrote:-
+----------
|
| Encapsulated Postscript is a file protocol which contains both
| postscript code to generate an image and a screen bitmap of the same
| image.  The idea is that programs can generate EPSF files for other
| programs to import; the importing program displays the bitmap on
| screen and then prints the postscript portion of the EPSF to the
| printer later on.
|
+----------

  I thought the bitmap stuff was just gravy; as far as I was concerned EPS
was just a way to include one Postscript program within another, which was
generated by some automaton program (like a word processor).  In EPS, you
are constrained by a couple of things, most notably
 * you have to leave the stack just like you found it; no extra stuff, nothing
   taken away
 * you can't use certain commands (things to reset the printer, nasty stuff
   like that)
 * you have to have a %%BoundingBox: as one of the header lines in your program
   (defined in Green Book; basically the coordinates of the upper left and
   lower right corners of a box that will surround your image; note that you
   can LIE)

  The exact spec can be obtained FREE from Adobe with just a phone call; it'll
be mailed right out to you.  It's pretty neat stuff, Maynard.

--
 /|\ /|\   .. .  .   .    .     .      .       .        .         .          . 
| |\| |\|  .. .  .   .    .     .      .       .        .         .          .
|/|\|/|\|/||   _  _ _   _ |_| _  _ |_ -__  _  _ARPA: lupin3@ucscb.ucsc.EDU      
  | |/| |/|L_ (_\( ( (_/  | |(_\_) (_ || )(_)_)UUCP: *!ucbvax!ucscc!ucscb!lupin3
   \|/ \|/ larry      /   hastings        _/   WORK: sun!acad!metaware!funkster
  MetaWare "I'm hovering like a fly, waiting for the windshield on the freeway."
IncorporateDisclaimer:[MetaWare, UCSC]->opinion!=lhastings->opinion\\\Genesis

bobs@sco.COM (Bob Stayton) (10/12/88)

In article <897@galaxy> arcarese@andromeda.rutgers.edu.UUCP (John C Arcarese) writes:
>Question.  Is there a program which takes encapsulated postscript, &
>spits out regular postscript? 

An encapsulated postscript file is a page description 
without the "showpage" command. Add "showpage" to the
the end of the file and it should print.
Really. It's that easy. |)

bobs in docland
Bob Stayton
The Santa Cruz Operation, Inc.
uunet!sco!bob
**  My company doesn't speak for me and vice versa.

alexande@drivax.UUCP (Mark Alexander) (10/16/88)

In article <1482@scolex> bobs@sco.COM (Bob Stayton) writes:
>An encapsulated postscript file is a page description 
>without the "showpage" command.

This is not true, according to Adobe's EPSF spec.  An EPSF file can
have a showpage, just like any PS file.  But when you want to include
an EPSF file in your PS document, you redefine showpage to be a no-op
before the EPSF file, then undefine this bogus showpage afterwards. 

This is described clearly by Adobe, and it is exactly the approach
taken by Borland's Sprint text formatter when you include an EPSF file
using @eps().  (Sprint is actually a nice way to learn about
PostScript, in addition to being a neat Scribe-type formatter.)
-- 
Mark Alexander	(UUCP: amdahl!drivax!alexande)
"Bob-ism: the Faith that changes to meet YOUR needs." --Bob (as heard on PHC)

sbb@esquire.UUCP (Stephen B. Baumgarten) (10/18/88)

In article <EXIMn-J38k-0A6VVEc@andrew.cmu.edu> fp0a+@andrew.cmu.edu (F. Pierce, III) writes:
>On a Mac, the screen bitmap is stored as a PICT resource in the EPSF
>file.  To convert to text -- that is, to extract the "raw" postscript
>-- just use ResEdit to delete the PICT resource and convert the file
>type from "EPSF" to "TEXT." 

Just to clarify a little: all you have to do is change the file type
to TEXT.  Comm programs and WPs generally don't care about whether there's
a PICT in the resource fork, since the ASCII is in the data fork.

-- 
   Steve Baumgarten             | "New York... when civilization falls apart,
   Davis Polk & Wardwell        |  remember, we were way ahead of you."
   {uunet,cmcl2}!esquire!sbb    | 
   sbb%esquire@cmcl2.nyu.edu    |                           - David Letterman