ase64 data is sometime very useful and easy to convert into the file. In this post we'll see how we can
convert the base64 data into pdf using 3rd party library. In this we'll use viewport of given scale.
we'll use the render method to show the pdf using viewport in the given canvas.
Let's write the code:
Create a file with name base64.html and write the below codes:
After writing the above code, save the file and open this file into the browsser, and see the result.
In the result you can see the script code will be ran and the base64 will be converted into "Hello world" pdf as: