return start_page, end_page
pages_to_add = []
opened_files = []
+new_page_num = 0
for i, input_file in enumerate(args.input_file):
file = open(input_file, 'rb')
opened_files += [file]
if args.page_range and len(args.page_range) > i:
range_string = args.page_range[i]
start_page, end_page = parse_page_range(range_string, reader.pages)
- new_page_num = 0
for old_page_num in range(start_page, end_page):
new_page_num += 1
- page = reader.pages[new_page_num]
+ page = reader.pages[old_page_num]
pages_to_add += [page]
- print("-i, -p: read in %s page number %d as new page %d" % (input_file, new_page_num+1, new_page_num))
+ print("-i, -p: read in %s page number %d as new page %d" % (input_file, old_page_num+1, new_page_num))
# rotate page canvas
if args.rotate: