I want to create a bash script that can be executed from everywhere, that does this following:
It creates images from a pdf file using
pdftoppm:pdftoppm fileinput.pdf -png img -r 305.3
After all of the png images are there.
It crops the all of png images 10 1920x1080 using
mogrify:mogrify -crop 1920x1080+2+2 *.png
In short, I want to create a bash script that execute:
pdftoppm inputfile.pdf -png img -r 305.3 && mogrify -crop 1920x1080+2+2 *.png
It will be like:
./mybashscript inputfile.pdf
And after I run the script, the output png images will be already cropped to 1920x1080.
Note: I know I can set the dimension of the output images by changing the -r value in pdftoppm. But I do not want to change that due to a reason.