Created
July 20, 2018 03:39
-
-
Save digitalm/b0b6d6781d14ba5157a323c5fbb42929 to your computer and use it in GitHub Desktop.
ghostscript command sample
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
# get whole page size from sample.pdf | |
# 総ページ数を取得 | |
$ gs -q -dNODISPLAY -c '(sample.pdf) (r) file runpdfbegin pdfpagecount = quit' | |
# take perticular page from sample.pdf with sequential file name like printed_0001.pdf, printed_0002.pdf | |
# 特定範囲のページを取り出す | |
# 総ページ数でループすれば、分割にも応用可 | |
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dFirstPage=1 -dLastPage=1 -sOutputFile=printed_%04d.pdf sample.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment