I have a bunch of images and trying to convert them to pdf using the below command:
$ convert *.jpg -resize 1240x1753 \
-extent 1240x1753 -gravity center -background white \
-units PixelsPerInch -density 150x150 multipage.pdf
It makes a pdf of A4 size. But the images are not centered. They are movied to NorthWest side. How to ensure the images are centered (both side ways and up and down)