I want to write a Bash script to convert every .pdf file
in the current directory into a .png file.
For example:
$ls .
a.pdf b.pdf
$./pdf2png.sh
Converting pdfs to pngs
a.pdf -> a.png
b.pdf -> b.png
This is my best attempt:
#!/bin/bash
convert -verbose -density 500 -resize '800' a.pdf a.png
convert -verbose -density 500 -resize '800' b.pdf b.png