Answer the question
In order to leave comments, you need to log in
How to decode base64 pdf file to pdf file and output to separate page?
The server returns a base64 encoded pdf file to the client.
how to decode base64 file to pdf file and output to separate page?
Answer the question
In order to leave comments, you need to log in
You have bytes in base64, right? so.
You decode, you get the file itself through new Blob() (for info in mdn or another dock)
You draw a link in the house, file the download attribute there - everything downloads fine, logically - you can give the PDF to the browser and it will view it, open it in a new tab. You can play with iframes. Dig in this direction. I did something similar recently, but in IE11 and below it didn’t want to work at all, I made it so that the browser directly receives a link to bytes from octet-stream and starts downloading itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question