Most PDF libraries for Python can write a PDF. Far fewer can produce a file that a validator accepts as PDF/A-1b , and fewer still can put a digital signature on it without shelling out to a second tool. Here is the whole job in one script, using the LumasPDF SDK through its Python wheel. The binding is ctypes over a native engine, so there is nothing to compile. Disclosure: I'm the author of LumasPDF. Install pip install lumaspdf Wheels exist for W...