You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 46d8af7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/manual_testing.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,18 +310,22 @@ Eleven scenarios for manual verification of the Equipment Status Board's core us
310
310
3. Verify the "Generate QR Code" button is enabled (not greyed out).
311
311
4. Click the button to open `/equipment/<id>/qr`.
312
312
5. Select each size preset in turn (1"–4" stickers, Avery 5160, Avery 5163, US Letter) and verify the live preview updates to match.
313
-
6. Toggle the "Include equipment name" and "Include target URL" checkboxes and verify the preview updates accordingly.
314
-
7. Download the label at the 2" sticker preset; open the PNG and verify it is 300 DPI.
315
-
8. Print (or view at actual size) the downloaded label and scan it with a phone camera.
316
-
9. Download the US Letter preset and verify the PNG is 2550×3300 px.
317
-
10. Stop the server, unset `ESB_BASE_URL`, restart, and reload the equipment detail page.
318
-
11. On an archived equipment item, confirm the QR button does not render and that `GET /equipment/<id>/qr` returns 404.
313
+
6. Select each **Printer / device** preset in turn (Laser/Inkjet 300/600/1200 dpi, Thermal Label 203 dpi, Brother P-Touch 180 dpi) and verify the live preview updates.
314
+
7. Toggle the "Include equipment name" and "Include target URL" checkboxes and verify the preview updates accordingly.
315
+
8. For each device preset, download a label and confirm the PNG's pixel dimensions equal `int(size_inches × device_dpi + 0.5)` — e.g. a 4" sticker at Thermal Label (203 dpi) → 812×812 px; at Laser/Inkjet (1200 dpi) → 4800×4800 px.
316
+
9. Confirm the PNG embeds matching DPI metadata. With ImageMagick: `identify -verbose file.png | grep Resolution`. Dependency-free: `python -c "from PIL import Image; print(Image.open('file.png').info['dpi'])"`. Note that a 203 dpi label reports approximately `(202.9968, 202.9968)` — this is expected rational rounding, not a bug.
317
+
10. Confirm a 4" label at **Thermal Label (203 dpi)** prints full-size (no clipping) on a 203-dpi thermal printer, and that selecting **US Letter** at **Laser/Inkjet (1200 dpi)** shows a friendly "too large to render" error instead of downloading.
318
+
11. Print (or view at actual size) a downloaded label and scan it with a phone camera.
319
+
12. At the default Laser/Inkjet (300 dpi) device, download the US Letter preset and verify the PNG is 2550×3300 px.
320
+
13. Stop the server, unset `ESB_BASE_URL`, restart, and reload the equipment detail page.
321
+
14. On an archived equipment item, confirm the QR button does not render and that `GET /equipment/<id>/qr` returns 404.
319
322
320
323
**Expected Results:**
321
324
322
-
- The live preview on `/equipment/<id>/qr` reflects size and label-content options in real time.
325
+
- The live preview on `/equipment/<id>/qr` reflects size, device, and label-content options in real time.
323
326
- Scanning the downloaded/printed QR code resolves to `${ESB_BASE_URL}/public/equipment/<id>`.
324
-
- Rendered PNG dimensions match the selected preset (e.g., letter → 2550×3300 px at 300 DPI).
327
+
- Rendered PNG dimensions match the selected size × device DPI (e.g., at the default Laser/Inkjet 300 dpi device, US Letter → 2550×3300 px), and the PNG carries embedded DPI metadata matching the selected device.
328
+
- US Letter at Laser/Inkjet (1200 dpi) is rejected with a friendly "too large" danger message rather than rendering.
325
329
- When `ESB_BASE_URL` is unset, the "Generate QR Code" button renders as disabled with tooltip "ESB_BASE_URL not configured"; hitting the route directly redirects to the equipment detail page with a danger flash describing the validation failure.
326
330
- Invalid `ESB_BASE_URL` values (non-http(s) schemes, embedded credentials, whitespace, paths/queries/fragments) are rejected with a specific flashed error instead of being rendered into the QR payload.
327
331
- Archived equipment hides the QR button and the QR route returns 404.
Copy file name to clipboardExpand all lines: docs/staff.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,14 +142,16 @@ Any logged-in user (Staff or Technician) can generate QR codes from the equipmen
142
142
1. Open the equipment detail page for the item you want to label.
143
143
2. Click **Generate QR Code**.
144
144
3. Pick a size from the dropdown. Choices include square stickers (1", 1.5", 2", 3", 4"), Avery label sizes (5160 and 5163), and a US Letter full-page option.
145
-
4. Optionally enable **Include equipment name above QR** to print the equipment's name at the top of the label.
146
-
5. Optionally enable **Include URL below QR** to print the scan target URL at the bottom of the label.
147
-
6. Watch the live preview update as you change options.
148
-
7. Click **Download QR Code** to download a PNG file ready to print.
145
+
4. Pick a **Printer / device** matching the printer you will print on: **Thermal Label (203 dpi)** for direct-thermal label printers, **Brother P-Touch (180 dpi)** for P-Touch label makers, or **Laser/Inkjet** at **300**, **600**, or **1200 dpi** for office printers. This setting makes the printed label come out at the correct physical size for the chosen printer. **Laser/Inkjet (300 dpi)** is the safe default for most office printers. (Very large sizes at very high resolution — e.g. US Letter at 1200 dpi — are rejected with a "too large" message; pick a lower resolution or smaller size.)
146
+
5. Optionally choose a **WiFi Info** option to print a network reminder above the QR code: **None**, **Header** (a "Must be on WiFi" banner), **SSID** (banner + network name), or **Password** (banner + network name + password). Options only appear when an administrator has configured the corresponding WiFi settings.
147
+
6. Optionally enable **Include equipment name above QR** to print the equipment's name at the top of the label.
148
+
7. Optionally enable **Include URL below QR** to print the scan target URL at the bottom of the label.
149
+
8. Watch the live preview update as you change options.
150
+
9. Click **Download QR Code** to download a PNG file ready to print.
149
151
150
-
All output is rendered at 300 DPI so labels print sharply at any of the listed sizes.
152
+
Output is rendered at the selected device's resolution, with that DPI embedded in the PNG, so printing "actual size" reproduces the intended physical dimensions on that printer.
151
153
152
-
> **Tip:** URL text below the QR is most useful at label/page sizes (Avery 5163, US Letter). On small stickers (≤ 2") the URL is usually truncated and adds little value — the live preview shows the result; uncheck **Include URL below QR** if it isn't legible.
154
+
> **Tip:** URL text below the QR is most useful at label/page sizes (Avery 5163, US Letter). On small stickers (≤ 2") the URL is usually truncated and adds little value — the live preview shows the result; uncheck **Include URL below QR** if it isn't legible. On **low-resolution devices (180/203 dpi)**, the QR modules on tiny stickers (≤ 1") may be too small to scan reliably — prefer a larger sticker or a higher-resolution printer for tiny labels.
src="{{ url_for('equipment.qr_preview', id=equipment.id, size=form.size.data or 'sticker_2', include_name=form.include_name.data, include_url=form.include_url.data, wifi_info=form.wifi_info.data or 'none') }}"
50
+
src="{{ url_for('equipment.qr_preview', id=equipment.id, size=form.size.data or 'sticker_2', device=form.device.data or default_device_key, include_name=form.include_name.data, include_url=form.include_url.data, wifi_info=form.wifi_info.data or 'none') }}"
47
51
class="img-fluid border"
48
52
style="max-width: 400px;">
49
-
<pclass="text-muted small mt-2">Preview is scaled to fit; downloaded PNG is at 300 DPI.</p>
53
+
<spanid="qr-preview-error" role="alert" aria-live="assertive" class="text-danger small d-none">Preview unavailable for this combination — the label may be too large to render at this resolution, or the URL too long for this size. Try a lower resolution or a larger size.</span>
54
+
<pclass="text-muted small mt-2">Preview is scaled to fit. The downloaded PNG is sized to your selected printer resolution and physical size.</p>
0 commit comments