PDF http://mozilla.github.io/pdf.js/ html
下载地址:http://mozilla.github.io/pdf.js/getting_started/#downloadgit
Stable (v2.0.943)稳定版github
下载解压web
build跨域
web服务器
而后配置咱们服务器上(注:本地会提示咱们)ui
直接访问scala
域名/web/viewer.html
而后配置咱们的页面 htm
<!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阅读了blog
遇到跨域,兼容等问题能够加群讨论!