0

I'm wondering how I can update the following command to centre the resulting montage in a US Letter sized pdf.

montage -density 300 -tile 3x3 -geometry +20+20 *.png output.pdf
binarymelon
  • 904
  • 2
  • 12
  • 26
  • 1
    Page size is only relevant when printing. It depends upon the density you assign and the pixel dimensions of the raster image before enclosing it in a vector shell. Letter size is 8.5 x 11 inches. So you need to create a raster image of size that when multiplied by your density has these dimensions. You should test with a png image to get your montage size in pixels, then assign an appropriate density so that it will print at the desired letter size in inches. The pixel size will depend upon how big your input png images are when montage together. You can resize if you want to use 300 dpi. – fmw42 Sep 23 '17 at 02:51
  • EDIT: pixel dimensions/density = page size in inches – fmw42 Sep 23 '17 at 02:58
  • My original issues were trying to use -page Letter or -size 2550x3300. It looks like -page 2550x3300 did the trick. However I'm noticing some odd behaviour with -gravity center. It's placing the montage sort of north east on the page (with the top right corner of the montage outside the frame). – binarymelon Sep 25 '17 at 13:26
  • Have you tried to add -gravity center? – fmw42 Sep 25 '17 at 17:11

0 Answers0