Skip to content

Instantly share code, notes, and snippets.

@eruffaldi
Created August 26, 2018 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eruffaldi/251640c33143ce2a10906f09498832bb to your computer and use it in GitHub Desktop.
Save eruffaldi/251640c33143ce2a10906f09498832bb to your computer and use it in GitHub Desktop.
import os,sys
people = [x.split(" ") for x in """1 10 name""".split("\n")]
print (people)
for f,n,name in people:
f = int(f)
n = int(n)
print (f,f+n-1,name)
os.system("gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=%d -dLastPage=%d -sOutputFile=%s.pdf \"%s\"" % (f,f+n-1,name,sys.argv[1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment