This howto describes how you can build a script that generates a contact paper, a page containing multiple miniature photographs (originally created by exposing a photographic paper with dia negatives lying on top).
The example code shown here is using the bash interpreter.
The first part of the script use montage to create
the pages:
Now you have a script that generages images that contain the contact papers. If you want to put them in a PDF for printing, then continue.