WEPStoPS 1.0 Instructions
Copyright (c) 1995 by Magus
================================

This file describes the Magus WEPStoPS utility.  This
utility converts Microsoft Windows Encapsulated PostScript 
(EPS) files into standard PostScript files.  The key 
difference between the two formats is that EPS files are 
intended to contain a single image, to be pasted into a 
larger document, while PostScript files are designed to 
contain any number of pages.  PostScript files denote the 
beginning of each page by the %%Page: comment, while EPS 
files lack any such indicator.  

An unfortunate design flaw in the Microsoft Windows 
printer interface makes it easy for a user to create an
EPS file, but difficult to create a PostScript file.  The 
result is that users often mistakenly write multi-page 
output to an EPS file.

Magus PageTurner, like other PostScript-processing programs, 
looks for the %%Page: comments in order to locate page 
boundaries.  In the absence of these comments, PageTurner 
renders the entire file at once, resulting in overlaid page 
images in the case that multiple pages are present but not 
properly demarcated.

The WEPStoPS utility reads in a Windows EPS file, and writes
the file out to a new destination with the %%Page: comments 
inserted in the proper location.  WEPStoPS is written in the
AWK programming language.  The file WEPStoPS.AWK contains 
the source code, while the file WEPStoPS.EXE is the 
executable version.  

The basic conversion functionality is provided by an AWK 
script named WEPSTOPS.AWK, and its compiled version
WEPSTOPS.EXE.  A batch file named EPSTOPS.CMD provides a 
slightly simpler invocation mechanism for the AWK program.

To convert the Windows EPS file INFILE.EPS to the PostScript
file OUTFILE.PS using the batch file, type

epstops INFILE.EPS OUTFILE.PS

To do the same thing using the compiled AWK program, type

wepstops outfile=OUTFILE.PS < INFILE.EPS

where "outfile" must be in lower case.

To do the conversion using the AWK interpreter, type
awk -f wepstops.awk outfile=OUTFILE.PS < INFILE.EPS

If the input file contains two or more complete PostScript 
jobs, they will be split into multiple files, one per job, 
each of which is converted to the properly paginated 
format.  In this case, the output files will be named 
OUTFILE.1 through OUTFILE.N, where N is the number of files 
produced.  Thus a file containing three complete PostScript 
files would have the paginated files written to OUTFILE.1, 
OUTFILE.2, and OUTFILE.3 for the above example.

All output files should be viewable with Magus PageTurner.

Note that WEPStoPS is designed only to convert Microsoft 
Windows EPS files to PostScript files.  It will not work 
with EPS files produced by other applications.  However, 
WEPStoPS is designed to leave unmodified those files which 
do not require conversion.

Please report all problems with WEPStoPS to the address 
given below.



WEPStoPS Distribution Policy
============================
This file (WEPStoPS.TXT), along with the accompanying AWK
script and executable program, may be distributed freely, as
long as the Magus copyright notices are preserved. 
The software may also be modified and distributed, as long 
as

1) The modifications and their author are clearly described
in the accompanying documentation and in comments in the awk
script.

2) The modified WEPStoPS.TXT file and the AWK script file
WEPStoPS.AWK are distributed together.  The executable 
program need not be recompiled and distributed if the 
programmer lacks the capability to do so.  

3) A copy of the modified software is provided to Magus, so 
that we may incorporate any improvements provided in the 
modifications.  All such modifications should be sent to the
address give below.


Kevin W. Thompson                          415-940-1109
President
thompson@magus.com                         415-940-1238 Fax

Magus * P.O. Box 390965 * Mountain View CA 94039-0965 * USA
