Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 605
hsz Avatar asked Oct 19 '25 19:10

hsz


1 Answers

Solution:

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

This creates a PNG file named output.

like image 52
hsz Avatar answered Oct 21 '25 16:10

hsz