Trying to use ImageMagick in a LaTeX script. I can convert any pdf file to PNG image using ImageMagic. This is what I came up with.
convert -density 300 -quality 90 input.pdf output.png
Is there any way to embed the above code convert -density 300 -quality 90 input.pdf output.png
in LaTeX script to convert pdf to an image?
input.pdf
without converting anything. If you want to convert many files and you are thinking of using LaTeX as a scripting language then this is possible but not really a good idea because other scripting languages are much more suited for such a task. So what exactly do you want to do?pdf
is superior to including it aspng
, as the pdf may contain scalable graphics which will allow for arbitrary resolution (e.g. when zooming in), whereas png files have a fixed resolution (and may become big if you chose a fine resolution).