Created
January 28, 2024 13:59
-
-
Save cynthiahqy/1c59b9de45ee008eafc1dea68309b2fc to your computer and use it in GitHub Desktop.
zsh script for extracting pages of a pdf as images into folder named by source pdf
This file contains hidden or 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
#!/bin/zsh | |
## grab filename without extension | |
filepath=$1 | |
filename=${filepath:r} | |
## extract pages as images | |
mkdir ${filename} | |
convert -quality 100 -density 200 ${filename}.pdf ${filename}/page-%02d.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment