添加pdfjs预览pdf文件

This commit is contained in:
liou
2017-12-27 18:45:48 +08:00
committed by klboke
parent 7b817cbcf6
commit 8e97395569
375 changed files with 32548 additions and 59 deletions

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
body{
margin: 0;
padding:0;
border:0;
}
</style>
</head>
<body>
<iframe src="${pdfUrl}" width="100%" frameborder="0"></iframe>
</body>
<script type="text/javascript">
document.getElementsByTagName('iframe')[0].height = document.documentElement.clientHeight-10;
/**
* 页面变化调整高度
*/
window.onresize = function(){
var fm = document.getElementsByTagName("iframe")[0];
fm.height = window.document.documentElement.clientHeight-10;
}
</script>
</html>