Take a set of jpegs and convert them to an A5 book:
convert *.jpg \ -resize 874x1240 \ -gravity center \ -extent 874x1240 \ -units PixelsPerInch \ -density 150x150 \ output.pdf