Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 0 down vote accepted

Try to control the resolution through the density option. If your original scanned document was with a density of 300dpi you can use:

convert -set units PixelsPerInch *.png -density 300 -flip -page 2647x3745+50+50 doc.pdf
convert -set units PixelsPerInch  -density 300 doc.pdf -flip  -density 300 doc2.pdf

the downside is that it will increase the size.
You can obtain an equivalent output even with those 2 lines

convert *.png -flip -page 2647x3745+50+50 doc.b.pdf
convert -set units PixelsPerInch  -density 300 doc.b.pdf -flip doc2.b.pdf
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.