-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsplit.html
More file actions
147 lines (128 loc) · 3.65 KB
/
split.html
File metadata and controls
147 lines (128 loc) · 3.65 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PDF分割工具</title>
<style>
body {
margin-top: 0;
}
nav {
display: flex;
justify-content: center;
}
nav-item {
padding: 4px 10px;
}
#result {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
border-radius: 4px;
}
#output {
border: 1px solid #ddd;
height: 200px;
overflow: auto;
padding-left: 4px;
border-radius: 4px;
color: #666;
font-size: 14px;
}
#output:empty:before {
content: '日志输出';
color: #999;
}
article {
width: 25%;
box-sizing: border-box;
padding: 5px;
border-radius: 4px;
}
article h2 {
margin: 0;
text-align: center;
}
article canvas {
width: 100%;
}
p {
margin: 0;
margin-bottom: 5px;
}
</style>
<style>
.drop-area {
height: 80px;
line-height: 80px;
border: 4px dashed #ccc;
color: #999;
background-color: #f1f1f1;
text-align: center;
font-size: 24px;
margin-bottom: 10px;
margin: 10 auto;
border-radius: 4px;
position: relative;
}
.drop-area.drag-over {
border-color: #3280fc;
background-color: #ebf2f9;
}
.drop-area.drag-over .btn-reset {
display: none;
}
.btn-reset {
background-color: transparent;
border: 0;
position: absolute;
top: 0;
right: 0;
color: #666;
cursor: pointer;
height: 30px;
line-height: 30px;
font-size: 14px;
}
.btn-reset:hover {
color: #3280fc;
}
.btn-reset svg {
width: 20px;
height: 20px;
display: inline-block;
vertical-align: top;
margin-top: 5px;
}
</style>
</head>
<body>
<nav>
<nav-item><a href="./merge.html">合并</a></nav-item>
<nav-item><a href="./split.html">拆分</a></nav-item>
</nav>
<div class="drop-area" id="drop-area">
PDF分割工具,请把PDF文件拖拽至此
<button class="btn-reset" id="btn-reset">
<svg>
<use xlink:href="#icon-reset"></use>
</svg> 点击重置
</button>
<label id="file-label" hidden><input type="file" id="file-picker" accept="application/pdf"></label>
</div>
<div id="output"></div>
<div id="result">
</div>
<svg hidden>
<symbol id="icon-reset" viewBox="0 0 1024 1024">
<path d="M808 602.9c-23.6 164.2-181.8 285.5-358.7 248.3C336.9 827.6 245.6 736.8 222 624.4c-40.3-192 92-361.8 290.4-361.8v99.2l248-148.8-248-148.8v99.2c-248 0-438 222.4-388.6 476.5 30.1 154.7 155 279.4 309.7 309.5C668 995 875.6 833.9 906.2 616.1c4.2-29.6-19.7-55.8-49.5-55.8h0.1c-24.7 0-45.3 18.2-48.8 42.6z" p-id="2267" fill="currentColor"></path>
</symbol>
</svg>
<script src="./js/pdfjs/build/pdf.js"></script>
<script src="./js/jspdf.umd.js"></script>
<script src="./js/split.js?v=1.4"></script>
</body>
</html>