> the JPG was really crap when rendered.
JPG has a quality setting, from nearly uncompressed to very small and totally jaggy.
JPG compression works really well for photographs, really bad for hard line art. Setting compression to nearly-none gives good results, and files smaller than BMP, but JPG is really overkill for 2-color line art.
GIF is perfect for this. It only supports 16/256 colors, but that is plenty. Its compression is very simplistic, but works great for big areas of the same color (and poorly for photographs with lots of detail). GIF is lossless (assuming you start with less than 256 colors).
Problem with GIF is that it is a CRT format, and translation to printer is uncertain. Some browsers render GIF as 72DPI on 300DPI printers by just printing each dot 4-wide/high. This gives 4% error from what you might expect: fine for web pages, bad if you need to fit a meter or switch. Smarter browsers and image programs may do more clever things, not always what you want.
PostScript not only has an unambiguous notion of dimension on the output device (printer), it can do all the calculations for you. Of course that assumes you have a PostScript printer, that it has no bugs, etc.
PDF, PostScript's child, "should" render exactly, but the darn Acrobat PDF renderer always wants to do things its own way.
Is it now impossible to walk into an art store and find small protractors and compasses?
> since it's a CGI script, you would have to run a local webserver also...
Most CGI apps can be run at the command line, redirecting output to a file. Oh wait: command lines are obsolete, aren't they?