添加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

@ -11,7 +11,12 @@
</style>
</head>
<body>
<iframe src="${pdfUrl}" width="100%" frameborder="0"></iframe>
<#if pdfUrl?contains("http://")>
<#assign finalUrl="${pdfUrl}">
<#else>
<#assign finalUrl="${baseUrl}${pdfUrl}">
</#if>
<iframe src="/pdfjs/web/viewer.html?file=${finalUrl}" width="100%" frameborder="0"></iframe>
</body>
<script type="text/javascript">
document.getElementsByTagName('iframe')[0].height = document.documentElement.clientHeight-10;