#!/bin/sh -e
#
# pdf2png - convert pdf to png
# dependencies: imagemagick (magick)

set -x

pdf=${1?missing pdf}
out_dir=${2:-${PWD}}

# magick -density 1400 -background black "${pdf}" "${out_dir}"/out-%02d.png
magick -background black "${pdf}" "${out_dir}"/out-%02d.png

{
  set +x
} 2>/dev/null
