PDF http://mozilla.github.io/pdf.js/
下载地址:http://mozilla.github.io/pdf.js/getting_started/#download
Stable (v2.0.943)稳定版
下载解压
build
web
然后配置我们服务器上(注:本地会提示我们)
直接访问
域名/web/viewer.html
然后配置我们的页面
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="UTF-8">
<title></title>
<style>
body , html{
background-color: #404040;
height: 100%;
padding: 0;
margin: 0;
}
</style>
<script>
self.location.href = '域名/web/viewer.html?file=http://xld.kaohewang.com/PDF地址.pdf';
</script>
</head>
<body>
</body>
</html>
直接显示就是我们的PDF阅读了
遇到跨域,兼容等问题可以加群讨论!