The Community Commons module in the Marketplace has a Java Action called StoreURLToFileDocument that you can use to download a file from a URL and store it as a Mendix FileDocument.
https://docs.mendix.com/appstore/modules/community-commons-function-library/#33-files
I hope this helps.
Hello,
I believe you can use the Java action CommunityCommons.StringToFile and then generate PDF action and download the file using download file activity in a m/f
I found some more info in this post as well
https://forum.mendix.com/link/space/microflows/questions/99183
Hope this helps!