Hey!

If you change the "-sOutputFile` parameter you pass into gswin64c.

For example, something like:

    output_directory = os.path.join(os.path.dirname(input_src), "out")

And then you should be able to modify the call to `os.system` to something like:

    os.system(
        "gswin64c -q -dBATCH -dNOPAUSE"
        "-sOutputFile={output_directory}/page{page:04d}.pdf"
        " -dFirstPage={page} -dLastPage={page}"
        " -sDEVICE=pdfwrite {input_pdf}"
        .format(
            page=i,
            input_pdf=input_pdf,
            output_directory=output_directory
        )
    )
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to