pydyf is a low-level PDF generator written in Python and based on PDF specification 1.7.