For Images, you can create a document template (in Mendix) with an image object in it and use microflow actions to generate that file as a PDF.
Actually, you can do that for your files too, however, you'll need to use some community commons Java actions to get the contents from those files. If they are heavily formatted, this method might not be the best approach. Perhaps some others in the community can chime in.
Here is an example of a document generation microflow:
If you are in Mendix 7, you could also accomplish this by using a REST service like this: https://www.easypdfcloud.com/developer/pdf-rest-api-reference I have never used this service, and I am sure that it is a paid service, but I thought I would mention this.