Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!adobe!orthlieb From: orthlieb@adobe.COM (Carl Orthlieb) Newsgroups: comp.lang.postscript Subject: Re: converting postscript to encapsulated postscript Message-ID: <14010@adobe.UUCP> Date: 12 Apr 91 17:49:28 GMT References: Reply-To: orthlieb@adobe.UUCP (Carl Orthlieb) Distribution: comp.lang.postscript Organization: Adobe Systems Incorporated, Mountain View Lines: 94 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 In Appendix I of the new red book, 'Guidelines for Specific Operators', there is a more in-depth discussion of these operators. --- CONVERTING PostScript TO EPSF --- There is a PostScript program available on our mail server called 'epsfinfo' that should do what you want. You tack it onto the head of your PS file and then send it down to the printer using SendPS or LaserTalk. You will then get back the bounding box and font usage info for your PS file. If you then change the top of your file to read: %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: %%DocumentFonts: ... you should then have an EPS file (w/o a preview). , , , and are the bounding box values sent back by the epsfinfo program (make sure that these are integer values). , , , etc. are the names of the fonts used by your file (e.g. Times-Roman). Note that there are some PS operators that should not be used in an EPS file. The epsfinfo program will notify you if your PS file uses these operators. See Appendix I of the new red book for more info. Hope this helps, Carl 8-) P.S. The file you want from the server is Programs/epsfinfo.ps ----------- Server Access Information ----------- 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). Carl 8-)