Convert multipage PDF to a single image

前端 未结 2 934
情深已故
情深已故 2021-01-30 17:55

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
         


        
相关标签:
2条回答
  • 2021-01-30 17:57

    +append will put images side by side, i.e. horizontally instead of vertically (with -append)

    convert in.pdf +append out%d.png
    
    0 讨论(0)
  • 2021-01-30 18:22

    Finally I find THE solution:

    convert in.pdf -append out%d.png
    

    Thanks to this post.

    edit

    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

    0 讨论(0)
提交回复
热议问题