-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
87 lines (80 loc) · 2.97 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#121212">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("sw.js").then((registration) => {
console.log("Service Worker registered with scope:", registration.scope);
}).catch((error) => {
console.error("Service Worker registration failed:", error);
});
}
</script>
<title>PDF Watermarker</title>
</head>
<body>
<div class="container">
<h1>PDF Watermarker</h1>
<p style="color:#af4c4c;" > v1.3.79 </p>
<p>
Select a PDF and a logo image to process your PDF:
</p>
<div class="file-selector">
<label for="pdfFile">Choose PDF File</label>
<input type="file" id="pdfFile" accept="application/pdf">
<div class="file-name" id="pdfFileName">
No file chosen
</div>
</div>
<div class="file-selector">
<label for="logoFile">Choose Logo File</label>
<input type="file" id="logoFile" accept="image/*">
<div class="file-name" id="logoFileName">
No file chosen
</div>
</div>
<button id="processBtn" onclick="processPDF()">Process PDF</button>
<button id="aboutMeBtn">About Me</button>
<div id="log"></div>
<!-- Watermark Only Checkbox -->
<label class="switch" style="margin:10px 15px 0px 15px ">
<input type="checkbox" id="watermarkOnly" checked>
<span class="slider"></span>
</label>
<br />
<b> watermarkOnly</b>
<p id="status"></p>
<a id="downloadLink" style="display:none;" download="processed.pdf">Download Processed PDF</a>
</div>
<div id="aboutMeModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2>About Me</h2>
<p>
Hello! I'm <a style="color:#af4c4c;" href="https://github.com/BR1JM0H4N/pdf-marker-pro">BR1JM0H4N</a> the creator of this PDF Watermarker App. This tool allows you to easily add watermarks to PDFs and flatten the document for secure sharing. Thank you for using this application! <a style="color:#af4c4c;" href="mailto:brijmohan2976@gmail.com?subject=Your%20Subject&body=Your%20message%20here">Send Email</a>
</p>
</div>
</div>
<script type="text/javascript" charset="utf-8">
// switch functionality
document.getElementById('watermarkOnly').addEventListener('change', function() {
if (this.checked) {
logMessage("Watermark only Mode activated");
} else {
logMessage("************\n⚠️WARRING⚠️ \nWatermark only Mode deactivated this will reduce the pdf Quality and increase the file size and need more processing but make it impossible to remove watermark\n***************");
}
});
</script>
<script src="pdf-lib.min.js"></script>
<script src="pdf.min.js"></script>
<script src="index.js"></script>
</body>
</html>