Thread:Project:Support desk/How to bulk create pages with PDF content/reply

Have a look at this script and pywikibot in general. It is at least a good place to start.