Converting PS output to AI. Clarke Brunt. 12/1/94

Find %%BoundingBox: line (possibly by SEARCH, or by FLROPB?).
Note that any (atend) line will be found also.

Write out header bit i.e.

%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox:x y x y
%%TemplateBox:??? don't really know what to put here
%%EndComments
%%EndProlog

Skip input file through
%%EndComments
%%BeginProlog
%%EndProlog
until %%BeginSetup

Now search until %%EndSetup for
COLTAB n {r g b setrgbcolor} put (or other variants)

FNTDICT begin /F1 {
/Times-Roman findfont	(maybe other variants from FIND directive)
1.5 scalefont		(optional)
/Times-Roman-ReENC	(re-encoded name)
ISOLatin1Encoding	(or explicit vector)
ReENCODE		(re-encode it)
} def end

For the colours, convert to cmyk, and store as string e.g. Cn.
For the fonts, store the name as e.g. Fn.
The scaling is a problem. If we allow it here, then need to multiply
sizes in the z operator by it.

Skip %%Page, %%BeginPageSetup, ..., until %%EndPageSetup

Process until %%Page (multiple pages - only keep first), or %%Trailer.
Output %%Tailer and finish.

Processing step...

Read lines, find alphanumeric operator at end, or \ (string continuation).

Illegal operators:
AA, AC - arcs, could just skip them
IM0, IM1, IMB0, IMB1 - images, terminate in error if found

Pass through as is:
u, U - features
L, m, C - line, move, curve
d, w, j, J - dash, width, join, cap
s, S, F - (close), stroke, fill

Things needing processing:
n k, n K - colour. Output c m y k then k or K (or gray then g or G)
siz /Fn z - font. Output /name siz 0 0 0 z. Beware size as above.
ang x y e - text ang and pos. Output [mat] e. mat hard to compute.
(string)t - text. Output length (string)t T. Beware continuation lines.
