97 lines
4.9 KiB
HTML
97 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Master - PDF Unterschrift System</title>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf-lib/1.17.1/pdf-lib.min.js"></script>
|
||
<link rel="stylesheet" href="master.css">
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="header">
|
||
<h1>📄 Master Station</h1>
|
||
<p>PDF hochladen und Unterschrift empfangen</p>
|
||
</div>
|
||
|
||
<div class="content">
|
||
<div class="upload-section" id="uploadSection">
|
||
<h2>PDF Dokument auswählen</h2>
|
||
<p style="margin: 20px 0; color: #666;">Wähle eine PDF-Datei aus, die unterschrieben werden soll</p>
|
||
<input type="file" id="pdfInput" accept=".pdf">
|
||
<button class="upload-button" onclick="document.getElementById('pdfInput').click()">
|
||
PDF auswählen
|
||
</button>
|
||
</div>
|
||
|
||
<div id="statusSection" style="display: none;">
|
||
<div class="connection-status">
|
||
<span class="status-indicator connected" id="statusIndicator"></span>
|
||
<span id="connectionText">Verbunden mit Signatur-Station</span>
|
||
</div>
|
||
|
||
<div class="status waiting" id="statusMessage">
|
||
Warte auf Unterschrift von der Signatur-Station...
|
||
</div>
|
||
|
||
<!-- Page Navigation -->
|
||
<div class="page-navigation" id="pageNavigation" style="display: none;">
|
||
<button class="nav-button" id="prevPageBtn" onclick="changePage(-1)">◀ Zurück</button>
|
||
<span id="pageInfo">Seite 1 von 1</span>
|
||
<button class="nav-button" id="nextPageBtn" onclick="changePage(1)">Weiter ▶</button>
|
||
</div>
|
||
|
||
<div class="pdf-preview" id="pdfPreview">
|
||
<div id="pdfCanvasContainer">
|
||
<canvas id="pdfCanvas"></canvas>
|
||
</div>
|
||
<div class="signature-overlay" id="signatureOverlay">
|
||
<div class="handle" onclick="removeSignatureOverlay()" title="Unterschrift entfernen">×</div>
|
||
<img id="signatureImage" src="" alt="Unterschrift">
|
||
<div class="resize-handle" id="resizeHandle"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="signature-controls" id="signatureControls">
|
||
<p><strong>📝 Unterschrift positionieren:</strong> Ziehe die Unterschrift an die gewünschte Position im PDF. Nutze den Griff rechts unten zum Skalieren.</p>
|
||
|
||
<div class="page-selector" id="pageSelector" style="display: none; margin: 15px 0; padding: 15px; background: #f0f2ff; border-radius: 8px;">
|
||
<p style="margin-bottom: 10px;"><strong>Auf welchen Seiten platzieren?</strong></p>
|
||
<div style="display: flex; gap: 10px; flex-wrap: wrap;">
|
||
<label style="cursor: pointer;">
|
||
<input type="checkbox" id="currentPageOnly" checked onchange="updatePageSelection()">
|
||
Nur aktuelle Seite (<span id="currentPageNum">1</span>)
|
||
</label>
|
||
<label style="cursor: pointer;">
|
||
<input type="checkbox" id="allPages" onchange="updatePageSelection()">
|
||
Alle Seiten
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="display: flex; gap: 15px; margin-top: 15px;">
|
||
<button class="upload-button" onclick="removeSignatureOverlay()" style="flex: 1; background: #dc3545;">
|
||
🗑️ Unterschrift entfernen
|
||
</button>
|
||
<button class="upload-button" id="placeSignatureButton" style="flex: 2; background: linear-gradient(135deg, #28a745 0%, #20c997 100%);">
|
||
✓ Unterschrift platzieren & PDF erstellen
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="text-align: center;">
|
||
<button class="download-button" id="downloadButton" disabled>
|
||
⬇ Unterschriebene PDF herunterladen
|
||
</button>
|
||
<p id="downloadHint" style="margin-top: 10px; color: #666; display: none;">
|
||
PDF wurde erstellt und ist bereit zum Download
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="master.js"></script>
|
||
</body>
|
||
</html> |