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!

大家:我已经构建了一个基于emberJs的移动设备,现在有了这样的新功能:视图中有一个超链接,它有一个Base64编码的pdf字符串,当我点击链接时,它会打开一个新的设备窗口默认浏览器显示它。在ios它工作正常,因为safari有一个pdf组件来打开它,但在android它不起作用,因为大多数Android设备的浏览器没有pdf组件。是否有一些解决方案,你的帮助会非常友善!

1 个解决方案

#1


1

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).

你可能想要使用这个项目https://mozilla.github.io/pdf.js/,在android上工作就好了(我刚刚在android 6上查看它)。

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

例如如何使用它checkout:Pdf.js:使用base64文件源而不是url呈现pdf文件

更多相关文章

  1. 在聚焦输入时,在iOS(和所有移动设备)上自定义滚动
  2. 日志与python日志组件logging
  3. python安装及写一个简单的验证码组件(配合node)
  4. 我如何在Linux和Python中监听“usb设备插入”事件?
  5. Linux网络设备驱动架構學習(三)
  6. Linux设备驱动剖析之Input(三)
  7. 对linux字符设备的理解(整体架构)
  8. 【原】第一个Linux设备驱动程序hello world!
  9. linux查看硬件信息及驱动设备相关整理

随机推荐

  1. sql*loader问题,我有几万条记录,为什么只
  2. sql2005指定字段插入空格。
  3. 请问图片存到MySQL服务器中的时候如何操
  4. mysql 全表扫描、全索引扫描、索引覆盖(
  5. docker应用-6(mysql+mycat 搭建数据库集群
  6. mysql数据库的主从同步过程详述
  7. mysql参数优化辅助工具之tuning-primer.s
  8. sql 存储过程参数为空则不作为条件
  9. Python3.6实现scrapy框架爬取数据并将数
  10. >的EF6 SQL生成。