I use the command
convert *.png -flip -page 2647x3745+50+50 doc.pdf
to produce a pdf from scanned images.
I put the option flip in because convert uses the lower-left corner instead of upper-left as reference point. Now I need to flip the pages again.
convert doc.pdf -flip doc2.pdf
Hovever, now the result is very poor resolution (unreadable). Ideally I would like to tell convert to use the upper-left corner instead. I tried -gravity NorthWest but that placed each image with the image upper-left corner in the middle of the page.