#!/usr/bin/env php === ZPL Orientation Tester === Testing different orientation combinations for horizontal wristband Physical: 25.4mm tall x 279.4mm wide --- Test A: Default (No rotation) --- ZPL: ^XA ^PW300 ^LL3300 ^FO50,100^A0N,30^FDTEST A - NO ROTATION^FS ^FO50,150^BCN,80,N,N,N^FD12345TEST^FS ^XZ ✅ Saved: test_a.png --- Test B: Print Orientation Inverted (^POI) --- ZPL: ^XA ^POI ^PW300 ^LL3300 ^FO50,100^A0N,30^FDTEST B - INVERTED^FS ^FO50,150^BCN,80,N,N,N^FD12345TEST^FS ^XZ ❌ Failed (HTTP 429) --- Test C: Field Orientation Rotated 90° (^FWR) --- ZPL: ^XA ^PW300 ^LL3300 ^FWR ^FO100,50^A0N,30^FDTEST C - ROTATED 90^FS ^FO150,50^BCN,80,N,N,N^FD12345TEST^FS ^XZ ✅ Saved: test_c.png --- Test D: Swap dimensions (treat as 11" wide x 1" tall) --- ZPL: ^XA ^PW3300 ^LL300 ^FO100,50^A0N,30^FDTEST D - SWAPPED^FS ^FO500,50^BCN,50,N,N,N^FD12345TEST^FS ^FO1000,50^A0N,20^FDSeat: 101-A6^FS ^XZ ❌ Failed (HTTP 429) --- Test E: Rotated fields + inverted orientation --- ZPL: ^XA ^POI ^PW300 ^LL3300 ^FWR ^FO100,50^A0N,30^FDTEST E - BOTH^FS ^FO150,50^BCN,80,N,N,N^FD12345TEST^FS ^XZ ✅ Saved: test_e.png --- Test F: Landscape mode (^FWN with large X coords) --- ZPL: ^XA ^FWN ^PW300 ^LL3300 ^FO100,50^A0N,25^FDEvent Name^FS ^FO500,50^BCN,60,N,N,N^FD12345TEST^FS ^FO1000,50^A0N,20^FDCode: TEST123^FS ^FO1500,50^A0N,20^FDSeat: 101-A6^FS ^FO2000,50^A0N,18^FDDec 31, 2025^FS ^XZ ❌ Failed (HTTP 429) === Opening all test previews === === ZPL Documentation References === ^PO - Print Orientation: https://www.zebra.com (search 'ZPL Programming Guide') ^FW - Field Orientation: Rotate individual fields (N, R, I, B) ^PW - Print Width: Width perpendicular to feed direction ^LL - Label Length: Length in feed direction === Instructions === 1. Review the 6 test preview images (test_a.png through test_f.png) 2. Identify which orientation looks correct for your horizontal wristband 3. We'll use that configuration in the WristbandZplService === Test Print Commands (Use with caution!) === To test a specific orientation on the actual printer: php -r 'echo "^XA^PW300^LL3300^FO50,100^A0N,30^FDTEST^FS^XZ" | lp -d Zebra_Technologies_ZTC_HC100_300dpi_ZPL -o raw'