If you want to make one pdf-file that exist of multiple A4 pages with one each page a jpg-image.
Create a directory and drop all jpg images in that directory.
Launch this command in that directory
convert *.jpg -resize 575x823^> -bordercolor '#ddd' -border 5x5 -page A4 -background white -extent 595x842 "FILE NAME.pdf"