How can I include pdftk and gsprint with a distributable Python program?
I've written a short Python module that takes several source PDFs, rearranges pages, and then prints them into correctly-ordered, helpfully-stapled packets (I'd be grateful for any feedback on the module over on GitHub, too). This makes it a lot easier to print large numbers of these packets at once. I use pdftk and gsprint (via subprocess.call
) to wrangle and print the PDFs.
Now, I'd like to be able to distribute this to my colleagues at other study sites around the country. I'm making three assumptions about them:
- They are much less technically inclined than I am, so getting pdftk and gsprint installed and onto their system paths will probably be tough (assuming their local IT even permits such a thing);
- They are almost all using Windows.
- Users won't have Python installed (in reality some will, but who knows)
My ideal would be a single executable file that somehow has a Python interpreter, my module, pdftk, Ghostscript, and gsprint rolled up inside. Is that feasible, and if so, how? I've seen some tutorials on working with C and Java libraries, but it seems like I just don't have the vocabulary and conceptual knowledge to sort this out.