Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Bash snippet - Extract pages from PDF (Ghostscript).
SUBMITTED BY:
DanielK
DATE:
Aug. 13, 2016, 3:02 p.m.
FORMAT:
Bash
SIZE:
299 Bytes
Raw
Download
Tweet
HITS:
895
Go to comments
Report
function
pdfpextr
()
{
if
[
$#
-gt
2
]
;
then
gs
-sDEVICE
=
pdfwrite
-dNOPAUSE
-dBATCH
-dSAFER
\
-dFirstPage
=
${
1
}
\
-dLastPage
=
${
2
}
\
-sOutputFile
=
"
${
3
%.pdf
}
_p
${
1
}
-p
${
2
}
.pdf"
\
"
${
3
}
"
else
echo
"
${
FUNCNAME
}
<first page> <last page> <input file>"
fi
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus