@ruck-plugins/pdf-tools 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/index-CMioyyeb.css +1 -0
- package/assets/index-van5Onr9.js +224 -0
- package/assets/pdf.worker-BgPpApnW.js +58353 -0
- package/index.html +13 -0
- package/logo.svg +36 -0
- package/package.json +25 -0
- package/plugin.json +75 -0
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>PDF 工具箱</title>
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-van5Onr9.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CMioyyeb.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/logo.svg
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<!-- Background Shape -->
|
|
3
|
+
<rect width="256" height="256" rx="60" fill="url(#paint0_linear)"/>
|
|
4
|
+
|
|
5
|
+
<!-- Shadow Gradient -->
|
|
6
|
+
<defs>
|
|
7
|
+
<linearGradient id="paint0_linear" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#FF5252"/>
|
|
9
|
+
<stop offset="1" stop-color="#C62828"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<filter id="shadow" x="0" y="0" width="256" height="256" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
12
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
13
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
14
|
+
<feOffset dy="4"/>
|
|
15
|
+
<feGaussianBlur stdDeviation="10"/>
|
|
16
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
17
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
18
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
19
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
20
|
+
</filter>
|
|
21
|
+
</defs>
|
|
22
|
+
|
|
23
|
+
<!-- Document Body -->
|
|
24
|
+
<path d="M70 50C70 44.4772 74.4772 40 80 40H145L186 81V206C186 211.523 181.523 216 176 216H80C74.4772 216 70 211.523 70 206V50Z" fill="white"/>
|
|
25
|
+
|
|
26
|
+
<!-- Folded Page Corner -->
|
|
27
|
+
<path d="M145 40V71C145 76.5228 149.477 81 155 81H186L145 40Z" fill="#FFCDD2"/>
|
|
28
|
+
|
|
29
|
+
<!-- "PDF" Text Styled as Shapes -->
|
|
30
|
+
<path d="M90 120H130V130H90V120Z" fill="#E53935"/>
|
|
31
|
+
<path d="M90 145H166V155H90V145Z" fill="#E53935"/>
|
|
32
|
+
<path d="M90 170H166V180H90V170Z" fill="#E53935"/>
|
|
33
|
+
|
|
34
|
+
<rect x="90" y="85" width="40" height="20" rx="4" fill="#E53935"/>
|
|
35
|
+
<text x="94" y="100" fill="white" style="font-family: Arial, sans-serif; font-weight: bold; font-size: 11px;">PDF</text>
|
|
36
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ruck-plugins/pdf-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "vite build",
|
|
8
|
+
"preview": "vite preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@pdf-lib/fontkit": "^1.1.1",
|
|
12
|
+
"file-saver": "^2.0.5",
|
|
13
|
+
"jszip": "^3.10.1",
|
|
14
|
+
"lodash-es": "^4.17.21",
|
|
15
|
+
"lucide-vue-next": "^0.344.0",
|
|
16
|
+
"pdf-lib": "^1.17.1",
|
|
17
|
+
"pdfjs-dist": "^3.11.174",
|
|
18
|
+
"vue": "^3.5.13"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
22
|
+
"less": "^4.2.0",
|
|
23
|
+
"vite": "^6.0.5"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/plugin.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ruck-plugins/pdf-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"displayName": "PDF 工具箱",
|
|
5
|
+
"pluginType": "ui",
|
|
6
|
+
"description": "本地离线 PDF 处理工具 (合并/拆分/水印/转换)",
|
|
7
|
+
"author": "JIAHE",
|
|
8
|
+
"logo": "logo.svg",
|
|
9
|
+
"entry": "index.html",
|
|
10
|
+
"features": [
|
|
11
|
+
{
|
|
12
|
+
"code": "pdf-merge",
|
|
13
|
+
"explain": "PDF 合并",
|
|
14
|
+
"cmds": [
|
|
15
|
+
"PDF合并",
|
|
16
|
+
"PDF Merge",
|
|
17
|
+
{
|
|
18
|
+
"type": "files",
|
|
19
|
+
"label": "PDF合并",
|
|
20
|
+
"fileType": "file",
|
|
21
|
+
"minLength": 2,
|
|
22
|
+
"extensions": ["pdf"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"code": "pdf-split",
|
|
28
|
+
"explain": "PDF 拆分",
|
|
29
|
+
"cmds": [
|
|
30
|
+
"PDF拆分",
|
|
31
|
+
"PDF Split",
|
|
32
|
+
{
|
|
33
|
+
"type": "files",
|
|
34
|
+
"label": "PDF拆分",
|
|
35
|
+
"fileType": "file",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 1,
|
|
38
|
+
"extensions": ["pdf"]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"code": "pdf-watermark",
|
|
44
|
+
"explain": "PDF 水印",
|
|
45
|
+
"cmds": [
|
|
46
|
+
"PDF水印",
|
|
47
|
+
"PDF Watermark",
|
|
48
|
+
{
|
|
49
|
+
"type": "files",
|
|
50
|
+
"label": "PDF水印",
|
|
51
|
+
"fileType": "file",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 1,
|
|
54
|
+
"extensions": ["pdf"]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"code": "pdf-to-image",
|
|
60
|
+
"explain": "PDF 转图片",
|
|
61
|
+
"cmds": [
|
|
62
|
+
"PDF转图片",
|
|
63
|
+
"PDF To Image",
|
|
64
|
+
{
|
|
65
|
+
"type": "files",
|
|
66
|
+
"label": "PDF转图片",
|
|
67
|
+
"fileType": "file",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"maxLength": 1,
|
|
70
|
+
"extensions": ["pdf"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|