Last active
February 26, 2021 18:25
-
-
Save pakoito/47f3f007c748603ad498bf130759f8bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pdfx() { | |
name=$(basename $3 .pdf) | |
for i in {0..$(expr $(vipsheader -f pdf-n_pages $3) - 1)}; do | |
noglob vips copy $3[dpi=$1,page=$i] $(realpath $2)/$name-$(expr $i + 1)@$1.jpg; | |
done | |
} | |
# cmd dpi outdir infile | |
# pdfx 300 ./out mypdf.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment