Difficult PostScript issue

I have a huge collection of PostScript files that do not contain bbox, document size, or page size information. As a result, when converting to PDF using something like ps2pdf or Distiller I have to manually enter a page size. This doesn’t scale to thousands of documents unfortunately.

Is anyone aware of a Postscript to PDF converter that calculates the bbox and selects a paper size accordingly? I really, really don’t feel like writing a Postscript interpreter (unless one exists for Python already – PIL doesn’t support PS for reading).

Is it something where there’s a different paper size for each one, or will a set standard paper size work? If the latter it’s really simple to simply wrap each PS file in a standard page size without ever hacing to actually interpret the postscript. PS syntax is reasonably rigid. (At least I recall it being so from back when I had to hack PS output regularly; that’s been a while.)

Page sizes range from letter to A4 to big ass plotter sheets. The old PDF converter (which is flaky as hell and no longer supported) apparently would load the PS file and compute page size.

A guess, not an answer:

Copy the files to a machine running OS X and have applescript or automator print all your PS files to PDF. You’ll have the option of doing so with either Quartz or, if distiller is installed, that instead. Either way, going through the print dialog should mean OS X or distiller won’t ask you any silly questions, and if they do, your answer will become part of the applescript.

I recommend distiller and the Adobe PDF print driver, as you would use distiller to make a setting with an intended output size, and the print driver would obey it. You will have to select that particular distiller setting under “PDF options” in the print dialog.

I can basically do that right now using ps2pdf or distiller on my machine – the problem is that they default to a given page size (usually letter) instead of computing the proper page size based on the file’s contents.