> This discussion makes me wonder what the 3000-line perl > script, grofpdf, can do that a trivial shell script that > calls groff and ps2pdf can't.
Embedding of PDF figures, I guess. Also, in a very general sense, things like generating an outline. This is potentially simpler because gropdf has access to the groff intermediate output, and supplying the required information could therefore be easier. In the Postscript case, this has to be passed through to ghostscript as device code (pdfmark), to be processed during the ps2pdf run. (Also, ghostscript has the habit of reprocessing images even in pdfwrite mode (instead of passing on compressed image data untouched), which is somewhat suboptimal.) Of course, the best solution would be for everybody to stop using PDF and start using Postscript instead.