Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I'm fairly new to this so apologies up front.
I want to make a multi-page pdf (8.5"x11"-letter) contact sheet based on the contents of a folder using a batch file. So far so good. Where I run into trouble is: I want margins around the outside of the content so that it prints correctly on a printer (also so it looks nicer). I feel like I'm very close with the code below but all my content is left and bottom aligned (all the margin winds up above and to the left). I'v tried a couple of things like adding "+50" to my page tag, but my labels start to lose alignment and get cropped. I tried gravity and that broke it so that nothing showed up. I read elsewhere someone solved this problem by running the resultant pdf through montage again to add the margin, but I can't get that to work (I get an error message).
Resize your images small enough that you leave room for the margins, via your -geometry setting. Then do the montage. Then add a white border around the outside with enough thickness in pixels to produce 1 inch of margin. Your density is 150 dpi so for one inch, the -border value would be 150. Therefore you need to reduce the pixel dimensions of your images by that much divided by the number of tiles in X and similarly in Y.
Alternately, you can do what you have, then resize the montage smaller to allow for the one inch all around and the add the white border. However, that would do an extra resize that would cause some small extra blurring of your images. So the first way is best.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
Hi fmw42,
Thanks for your response.
I had read the before posting but was in a rush when I posted and forgot to add my version info:
ImageMagick 6.9.0-1 Q16 x64 2014-12-22
I think I'm not clear on what your recommending. I added "-border 150" to my above script and this is what I got: https://imgur.com/PKLZC8K
here is what I had before: https://imgur.com/a/MMvapqD
and here is what I want (roughly): https://imgur.com/odjzURy
are you suggesting a 2nd command to apply the border or is this contained in the same montage command?
Thanks again for your help
That is what I told you how to do earlier. Make each tile smaller via -geometry, then pipe the output from montage to convert - -bordercolor white -border 150.