George-Blackstar7
George-Blackstar7

Reputation: 103

PDF.JS with base64 data uri doesn't work on safari

I am using PDF JS demo app and I give a base64 pdf from the server to the viewer. This does work very good on chrome and mozilla(both desktop and mobile) but it doesn't work at all on Safari.

I think the issue is because of the XHR but I don't have that much experience so I can't say for sure.

What are my alternatives ?

Upvotes: 0

Views: 1567

Answers (2)

Tung Do
Tung Do

Reputation: 1533

atob does not work in my case, I used this to convert base64 to binary array Pdf.js: rendering a pdf file using a base64 file source instead of url

Upvotes: 0

George-Blackstar7
George-Blackstar7

Reputation: 103

I resolved this by converting the base64 to binary with atob.

Upvotes: 1

Related Questions