spinners
spinners

Reputation: 2689

How do I use a base64 encoded pdf with the prebuilt viewer from PDF.js?

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

Answers (1)

Related Questions