# Configure Thermal Printer for 35mm x 25mm Labels # Run as Administrator if needed Write-Host "====================================" -ForegroundColor Cyan Write-Host "Label Printer Paper Size Setup" -ForegroundColor Cyan Write-Host "Target: 35mm x 25mm (Landscape)" -ForegroundColor Cyan Write-Host "====================================" -ForegroundColor Cyan Write-Host "" # Get list of printers $printers = Get-Printer | Select-Object Name, DriverName, PortName Write-Host "Available Printers:" -ForegroundColor Yellow $printers | Format-Table -AutoSize Write-Host "" Write-Host "MANUAL CONFIGURATION STEPS:" -ForegroundColor Green Write-Host "===========================" -ForegroundColor Green Write-Host "" Write-Host "1. Open Control Panel > Devices and Printers" -ForegroundColor White Write-Host "2. Right-click your thermal printer (e.g., Citizen CTS-310 or Zebra ZD420)" -ForegroundColor White Write-Host "3. Select 'Printing Preferences'" -ForegroundColor White Write-Host "4. Look for 'Paper Size' or 'Media' settings:" -ForegroundColor White Write-Host " - Size: Custom or 35mm x 25mm" -ForegroundColor Cyan Write-Host " - Width: 35mm (1.38 inches)" -ForegroundColor Cyan Write-Host " - Height: 25mm (0.98 inches)" -ForegroundColor Cyan Write-Host " - Orientation: Landscape" -ForegroundColor Cyan Write-Host " - Media Type: LABELS (not Continuous)" -ForegroundColor Cyan Write-Host "5. Click 'Apply' and 'OK'" -ForegroundColor White Write-Host "" Write-Host "IMPORTANT FOR ZEBRA PRINTERS:" -ForegroundColor Red Write-Host "- Must set Media Type = 'Labels' (enables gap sensor)" -ForegroundColor Yellow Write-Host "- If set to 'Continuous', printer will print on entire roll" -ForegroundColor Yellow Write-Host "" Write-Host "CRITICAL PRINTER SETTINGS:" -ForegroundColor Magenta Write-Host "- Darkness: 10-15 (thermal printers)" -ForegroundColor White Write-Host "- Speed: Medium" -ForegroundColor White Write-Host "- Print Mode: Thermal Transfer or Direct Thermal" -ForegroundColor White Write-Host "" # Show printer properties access Write-Host "To open printer properties directly, run:" -ForegroundColor Green Write-Host 'control printers' -ForegroundColor Cyan Write-Host "" # Check if running as admin $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if ($isAdmin) { Write-Host "✓ Running as Administrator" -ForegroundColor Green } else { Write-Host "⚠ Not running as Administrator (some settings may require elevation)" -ForegroundColor Yellow } Write-Host "" Write-Host "For Citizen CTS-310 printers:" -ForegroundColor Cyan Write-Host " 1. Open Devices and Printers" -ForegroundColor White Write-Host " 2. Right-click 'Citizen CTS-310II' > Printer Properties" -ForegroundColor White Write-Host " 3. Device Settings tab > Form to Tray Assignment" -ForegroundColor White Write-Host " 4. Click 'Create Form' button" -ForegroundColor White Write-Host " 5. Form name: Label35x25" -ForegroundColor White Write-Host " 6. Width: 35mm, Height: 25mm" -ForegroundColor White Write-Host " 7. Save and select this form in Printing Preferences" -ForegroundColor White Write-Host "" Write-Host "For Zebra ZD420/ZD421 printers:" -ForegroundColor Cyan Write-Host " 1. Open Zebra Setup Utility (ZSU)" -ForegroundColor White Write-Host " 2. Select your printer" -ForegroundColor White Write-Host " 3. Click 'Printer Configuration'" -ForegroundColor White Write-Host " 4. Media section:" -ForegroundColor White Write-Host " - Media Type: Label Stock" -ForegroundColor Cyan Write-Host " - Label Width: 35mm" -ForegroundColor Cyan Write-Host " - Label Height: 25mm" -ForegroundColor Cyan Write-Host " 5. Print section:" -ForegroundColor White Write-Host " - Darkness: 10-15" -ForegroundColor Cyan Write-Host " - Print Speed: 4 ips (medium)" -ForegroundColor Cyan Write-Host " 6. Click 'Send to Printer'" -ForegroundColor White Write-Host "" Write-Host "After configuration, test print with:" -ForegroundColor Green Write-Host " python label_printer_gui.py" -ForegroundColor Cyan Write-Host "" Write-Host "Press any key to open Printer settings..." -ForegroundColor Yellow $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") control printers