custom-scripts/mccs-it/thermal/public/index.html
2024-09-09 13:11:53 -04:00

25 lines
720 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Print</title>
</head>
<body>
<h1>Thermal Printer Test</h1>
<button id="testPrintBtn">Test Print</button>
<script>
document.getElementById('testPrintBtn').addEventListener('click', () => {
fetch('/test-print', { method: 'POST' })
.then(response => response.blob())
.then(blob => {
const url = URL.createObjectURL(blob);
window.open(url);
})
.catch(error => alert('Error: ' + error));
});
</script>
</body>
</html>