- Fixed network printer enumeration (PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS) - Added printer name truncation to 20 chars with full name mapping - Implemented silent PDF printing using SumatraPDF with landscape orientation - Added auto-dismiss for success popup (3 seconds) - Bundled SumatraPDF inside executable for portable single-file deployment - Updated build script to embed SumatraPDF - Added setup_sumatra.ps1 for downloading SumatraPDF portable - Added DEPLOYMENT.md documentation
2.9 KiB
2.9 KiB
Label Printer - Portable Deployment Guide
Deployment Structure
The app is now fully self-contained with SumatraPDF embedded inside:
LabelPrinter/
├── LabelPrinter.exe # Main application (includes SumatraPDF inside)
├── pdf_backup/ # Auto-created: PDF backups
└── logs/ # Auto-created: Print logs
No visible folders! SumatraPDF is bundled inside LabelPrinter.exe and extracted to a temporary location at runtime.
Setup Instructions
1. Download SumatraPDF (For Building Only)
This step is only needed when building the app. SumatraPDF will be embedded inside the executable.
# PowerShell command to download SumatraPDF
powershell -ExecutionPolicy Bypass -File setup_sumatra.ps1
This downloads SumatraPDF portable (~5 MB) to the SumatraPDF folder.
2. Build the Application
.\build_windows.ps1
The build script will:
- Check for SumatraPDF
- Bundle it inside the executable
- Create
dist\LabelPrinter.exe(~80 MB including all dependencies)
3. Deploy
Simply copy LabelPrinter.exe to any Windows machine!
📁 Deployment (any folder)
└── LabelPrinter.exe ← Just this one file!
- No installation needed
- No additional files or folders
- Double-click to run
- Works on any Windows 10/11 machine
Features
- ✅ Single Executable - Everything bundled in one .exe file (~80 MB)
- ✅ Fully Portable - No installation needed, no external dependencies
- ✅ Silent Printing - No PDF viewer windows pop up
- ✅ Network Printers - Supports printers from print servers (e.g.
\\server\printer) - ✅ PDF Backup - All labels saved to
pdf_backup/folder - ✅ Print Logging - CSV logs in
logs/folder - ✅ SumatraPDF Hidden - Embedded inside, not visible to users
Printer Name Display
Network printer names (e.g. \\filesibiusb05\ZDesigner_ZQ630) are automatically shortened to 20 characters in the dropdown for better display. The full printer name is used for actual printing.
Troubleshooting
Printing Not Working
- Check Printer Connection: Verify printer is online and accessible
- Check PDF Backup: Labels are always saved to
pdf_backup/folder even if printing fails - Check Logs: View print logs in
logs/folder for error messages - Rebuild App: If you built the app yourself, ensure
setup_sumatra.ps1was run first to download SumatraPDF before building
Network Printers Not Showing
- Network printers must be installed/connected on the machine before running the app
- For print server printers like
\\filesibiusb05\printer, ensure the share is accessible - Run as administrator if printer enumeration fails
Notes
- First run may be slower (Kivy initialization)
- PDF backups are auto-deleted after 5 days
- Log files are auto-deleted after 5 days
- Supports Python 3.10-3.13 (Python 3.14+ may have issues with Kivy)