I'm trying to write a script that takes as its input one PDF file containing a header block, plus one multi-page PDF file containing black and white vector graphics plus a little text, and outputs another PDF file where each page in the output consists of the header block over (or under or next to) a grid of six cells, and each cell contains a reduced-size copy of one page from the multi-page input file (perhaps cropped a bit).
The closest I've gotten was using the "montage" command of ImageMagick. The problem I had was that ImageMagick rasterizes all its input before it does anything else, and so by the time I got up to even just four or five pages of output at the resolution I need, it was taking my workstation over a minute to do the work, and the resulting file was 130MB, which is a ridiculous waste of resources. And even then, the line drawings suffered from aliasing.
I've looked into Ghostscript, but it seems oriented toward experienced electronic typesetting professionals. There isn't even a book available to pay for--just a cryptic, 20-page whitepaper that seems intended for people who already know how to use Ghostscript. I'd rather not spend a week learning the finer points of GS9 Color Management and the LaTeX format only to find out that Ghostscript can't do what I'm looking for. So, am I at least on the right track? QPDF was too limited in its feature set and MuTool is meant for a different problem domain--unless I'm mistaken.
The platform is a Windows server. I couldn't say what the budget might be. This is an oddball project-let that's part of a much larger CAD/CAM integration project I'm doing. It's fairly low priority--or at least, it will be until the boss sees how much we're spending on paper ;-)