多单位版国产化地质资料管理系统
zhai
2025-12-18 3c6f6c1e3016e38146a4c46be6e7b625c35591f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <meta name="viewport" charset="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文件浏览</title>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="static/plugins/json2.js"></script>
    <![endif]-->
    <style type="text/css">
        .viewer {
            width: 100%;
            border: 1px solid black;
            position: relative;
        }
    </style>
    <script>
        function OnPDFCtrlInit() {
            <c:if test="${downloadPermission}">
            pdfctrl.AddCustomToolButton("下载", "DownloadFile()", 5);
            </c:if>
            <c:if test="${printPermission}">
            pdfctrl.AddCustomToolButton("打印", "PrintFile()", 6);
            </c:if>
            pdfctrl.AddCustomToolButton("隐藏/显示书签", "SetBookmarks()", 0);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("实际大小", "SetPageReal()", 16);
            pdfctrl.AddCustomToolButton("适合页面", "SetPageFit()", 17);
            pdfctrl.AddCustomToolButton("适合宽度", "SetPageWidth()", 18);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("放大", "ZoomIn()", 14);
            pdfctrl.AddCustomToolButton("缩小", "ZoomOut()", 15);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("首页", "FirstPage()", 8);
            pdfctrl.AddCustomToolButton("上一页", "PreviousPage()", 9);
            pdfctrl.AddCustomToolButton("下一页", "NextPage()", 10);
            pdfctrl.AddCustomToolButton("尾页", "LastPage()", 11);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("向左旋转90度", "SetRotateLeft()", 12);
            pdfctrl.AddCustomToolButton("向右旋转90度", "SetRotateRight()", 13);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("全屏/还原", "SwitchFullScreen()", 4);
        }
 
        function DownloadFile(){
            pdfctrl.ShowDialog(2);
        }
 
        function SetBookmarks() {
            pdfctrl.BookmarksVisible = !pdfctrl.BookmarksVisible;
        }
 
        function PrintFile() {
            pdfctrl.ShowDialog(4);
        }
 
        function SwitchFullScreen() {
            pdfctrl.FullScreen = !pdfctrl.FullScreen;
        }
 
        function SetPageReal() {
            pdfctrl.SetPageFit(1);
        }
 
        function SetPageFit() {
            pdfctrl.SetPageFit(2);
        }
 
        function SetPageWidth() {
            pdfctrl.SetPageFit(3);
        }
 
        function ZoomIn() {
            pdfctrl.ZoomIn();
        }
 
        function ZoomOut() {
            pdfctrl.ZoomOut();
        }
 
        function FirstPage() {
            pdfctrl.GoToFirstPage();
        }
 
        function PreviousPage() {
            pdfctrl.GoToPreviousPage();
        }
 
        function NextPage() {
            pdfctrl.GoToNextPage();
        }
 
        function LastPage() {
            pdfctrl.GoToLastPage();
        }
 
        function SetRotateRight() {
            pdfctrl.RotateRight();
        }
 
        function SetRotateLeft() {
            pdfctrl.RotateLeft();
        }
    </script>
</head>
<body>
<div class="margin-lr">
    <input type="hidden"  id="attachUrl"/>
    <div style=" width:auto; height:800px;">
        ${pageoffice}
    </div>
</div>
</body>
</html>