home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / misc / 95 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  3.9 KB

  1. Path: sparky!uunet!olivea!sgigate!odin!news
  2. From: ib@ivan.asd.sgi.com (Ivan Bach)
  3. Newsgroups: comp.sys.sgi.misc
  4. Subject: Re: Tool to convert POSTSCRIPT to EPS
  5. Keywords: PostScript, Encapsulated PostScript, converting, tools
  6. Message-ID: <1992Dec24.213836.15252@odin.corp.sgi.com>
  7. Date: 24 Dec 92 21:38:36 GMT
  8. References: <Bzrv8w.Du1@ra.nrl.navy.mil>
  9. Sender: news@odin.corp.sgi.com (Net News)
  10. Organization: Silicon Graphics, Inc., Mountain View, CA
  11. Lines: 72
  12. Nntp-Posting-Host: ivan.asd.sgi.com
  13.  
  14. Articles about several tools for the conversion of PS to EPS files were
  15. posted to the newsgroup comp.lang.postscript.  For example, you can get a 
  16. compressed tar file called pub/ps2eps.tar.Z from duteela.et.tudelft.nl 
  17. (130.161.144.18) by anonymous ftp.  Use the bin file transfer mode.  
  18.  
  19. I'll send you a few scripts that can be used to convert a PS file to an EPS 
  20. or EPSI (Encapsulated PostScript Interchange) file. 
  21.  
  22. You should check whether the program which generated your PS files can
  23. generate EPS files.  Look for an EPS or EPSF option in the menu for 'Save As'
  24. or in the print dialog box.  If there is such an option and you have 
  25. original documents, use them to produce EPS files, instead of PS files.
  26.  
  27. You should read Appendix H.2 ("Guidelines for Creating EPS Files") on pp.
  28. 712-718 in the Adobe PostScript Language Reference Manual, Second Edition
  29. (ISBN 0-201-18127-4).  Appendix H in that book describes the Version 3.0 of
  30. the Encapsulated PostScript file format.  You can get descriptions of previous
  31. versions of EPS from the Adobe PS file server.  Send the e-mail message:
  32.  
  33.     Subject: help
  34.  
  35. to ps-file-server@adobe.com to find out how to use that server.
  36.  
  37. A PS file may describe images on more than one page.  Look for comment
  38. statements that start with %%Pages and %%Page, and the PostScript operator
  39. 'showpage.'  An EPS file should describe the appearance of a single page.
  40. You should produce an EPS file for each page specified in your PS file.
  41. If your PS file contains a prolog (look for %%EndProlog), then you should
  42. include that prolog at the beginning of each EPS file.
  43.  
  44. If the first line in your EPS file starts with %!, replace it with a DSC
  45. (Document Structuring Conventions) header comment statement such as:
  46.  
  47.     %!PS-Adobe-3.0 EPSF-3.0
  48.  
  49. If the first line does not start with %!, use a statement like the one shown
  50. above as the first line in your EPS file.  Remove those types of DSC
  51. statements which should not appear in a Version 3.0 EPS file (see the
  52. guidelines for creating EPS files).  If you are not sure which DSC statements
  53. should be removed, remove all lines that start with %%, and then put a DSC
  54. bounding-box header comment statement such as:
  55.  
  56.     %%BoundingBox: llx lly urx ury
  57.  
  58. after the line that starts with %!.  The entries llx and lly stand for the x
  59. and y coordinates of the lower-left corner of a bounding box for the image
  60. described by EPS code, while urx and ury stand for the x and y coordinates of
  61. the right-upper corner of that bounding box.  I posted an article about how
  62. to determine the coordinates of a bounding box of an EPS image (see also p.
  63. 713 in the PS Language Ref. Manual).  Since the coordinates of a bounding
  64. box are usually specified in points, the bounding-box statement should look
  65. something like:
  66.  
  67.     %%BoundingBox: 21 31 527 537
  68.  
  69. As explained on p. 714 of the PS Language Ref. Manual, some PostScript
  70. operators must not be used in an EPS file.  If your PS file contains such
  71. operators, you should eliminate them.
  72.  
  73. The two DSC statements shown above are the only DSC header statements required
  74. in an EPS file.  When you specify them, try to use the EPS file you created.
  75.  
  76. If you want to import an EPS file into a program, check whether the manual
  77. for that program specifies any restrictions for the importing of EPS files.
  78. For example, some programs accept only EPS files that start with:
  79.  
  80.     %!PS-Adobe-2.0 EPSF-1.2
  81.  
  82. You should look at some sample EPS files which can be imported into that
  83. program, and then use the same format for your EPS files.
  84.  
  85. Ivan Bach, ib@sgi.com
  86.