move pdf-generation to create/update