Created
March 14, 2020 12:33
-
-
Save macleginn/ebbf800af9e808ee680ac568e4685b7b to your computer and use it in GitHub Desktop.
A bash/zsh function to easily extract pages from .pdf files using qpdf
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
# params: | |
# $1 input-file path, | |
# $2 page range (e.g., "1-1", "10-39", "5,9-12"), | |
# $3 output-file path | |
# ex.: pages_from_pdf input.pdf "1,3,8-9" test.pdf | |
# qpdf should be installed | |
function pages_from_pdf() { | |
qpdf $1 --pages $1 $2 -- $3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment