-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
368 lines (349 loc) · 19.6 KB
/
index.html
File metadata and controls
368 lines (349 loc) · 19.6 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PDF Protect - Add a Watermark to PDF</title>
<meta name="description" content="Add a watermark to your PDF in your browser. No accounts, no file retention, totally local and secure. GDPR compliant by design.">
<link rel="stylesheet" href="/styles.css?v=1.1.0" />
<meta property="og:url" content="https://pdfprotect.io">
<meta property="og:type" content="website">
<meta property="og:title" content="PDF Protect - Add a Watermark to PDF">
<meta property="og:description" content="Add a watermark to your PDF in your browser. No accounts, no file retention, totally local and secure. GDPR compliant by design.">
<meta property="og:image" content="https://pdfprotect.io/ogimage.png">
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="pdfprotect.io">
<meta property="twitter:url" content="https://pdfprotect.io">
<meta name="twitter:title" content="PDF Protect - Add a Watermark to PDF">
<meta name="twitter:description" content="Add a watermark to your PDF in your browser. No accounts, no file retention, totally local and secure. GDPR compliant by design.">
<meta name="twitter:image" content="https://pdfprotect.io/ogimage.png">
<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="manifest" href="/site.webmanifest">
</head>
<body>
<div class="app">
<header class="app-header">
<div class="app-header-inner">
<div class="brand">
<span class="brand-mark" aria-hidden="true">
<svg class="brand-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
<rect width="256" height="256" fill="none" />
<polyline points="216 152 184 152 184 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<line x1="208" y1="184" x2="184" y2="184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,192H64a20,20,0,0,0,0-40H48v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M112,152v56h16a28,28,0,0,0,0-56Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
</svg>
</span>
<span class="brand-name">PDF Protect</span>
</div>
</div>
</header>
<main class="app-main">
<section class="hero-stage" id="heroStage">
<div class="hero-card">
<div class="hero-header">
<h1>Watermark PDFs in your browser</h1>
<p class="hero-subtitle">
Upload your document, customize the watermark, and keep every step on your device.
</p>
</div>
<div
class="dropzone"
id="dropzone"
role="button"
tabindex="0"
aria-label="Upload PDF"
>
<div class="dropzone-default" id="dropzoneDefault">
<span class="dropzone-icon" aria-hidden="true">
<svg class="dropzone-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
<rect width="256" height="256" fill="none" />
<polyline points="216 152 184 152 184 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<line x1="208" y1="184" x2="184" y2="184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,192H64a20,20,0,0,0,0-40H48v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M112,152v56h16a28,28,0,0,0,0-56Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
</svg>
</span>
<span class="dropzone-text">Drag & drop your PDF</span>
<span class="dropzone-subtext">or click to browse</span>
<span class="dropzone-hint">Max file size: 50 MB</span>
</div>
<div class="dropzone-preview" id="dropzonePreview" aria-live="polite">
<div class="dropzone-preview-icon" aria-hidden="true">
<svg class="dropzone-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
<rect width="256" height="256" fill="none" />
<polyline points="216 152 184 152 184 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<line x1="208" y1="184" x2="184" y2="184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,192H64a20,20,0,0,0,0-40H48v56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M112,152v56h16a28,28,0,0,0,0-56Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<path d="M48,112V40a8,8,0,0,1,8-8h96l56,56v24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
<polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
</svg>
</div>
<div class="dropzone-preview-copy">
<span class="dropzone-preview-name" id="dropzonePreviewName">—</span>
<span class="dropzone-preview-meta" id="dropzonePreviewMeta">Upload a PDF to begin</span>
</div>
</div>
</div>
<button class="button button-primary hero-action" id="heroContinueButton" disabled>
Open editor
</button>
<ul class="trust-points">
<li class="trust-point">
<span class="trust-icon" aria-hidden="true">✓</span>
<span>Processing stays on your device</span>
</li>
<li class="trust-point">
<span class="trust-icon" aria-hidden="true">✓</span>
<span>GDPR compliant by design</span>
</li>
<li class="trust-point">
<span class="trust-icon" aria-hidden="true">✓</span>
<span>No accounts or file retention</span>
</li>
</ul>
</div>
<input type="file" id="fileInput" class="hidden" accept="application/pdf" />
</section>
<section class="workspace-wrapper hidden" id="workspaceWrapper">
<div class="workspace" id="workspace">
<div class="workspace-header">
<div class="stepper" aria-label="Watermark workflow">
<div class="step" data-step="upload">
<span class="step-index">1</span>
<span class="step-label">Upload PDF</span>
</div>
<div class="step" data-step="customize">
<span class="step-index">2</span>
<span class="step-label">Customize watermark</span>
</div>
<div class="step" data-step="preview">
<span class="step-index">3</span>
<span class="step-label">Preview & download</span>
</div>
</div>
<p class="workspace-tip" id="workspaceTip">
Adjust your watermark text, color, and placement.
</p>
</div>
<div class="workspace-body">
<section class="controls-column">
<div class="panel-stack">
<article class="panel file-panel">
<header class="panel-header">
<p class="panel-heading-text">Current PDF</p>
<button class="button button-text" id="resetButton" title="Remove file">
Change PDF
</button>
</header>
<div class="panel-body upload-summary" id="uploadSummary">
<p class="summary-value" id="summaryFileName">—</p>
<div class="file-chips">
<span class="file-chip" id="summaryPageCount">—</span>
<span class="file-chip" id="summaryFileSize">—</span>
</div>
</div>
</article>
<article class="panel settings-panel">
<div class="panel-body settings-body">
<div class="control-section">
<header class="subheader">
<p class="subheader-title">Watermark text</p>
<span class="subheader-meta" id="textCharCount">0 / 140</span>
</header>
<label class="form-field">
<textarea
id="textInput"
rows="4"
maxlength="140"
placeholder="Enter watermark text"
></textarea>
</label>
<div class="toggle-row">
<div class="toggle-copy">
<span class="toggle-title">Repeat watermark across page</span>
<span class="toggle-subtitle">Fill the page with repeated text</span>
</div>
<label class="toggle-switch">
<input type="checkbox" id="tileToggle" />
<span class="toggle-track"></span>
</label>
</div>
</div>
<div class="cluster">
<header class="subheader">
<p class="subheader-title">Style</p>
</header>
<div class="form-grid style-grid">
<div class="style-font-group">
<label class="form-field style-font-field">
<span class="field-label">Font</span>
<select id="fontSelect">
<option value="Helvetica">Helvetica</option>
<option value="TimesRoman">Times New Roman</option>
<option value="Courier">Courier</option>
</select>
</label>
<label class="form-field font-size-field style-font-size-field">
<span class="field-label">Size</span>
<input type="number" id="fontSizeInput" min="16" value="35" />
</label>
</div>
<label class="form-field color-field style-color-field">
<div class="color-input">
<input type="color" id="colorInput" value="#BF0000" />
</div>
</label>
</div>
<label class="form-field slider-field slider-field-stacked">
<span class="field-label">Opacity</span>
<div class="slider-control">
<input type="range" id="opacityInput" min="5" max="100" value="35" />
<span class="slider-value" id="opacityValue">35%</span>
</div>
</label>
</div>
<details class="settings-advanced">
<summary>Advanced placement & tiling</summary>
<div class="cluster">
<label class="form-field">
<span>Page range (e.g. 1-3,5)</span>
<input
type="text"
id="pageRangeInput"
placeholder="All pages"
autocomplete="off"
/>
</label>
<label class="form-field">
<span>Rotation (°)</span>
<input type="number" id="rotationInput" value="45" />
</label>
<fieldset class="offset-fieldset">
<legend class="field-label">Offsets (pt)</legend>
<div class="offset-inputs">
<label class="form-field offset-input">
<span class="offset-axis">X</span>
<input type="number" id="offsetXInput" value="0" />
</label>
<label class="form-field offset-input">
<span class="offset-axis">Y</span>
<input type="number" id="offsetYInput" value="0" />
</label>
</div>
</fieldset>
<div class="form-grid form-grid-balanced tile-options hidden" id="tileOptions">
<label class="form-field">
<span>Tile X Gap (pt)</span>
<input type="number" id="tileXGapInput" value="200" />
</label>
<label class="form-field">
<span>Tile Y Gap (pt)</span>
<input type="number" id="tileYGapInput" value="200" />
</label>
</div>
</div>
</details>
</div>
</article>
</div>
</section>
<section class="preview-column">
<div class="preview-shell">
<div class="preview-toolbar">
<div class="zoom-controls">
<button class="button button-icon" id="zoomOutButton" title="Zoom out">−</button>
<span id="zoomLabel">100%</span>
<button class="button button-icon" id="zoomInButton" title="Zoom in">+</button>
<button class="button button-text" id="fitButton">Fit to width</button>
</div>
<div class="preview-actions">
<button class="button button-secondary" id="previewButton" disabled>
Preview watermark
</button>
<button class="button button-primary" id="downloadButton" disabled>
Download watermarked PDF
</button>
</div>
</div>
<div class="preview-frame" id="previewFrame">
<div class="preview-empty" id="previewEmptyState">
<p>Add your watermark settings, then preview to see the result.</p>
</div>
</div>
<div class="page-nav hidden" id="pageNav">
<button class="button button-icon" id="prevPageButton" title="Previous page">
◀
</button>
<span id="pageIndicator">Page 1 / 1</span>
<button class="button button-icon" id="nextPageButton" title="Next page">
▶
</button>
</div>
</div>
</section>
</div>
</section>
</main>
<section class="faq-section">
<div class="faq-container">
<h2 class="faq-title">Frequently Asked Questions</h2>
<div class="faq-list">
<details class="faq-item">
<summary class="faq-question">Is it really safe to use this tool?</summary>
<div class="faq-answer">
<p>Yes, it's completely safe. All processing is done locally in your browser. Your PDF files never leave your device and the code is open source so anyone can verify its security.</p>
</div>
</details>
<details class="faq-item">
<summary class="faq-question">Why is it free?</summary>
<div class="faq-answer">
<p>We believe identity protection should be accessible to everyone. Since it's a tool that runs completely in the browser, maintenance costs are minimal.</p>
</div>
</details>
<details class="faq-item">
<summary class="faq-question">Does it work offline?</summary>
<div class="faq-answer">
<p>Yes, once you load the page for the first time. All features will remain available.</p>
</div>
</details>
<details class="faq-item">
<summary class="faq-question">Which browsers are supported?</summary>
<div class="faq-answer">
<p>The tool is compatible with recent versions of Chrome, Firefox, Safari, and Edge. We recommend keeping your browser updated for the best performance.</p>
</div>
</details>
<details class="faq-item">
<summary class="faq-question">How do I know my data is secure?</summary>
<div class="faq-answer">
<p>The code is completely open source and verifiable in our <a href="https://github.com/ToritoIO/PDF-Protect" rel="noopener noreferrer" target="_blank">GitHub repository</a>. All processing is done on your device without sending data to servers.</p>
</div>
</details>
</div>
</div>
</section>
<footer class="app-footer">
<div class="app-footer-inner">
<span class="footer-brand">© 2025 PDF Protect, by <a href="https://torito.io/" class="footer-link" rel="noopener noreferrer" target="_blank">Torito - Security & Privacy Tools</a></span>
<div class="footer-status">
<span class="status-label">Status:</span>
<span id="statusLabel">Idle</span>
</div>
<div class="footer-links">
<a href="#" class="footer-link">Privacy Policy</a>
<a href="#" class="footer-link">Terms and Conditions</a>
</div>
</div>
</footer>
</div>
<script src="https://unpkg.com/pdf-lib@1.17.1/dist/pdf-lib.min.js"></script>
<script type="module" src="/app.js?v=1.0.7"></script>
</body>
</html>