From 142705f3bc31c5b618419be80a3af40effbb6429 Mon Sep 17 00:00:00 2001 From: Jake VanderVaate Date: Tue, 21 Sep 2021 17:57:34 -0500 Subject: added resume template and screenshot shell script --- pdf2png.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 pdf2png.sh (limited to 'pdf2png.sh') diff --git a/pdf2png.sh b/pdf2png.sh new file mode 100755 index 0000000..37c30b8 --- /dev/null +++ b/pdf2png.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +#strip the file name off the input PDF +file="$(ls ""$1"" | sed 's|\.pdf||g')" + +#convert the PDF to a 600px wide PNG image +pdftoppm -singlefile -png -scale-to-x 696 -scale-to-y -1 "$1" "$file" + +#add a 2x2px border to the image.png file +convert "$file".png -bordercolor black -border 2x2 "$file".png + +#compress the image +optipng "$file".png -- cgit v1.2.1