Goal: build a command line script that would bates-stamp pdf files.
What libraries (preferably python for use across Windows / MacOS / Ubuntu) would form a good starting point?
Doing stuff like that in Python isn't supported very well. You might be able to do it with PyPDF. Here's a link to a script that has an example of sorts:
You might find the following useful as well: