Hi Stefan,
To create the PDf file please go through the below link
https://docs.mendix.com/refguide/document-templates/