pdfimagemagick

ImageMagick convert pdf with multiple pages to high quality PNG


I am trying to convert a multi-page PDF to one long png with the following command:

convert -append -flatten -density 300 in.pdf out.png

I am using -flatten to lose transparency, since I want a white background in the final PNG. The problem is that it takes only the first page instead of using all the pages.

How can I convert the PDF to one long PNG while losing the transparency and using a white background?


Solution

  • This command works for me on IM 6.9.9.22 Q16 Mac OSX with Ghostscript 9.21

    convert -density 300 -colorspace sRGB itc101_13.pdf -alpha off -append out.png
    

    enter image description here

    If it does not work for you, then what is your ImageMagick version and what is your Ghostscript version.