Luca Davanzo Luca Davanzo - 1 year ago 85
Linux Question

Convert multipage PDF to a single image

I have to convert a multipage PDF document to a .png image.

I try with ImageMagick, but I cannot achieve final result:

convert document.pdf document.png


convert -adjoin document.pdf document.png

This command create N images .png (where N=num of page of document):


I need, if possible with a single command, to obtain a single image.

Answer Source

Finally I find THE solution:

convert in.pdf -append out%d.png

Thanks to this post.


As a plus, the opposite operation is:

convert *.png output.pdf

or if you have foo1.png, foo2.png..fooN.png

convert foo?.png output.pdf

Notice that does not work with foo01.png, foo02.png..foo0N.png

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download