Created
July 18, 2017 03:05
-
-
Save niltonvasques/fc2ebd9ca6ac5503d4b0bfa54e9b2ab7 to your computer and use it in GitHub Desktop.
Split a pdf in individual pdf files
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
#!/bin/bash | |
PAGES=17 | |
PDF_FILE=full.pdf | |
for i in $(seq 1 $PAGES); do | |
gs -dBATCH -sOutputFile="page$i.pdf" -dFirstPage=$i -dLastPage=$i -sDEVICE=pdfwrite $PDF_FILE; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment