Hi,
If you know its always going to be a pdf, then you can prepend the extension yourself. Once you convert your string to a document, in the same microflow use the change activity to append the pdf extension to the name. Then download the file.
Edit: Here is an example
https://modelshare.mendix.com/models/81fc51bd-cd52-46bb-82b8-ba4dea4d6266/change-file-name