From 13135b59993bd2b61bbd9b486c89a32a49f25845 Mon Sep 17 00:00:00 2001 From: diaco Date: Mon, 5 Oct 2026 14:08:11 +0330 Subject: [PATCH] Fetch fresh calibration on every print Co-authored-by: Cursor --- README.md | 46 ++++++++++----------- slips/static/slips/js/print.js | 4 +- slips/templates/slips/print_page.html | 57 ++++++++++++++++++++++++--- slips/views.py | 3 ++ 4 files changed, 76 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index ba547d5..5a7c1c8 100644 --- a/README.md +++ b/README.md @@ -53,32 +53,26 @@ Because the application prints dynamic text directly over your physical, pre-pri Follow these steps to calibrate the alignment for your specific printer: -### 1. Print the Calibration Sheet -1. Open the application and navigate to the **Calibrate** tab in the top menu. -2. Load a **blank** piece of A4 paper into your printer. -3. Click the "Print Calibration Sheet" button to print it out. +### 1. Open the Calibrate tab +1. Open the application and navigate to **Calibrate** in the top menu. +2. You will see a live A4 preview (2×2 slips) and a control panel with millimeter positions. -### 2. Check the Alignment -1. Take your printed blank calibration sheet. -2. Place it perfectly behind one of your **actual pre-printed label sheets**. -3. Hold them both up to a light source (like a window or lamp). -4. Look for the crosshairs (`┼`). They should align perfectly inside the target boxes (Batch, Date, Next Control, and Weight). +### 2. Print and check the alignment +1. Load a **blank** piece of A4 paper into your printer. +2. Click **Print** on the calibrate page. +3. Place the printed sheet perfectly behind one of your **actual pre-printed label sheets**. +4. Hold them both up to a light source (window or lamp). +5. The crosshairs (`┼`) should sit inside the target boxes (Batch, Date, Next Control, and Weight). -### 3. Adjusting the Millimeters (If Necessary) -If the text is printing slightly too high, too low, or too far to a side, you can adjust the CSS margins in the codebase to shift the text. +### 3. Adjust positions in the UI +If text is too high, low, or off to the side, nudge it in the panel — no code edits or Docker restart needed. -1. Open the file: `slips/templates/slips/print_page.html` -2. Scroll to the `