# Recticel Direct Print Service - Installation Guide ## 🎯 Overview This service enables direct printing from web browsers to thermal label printers (Epson TM-T20, Citizen CTS-310, etc.) without requiring PDF generation or manual printer dialogs. ## 🔧 Installation Steps ### 1. **Build the C# Application** **Requirements:** - Visual Studio 2019 or later - .NET Framework 4.7.2 or later - Windows 10/11 **Build Steps:** 1. Open `RecticelPrintService.sln` in Visual Studio 2. Restore NuGet packages (Newtonsoft.Json) 3. Build in Release mode 4. Copy the entire `bin\Release` folder to `C:\RecticelPrintService\` ### 2. **Register the Custom Protocol** **Option A: Double-click the registry file** 1. Right-click `recticel-print-protocol.reg` 2. Select "Run as administrator" 3. Confirm the registry import **Option B: Manual registry import** 1. Open Command Prompt as Administrator 2. Run: `reg import "recticel-print-protocol.reg"` ### 3. **Install Printer Drivers** **For Epson TM-T20:** - Download and install Epson TM-T20 drivers from Epson website - Configure printer as "Epson TM-T20" in Windows **For Citizen CTS-310:** - Download and install Citizen CTS-310 drivers - Configure printer as "Citizen CTS-310" in Windows ### 4. **Configure Printer Settings** 1. Open Windows "Printers & scanners" 2. Set paper size to **80mm x 110mm** (or closest available) 3. Set print quality to **300 DPI** for thermal printers 4. Disable margins (set to 0 if possible) ### 5. **Test the Installation** 1. Open your web browser 2. Navigate to the print module page 3. Select an order 4. Choose "Direct Print" option 5. Select your thermal printer 6. Click "Print Labels" ## 🖨️ Printer Configuration ### Label Size Settings - **Width**: 80mm - **Height**: 110mm - **Margins**: 0mm (all sides) - **Print Quality**: 300 DPI ### Thermal Printer Specific Settings **Epson TM-T20:** - Paper Type: Continuous label - Print Speed: Normal - Print Density: Adjust based on label stock **Citizen CTS-310:** - Media Type: Label - Print Method: Thermal Transfer or Direct Thermal - Print Speed: Medium ## 🔄 How It Works 1. **Web Interface**: User selects order and clicks "Direct Print" 2. **Data Encoding**: Order data is encoded as Base64 JSON 3. **Custom Protocol**: Browser calls `recticel-print://printer/data` 4. **Service Activation**: Windows launches RecticelPrintService.exe 5. **Data Processing**: Service decodes and formats label data 6. **Direct Printing**: Label is sent directly to the thermal printer 7. **Status Update**: Database is updated to mark order as printed ## 🚀 URL Format ``` recticel-print://[printer_name]/[base64_encoded_json] ``` **Example:** ``` recticel-print://Epson%20TM-T20/eyJvcmRlcl9pZCI6MTIzLCJjb21hbmRhX3Byb2R1Y3RpZSI6IkNQMDAwMDA3MTEifQ== ``` ## ⚠️ Troubleshooting ### Service Not Starting 1. Check if the service is installed in `C:\RecticelPrintService\` 2. Verify registry entries are correct 3. Run as Administrator if needed ### Printer Not Found 1. Check printer name in Windows exactly matches selection 2. Ensure printer drivers are installed 3. Test print from Windows to verify printer works ### Labels Not Printing 1. Verify paper size is set to 80x110mm 2. Check printer margins are set to 0 3. Ensure thermal paper is loaded correctly ### Browser Security - Some browsers may block custom protocols - Add site to trusted sites if needed - Chrome may show a confirmation dialog ## 🔧 Advanced Configuration ### Custom Printer Names Users can add custom printer names by selecting "Other Printer..." and entering the exact Windows printer name. ### Multiple Label Quantities The service automatically prints the quantity specified in the order, with sequential numbering (CP00000711-001, CP00000711-002, etc.). ### Fallback to PDF If direct printing fails, users can switch to "Generate PDF" mode for manual printing. ## 📞 Support For technical support: 1. Check Windows Event Viewer for service errors 2. Verify printer connectivity and driver installation 3. Test with PDF generation mode as fallback 4. Contact IT support with specific error messages ## 🔒 Security Notes - The service only processes label data from trusted sources - Registry changes require Administrator privileges - Service runs with current user permissions - No network connections are made by the service