Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!ficc!cliff From: cliff@ficc.uu.net (cliff click) Newsgroups: comp.graphics Subject: Re: PostScript -> DVI or anything else Summary: PS->DVI Message-ID: <4079@ficc.uu.net> Date: 4 May 89 19:59:21 GMT References: <808@sunkisd.CS.Concordia.CA> <4054@ficc.uu.net> <170@marvin.moncam.co.uk> Organization: Ferranti International Controls Lines: 38 [ Long fruitless response because I hate Postscript, press 'n' quick! ] In article <170@marvin.moncam.co.uk>, paul@moncam.co.uk (Paul Hudson) writes: > In article <4054@ficc.uu.net>, cliff@ficc.uu.net (cliff click) writes: > > In article <808@sunkisd.CS.Concordia.CA>, kiron@db9.CS.Concordia.CA (Kiron Bondale) writes: > > >I have a PostScript file, that I would like to convert to DVI (or actually > > The only sure-fire way is to print the page, and read it with a scanner. > This is a bit pessimistic. Sure, one would have to write a PS > interpreter, but that's not too bad (I speak having done just that), I, too, have written a PS interpreter for a commercially available laser printer. What I found was that 90% of the PS producing applications wrote code that breaks 90% of the PS clones (5 or 6 PS clones we tested against our suite of application-produced PS code). The *interpreter* is fairly easy. Getting the font machinery, error handling, and special primitives (clippath, setscreen, settransfer, reversepath, etc) right is a nightmare. Note: the Redbook lies about the required behavior of several primitives, and is mum about much of the magic that goes on behind the scenes in the font machinery. How would you handle programs that remap the fonts? (It looks like: "100 100 moveto (a) show" but the page is rotated 90 degrees, and "a" in the current font produces "Company Foobar Logo" using a combo of Times-Roman and Times-Bold, and is actually printing a logo up the left margin. Further the BuildChar routines are recursively stacked 2 deep.) How about programs that roll their own fonts, and not using an ASCII ordering? At least one I know looks to see if he has downloaded that character in the font in his BuildChar routine, and if not he sends stuff back to the host which causes the host to send down a series of moveto/lineto commands to draw the missing character. In this case the page output is some complex interaction between the PS application and the host driver. *Bleah*. We also have a suite of programs that break (lockup and/or cold boot) the Apple Laserwriter. I wonder what would happen if we fed them to DisplayPostscript on NeXT or Sun? %-) -- Cliff Click, Software Contractor at Large Business: uunet.uu.net!ficc!cliff, cliff@ficc.uu.net, +1 713 274 5368 (w). Disclaimer: lost in the vortices of nilspace... +1 713 568 3460 (h).