Reputation: 2689
I want to use the prebuilt viewer that comes with PDF.js, but I have a requirement that the PDF must be loaded from a base64 encoded payload and not a URL.
The viewer comes prebuilt with a default pdf or the URL of the desired PDF can be passed as a URL parameter. Neither of these options will work for me.
I can see from the docs that it is possible to create a PDF from base64 encoded data. How can I render this in the prebuilt viewer once it's created?
Upvotes: 0
Views: 162
Reputation: 2689
I found the answer in the FAQ, https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#can-i-specify-a-different-pdf-in-the-default-viewer
Upvotes: 0