Possible Duplicate:
How to change height and width of each page of a pdf
Is it possible to rescale a PDF file (retaining perspective) to be within a maximum width / height?
Rendering to an image and resizing is not an option – the output PDF must be vector graphic if the input was. (Otherwise this could be easily achieved with ImageMagick).
I have a bunch of files which are just slightly larger / smaller than A4 and I want to rescale them so that they are within the A4 bounds before applying a stamp to them (which assumes a fixed page size): Implementing a String -> PDF Stamp tool