Page 1 of 1

create pdf keeping resolution of pages

Posted: 2015-09-24T01:59:24-07:00
by iusr
I am struggling creating PDFs from scanned pages that have a fixed DPI but different sizes due to editing.

convert page*.png -density 300 -units pixelsperinch -page A4 out.pdf

creates a pdf, but all individual pages are scaled to fill the page. What I am trying to achieve is to have the original resolution preserved, i.e. if a png has a smaller size there should be empty space around it in the resulting pdf.

Re: create pdf keeping resolution of pages

Posted: 2015-09-24T10:12:53-07:00
by fmw42
try using -gravity center -background white -extent WxH rather than -page A4. Specify WxH as desired for your output image. But if your images are larger, then -extent will crop