dukelow@cod.NOSC.MIL (Robert A. Dukelow) (02/12/88)
Several months ago I requested information on filters to convert HPGL plot files to PostScript. I got a number of responses which I greatly appreciate. A few were dead ends but the following proved useful to me. The first that I tried was 'glops' from Dave Feldman (david@dsl.cis.upenn.edu.arpa). I had to do some modification to get it to work on my plot files (primarily to get it to ignore HPGL commands that were not implemented and to be more forgiving of extra semicolons and white space that some plot packages put into the HPGL file). If you want something that you can port to any machine that has a C compiler and are willing to hack a little then this is probably a reasonable alternative. I was able to get it running on both a VAX under BSD 4.3 UNIX and Apollo Domain without too much hassle. There are a few things that don't come out quit right for me though and I don't have enough time to play with it. I got my copy of glops around November 2, 1987 and haven't checked to see if Dave has an improved version by now. The second program I tried (although I have to admit that I have used it less than glops) was 'hpgl2ps' for which the sources were posed to the net (in comp.sources.misc) on December 20, 1987. This came from Don McCormick at Applied Physics in Australia. This is again in C and I had only a little trouble getting it running on my Apollo. It works quite well for HPGL files where everything (including text) is made directly from vectors - but I did have some problems with scaling when text is involved. I have not tried to resolve any of the problems. This, again, could be a good starting point if you want source and are willing to hack a little. Don't know if it is still being worked on by Don. The alternative which has turned out best for me is a commercial program called PSPlot from: Legend Communications, Inc. 54 Rosedale Ave. Brampton, Ontario, Canada (416)450-1010 PSPlot cost about $150 (US) and (as far as I know) is available only for IBM-PC compatibles. I really haven't had it very long but it ran all of my test cases with no problems. The HP-GL conversion is really just one option of a program designed to edit PostScript files and communicate with the printer in various ways. I can't really comment on all of the other features since I have really only been interested in the conversion part. The nice thing about this package is that it provides lots of options for scaling and rotating the plot and you can easily translate pen colors into various combinations of gray scale, line style (combinations of dotted and dashed lines), and/or line width. I can't claim that I have exhastively tested the program - but it works flawlessly with all the HP-GL output I had available to test it on. If you can easily work in the PC environment then you might want to give this a try. If you don't have a PC it might be worth checking with them to see if they can support any other environments. Bob Dukelow dukelow@nosc.mil