0

everyone: I have build a mobile based on emberJs,now have a new function like this:there is a hyper link in a view,it has a Base64 encoded pdf string,when I click the link,It will open a new window of device's default browser to show it.In ios it work fine,because the safari has a pdf component to open it,but in android it don't work because most of android device's browser don't have pdf component.Is there some solution to this ,your help will be very kind!

foolishfox
  • 167
  • 1
  • 2
  • 7

1 Answers1

0

You might want to use this project https://mozilla.github.io/pdf.js/, works on android just fine (I have just check it on android 6).

For example how to use it checkout: Pdf.js: rendering a pdf file using a base64 file source instead of url

Community
  • 1
  • 1
sielakos
  • 2,406
  • 11
  • 13