惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Martin Fowler
Martin Fowler
I
InfoQ
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
B
Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
V
Visual Studio Blog

博客园 - PPBoy

状态机的轮子 oracle生成path的sql语句 oracle表空间异常大 springboot2集成activiti出错 策略模式2 策略模式1 sql从n月到m月数据汇总,没有数据,当月显示0 jsp下拉列表 dao层取值用List<map<String,Object>>接收有序map springboot打jar包,调用webservice出错 导出到word ueditor后台配置项返回格式出错,上传功能将不能正常使用 js控制多层单选,多选按钮,做隐藏操作 js控制全屏及退出全屏 springboot2.0jar包启动异常 第九篇: 高可用的服务注册中心 第八篇: 服务链路追踪(Spring Cloud Sleuth) 第七篇: 消息总线(Spring Cloud Bus) 第六篇: 分布式配置中心(Spring Cloud Config)
在线预览pdf
PPBoy · 2019-04-02 · via 博客园 - PPBoy

项目中需要在线预览pdf,主流的新浏览器都OK

唯独ie,该死的ie

资料中有jquery.media.js,试了试也是不支持ie的。

后来找到pdf.js可以

http://mozilla.github.io/pdf.js/web/viewer.html

下载包,放入tomcat,可以运行,效果良好

在源码中的viewer.js可以写入pdf文件地址。

var defaultOptions = {
  cursorToolOnLoad: {
    value: 0,
    kind: OptionKind.VIEWER
  },
  defaultUrl: {
    value: pdf_default_url,
    kind: OptionKind.VIEWER
  }

在这里修改defaultUrl为 pdf_default_url

再将viewer.html文件后缀名改为jsp。

传值pdf_default_url到viewer.js中。

搞定。

下载地址:

http://mozilla.github.io/pdf.js/getting_started/#download

https://download.csdn.net/download/snowwolf9999/11082750