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.
create pdf keeping resolution of pages
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: create pdf keeping resolution of pages
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