From 61ea6f7c96818107e98750dbb47dfd358d593aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20P=C3=B6ttker?= Date: Thu, 7 May 2026 14:53:59 +0200 Subject: [PATCH] Fix Dymo label orientation --- README.md | 2 +- src/LabelPrintAgent/Printing/WindowsImagePrinter.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fac3d87..789d1e0 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Typische Fehler: - Falscher Drucker gewählt: im Tab `Drucker` den Dymo LabelWriter auswählen. - Falsches Etikettenformat im Treiber: im Windows-Druckertreiber `57 x 32 mm` bzw. das passende Label einstellen. - Ausdruck zu groß oder zu klein: prüfen, ob Treiber-Skalierung deaktiviert ist und das Layout `57 x 32 mm` verwendet. -- Etikett wird gedreht: Treiber-Orientierung und Layout-Orientation `landscape` prüfen. +- Etikett wird gedreht: im Dymo-Treiber das physische Label `57 x 32 mm` wählen. Die App setzt das Papierformat bereits quer als `57 x 32 mm` und sendet keine zusätzliche Windows-Landscape-Rotation. Noch nicht enthalten sind MySQL-Worker und automatische Datenbankabfrage. diff --git a/src/LabelPrintAgent/Printing/WindowsImagePrinter.cs b/src/LabelPrintAgent/Printing/WindowsImagePrinter.cs index 9ff1734..1c8e89a 100644 --- a/src/LabelPrintAgent/Printing/WindowsImagePrinter.cs +++ b/src/LabelPrintAgent/Printing/WindowsImagePrinter.cs @@ -53,7 +53,10 @@ public sealed class WindowsImagePrinter document.PrintController = new StandardPrintController(); document.OriginAtMargins = false; document.DefaultPageSettings.PaperSize = paperSize; - document.DefaultPageSettings.Landscape = labelWidthMm > labelHeightMm; + // The custom paper size already carries the physical label orientation + // (57 x 32 mm for the standard Dymo label). Setting Landscape=true here + // makes some Dymo/Windows drivers rotate the job a second time. + document.DefaultPageSettings.Landscape = false; document.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0); document.PrintPage += (_, args) =>