Search code examples
imagemagickimagemagick-convert

Convert PDF to PNG without output file extension using ImageMagick


It is simple to convert PDF file to PNG:

convert input.pdf -colorspace RGB -resize 800 output.png

However I have to skip extension in the file name, so I have tried with:

convert input.pdf -colorspace RGB -resize 800 output

but it generates me PDF file. How can I specify PDF type with convert argument ?

-type PNG

does not work.


Solution

  • Solution:

    convert input.pdf -colorspace RGB -resize 800 png:output
    

    This creates a PNG file named output.