mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-11 10:37:23 +00:00
调整项目模块,jodconverter-core重命名为office-plugin。jdocnverter-web重命名为server
This commit is contained in:
81
server/src/main/resources/web/officePicture.ftl
Normal file
81
server/src/main/resources/web/officePicture.ftl
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>PDF图片预览</title>
|
||||
<script src="js/lazyload.js"></script>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
body {
|
||||
background-color: #404040;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.img-area {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<#list imgurls as img>
|
||||
<div class="img-area">
|
||||
<img class="my-photo" alt="loading" data-src="${img}" src="images/loading.gif">
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if "false" == switchDisabled>
|
||||
<img src="images/pdf.svg" width="63" height="63" style="position: fixed; cursor: pointer; top: 40%; right: 48px; z-index: 999;" alt="使用PDF预览" title="使用PDF预览" onclick="changePreviewType('pdf')"/>
|
||||
</#if>
|
||||
<script src="js/watermark.js" type="text/javascript"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
/*初始化水印*/
|
||||
var watermarkTxt = '${watermarkTxt}';
|
||||
if (watermarkTxt !== '') {
|
||||
watermark.init({
|
||||
watermark_txt: '${watermarkTxt}',
|
||||
watermark_x: 0,
|
||||
watermark_y: 0,
|
||||
watermark_rows: 0,
|
||||
watermark_cols: 0,
|
||||
watermark_x_space: ${watermarkXSpace},
|
||||
watermark_y_space: ${watermarkYSpace},
|
||||
watermark_font: '${watermarkFont}',
|
||||
watermark_fontsize: '${watermarkFontsize}',
|
||||
watermark_color:'${watermarkColor}',
|
||||
watermark_alpha: ${watermarkAlpha},
|
||||
watermark_width: ${watermarkWidth},
|
||||
watermark_height: ${watermarkHeight},
|
||||
watermark_angle: ${watermarkAngle},
|
||||
});
|
||||
}
|
||||
checkImgs();
|
||||
};
|
||||
window.onscroll = throttle(checkImgs);
|
||||
function changePreviewType(previewType) {
|
||||
var url = window.location.href;
|
||||
if (url.indexOf("officePreviewType=image") !== -1) {
|
||||
url = url.replace("officePreviewType=image", "officePreviewType="+previewType);
|
||||
} else {
|
||||
url = url + "&officePreviewType="+previewType;
|
||||
}
|
||||
if ('allImages' === previewType) {
|
||||
window.open(url)
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user