Friend, I suggest that you generate your Base64 content and put it on a Blob.
Then, you just need to use URL.createObjectUrl() and you have your pseudo-link ready to your blob.
URL.createObjectUrl()