diff options
author | Jake VanderVaate <jake.vandervaate@protonmail.com> | 2022-01-03 17:02:47 -0600 |
---|---|---|
committer | Jake VanderVaate <jake.vandervaate@protonmail.com> | 2022-01-03 17:02:47 -0600 |
commit | de49aece2cc6f05ec37c210acf0bfcaf547161e4 (patch) | |
tree | 1007f37a905f4aace0120cc112359e6c4077b4c4 /pdf2png.sh | |
parent | 1be2eee7a1b7238a382d19c6c84fc9eebe2c8aa4 (diff) |
removed PDF to image script
Diffstat (limited to 'pdf2png.sh')
-rwxr-xr-x | pdf2png.sh | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/pdf2png.sh b/pdf2png.sh deleted file mode 100755 index 5628bdb..0000000 --- a/pdf2png.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -#strip the file name off the input PDF -input_pdf="$1" -file_name="$(find """$1""" | sed 's|\.pdf||g')" -first_page="$2" -last_page="$3" - -if [ "$2" = "" ] -then - first_page="1" -else - : -fi - -if [ "$3" = "" ] -then - last_page="$first_page" -else - : -fi -#convert the PDF to a 600px wide PNG image -pdftoppm -f "$first_page" -l "$last_page" -png -scale-to-x 696 -scale-to-y -1 "$input_pdf" "$file_name" - -#add a 2x2px border to the image.png file -for file in *.png; do - convert "$file" -bordercolor black -border 2x2 "$file" - - #compress the image - optipng "$file"; -done |