windows – Software to split large PDF file into multiple documents



You could do this with pdftk itself, rather than PDFTK Builder, and a short script, like the Python program below. (Both of pdftk and Python are free software and available for Windows.) Add and delete ranges to doc_page_ranges to specify how to split the input document. The settings given here put pages 1 through 3 in a file named output001.pdf, pages 4 and 5 in a file named output002.pdf, and pages 6 through 9 in a file named output003.pdf.

from subprocess import check_call

input_file = "input.pdf"
output_fmt = "output{:03d}.pdf"
doc_page_ranges = """
   1-3  4-5  6-9
   """

for i, page_range in enumerate(doc_page_ranges.split()):
    check_call(["pdftk", input_file, "cat", page_range, "output",
        output_fmt.format(i + 1)])



Source link

Related Posts

About The Author

Add Comment