4
# FILE NAME pdf2images.sh
20
__SCRIPT_ROOT=$(dirname $(readlink -f $0))
21
source $__SCRIPT_ROOT/useful.inc.sh
24
echo "pdf2images.sh --- Convert a range of pdf pages into pngs."
26
echo " pdf2images.sh <file>.pdf <first page> <last page>"
30
function __sanity_check () {
31
# Check that we have the tools needed.
34
__silent which optipng
36
echo " Can't find tool \"optpng\" (Not required)."
40
if [[ $__SANITY == false ]]; then
42
echo "Please install the missing tools."
48
function __process () {
59
if [[ $__HAS_OPTIPNG == true ]]; then
60
optipng ${__FILE%%.*}*.png
64
function __parse_args () {
78
echo "Nummber of arguments missmatch."