from a past project we‘ve left a python PDF renderer - might be somehow useful or inspirational…
https://github.com/systori/bericht