2025-09-11 16:01:32 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
2025-09-17 16:35:11 +02:00
|
|
|
|
2025-09-11 16:01:32 +02:00
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>Print Cost Result</title>
|
|
|
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
|
|
|
</head>
|
2025-09-17 16:35:11 +02:00
|
|
|
|
2025-09-11 16:01:32 +02:00
|
|
|
<body>
|
2025-09-17 16:35:11 +02:00
|
|
|
<div class="container">
|
|
|
|
|
<h1>Print Cost for {{ result.filename }}</h1>
|
|
|
|
|
|
|
|
|
|
<!-- Success / Error Banner -->
|
|
|
|
|
{% if success %}
|
|
|
|
|
<div class="alert success">{{ success }}</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if error %}
|
|
|
|
|
<div class="alert error">{{ error }}</div>
|
|
|
|
|
{% endif %}
|
2025-09-11 16:01:32 +02:00
|
|
|
|
2025-09-17 16:35:11 +02:00
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Page</th>
|
|
|
|
|
<th>Width (m)</th>
|
|
|
|
|
<th>Height (m)</th>
|
|
|
|
|
<th>Area (m²)</th>
|
|
|
|
|
<th>Ink %</th>
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
<th>Cost (€)</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for page in result.pages %}
|
|
|
|
|
<tr class="{{ 'color' if page.is_color else 'black' }}">
|
|
|
|
|
<td>{{ page.page }}</td>
|
|
|
|
|
<td>{{ "%.3f"|format(page.width_m) }}</td>
|
|
|
|
|
<td>{{ "%.3f"|format(page.height_m) }}</td>
|
|
|
|
|
<td>{{ "%.4f"|format(page.area_m2) }}</td>
|
|
|
|
|
<td>{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}</td>
|
|
|
|
|
<td>{{ 'Color' if page.is_color else 'B&W' }}</td>
|
|
|
|
|
<td>{{ "%.2f"|format(page.cost) }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
<tfoot>
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
<td colspan="3">Total Black Pages</td>
|
|
|
|
|
<td>{{ "%.4f"|format(result.total_area_black) }}</td>
|
|
|
|
|
<td colspan="2"></td>
|
|
|
|
|
<td>{{ "%.2f"|format(result.total_cost_black) }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
<td colspan="3">Total Color Pages</td>
|
|
|
|
|
<td>{{ "%.4f"|format(result.total_area_color) }}</td>
|
|
|
|
|
<td colspan="2"></td>
|
|
|
|
|
<td>{{ "%.2f"|format(result.total_cost_color) }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="totals">
|
|
|
|
|
<td colspan="6">Grand Total</td>
|
|
|
|
|
<td>{{ "%.2f"|format(result.grand_total) }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tfoot>
|
|
|
|
|
</table>
|
2025-09-11 16:01:32 +02:00
|
|
|
|
2025-09-17 16:35:11 +02:00
|
|
|
<!-- Send order form -->
|
|
|
|
|
<form action="/send-order" method="post">
|
|
|
|
|
<input type="hidden" name="filename" value="{{ result.filename }}">
|
|
|
|
|
<label for="comment"><strong>Additional Instructions:</strong></label>
|
|
|
|
|
<textarea id="comment" name="comment"
|
|
|
|
|
placeholder="e.g. Please print double-sided, staple in top left corner..."></textarea>
|
|
|
|
|
<button type="submit">Send Order</button>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<div class="link">
|
|
|
|
|
<a href="/">Upload another PDF</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-11 16:01:32 +02:00
|
|
|
</body>
|
2025-09-17 16:35:11 +02:00
|
|
|
|
|
|
|
|
</html>
|