#!/bin/bash # /usr/local/bin/pdf2png # http://crystalfaeries.net/posix/bin/pdf2png # celeste:crystalfaery 2013-04-14 15:39:08+00:00 # Original: http://stackoverflow.com/questions/653380/converting-a-pdf-to-png 2013-04-14 15:39:08+00:00 while [ $# -gt 0 ]; do pdf=$1 echo -n "Converting $pdf ... " pngfile=`echo "$pdf" | sed 's/\.\w*$/.png/'` inkscape "$pdf" -z --export-dpi=600 --export-area-drawing --export-png="$pngfile" echo " to $pngfile" shift done