Download the PHP package 6amtech/laravel-electron-printing without Composer
On this page you can find all versions of the php package 6amtech/laravel-electron-printing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 6amtech/laravel-electron-printing
More information about 6amtech/laravel-electron-printing
Files in 6amtech/laravel-electron-printing
Package laravel-electron-printing
Short Description Silent background printing service for Laravel using Electron. Print HTML, Blade views, URLs, and PDFs to any printer without user interaction. Perfect for POS, restaurants, and e-commerce.
License MIT
Homepage https://github.com/mainulBUBT/laravel-electron-printing
Informations about the package laravel-electron-printing
Laravel Electron Printing
๐จ๏ธ Silent background printing for Laravel - Print HTML, Blade views, URLs, and PDFs directly to any printer without user interaction.
Perfect for POS systems, restaurants, warehouses, e-commerce, and any application requiring automated printing.
โก Quick Start
Print in your Laravel app:
๐ฆ Installation
Step 1: Install Package
Step 2: Run Install Command
This command will:
- Publish the config file to
config/electron-printing.php - Publish the Electron app to
electron-print-service/ - Show you the required
.envconfiguration
Step 3: Configure Environment
Add these to your .env file:
Step 4: Install Printer Drivers
โ ๏ธ Important: You must install the genuine printer drivers on the machine running the Electron service.
- Thermal Printers: Install manufacturer drivers (EPSON, Star, etc.)
- Standard Printers: Install from manufacturer website
- Network Printers: Configure network connection first
Step 5: Start the Electron Service
Option A: Run from Source (Development)
The service will:
- Start on
http://localhost:3000 - Run in the background with a system tray icon
- Auto-start on system boot (optional)
Option B: Build Standalone App (Production)
If you want to distribute a ready-to-use application without requiring Node.js:
Build for your platform:
Built apps will be in: electron-print-service/dist/
Installation:
-
macOS:
- Open
6amTech Printing Service-1.0.0-mac.dmg - Drag app to Applications folder
- Open from Applications (right-click โ Open first time)
- Open
-
Windows:
- Run
6amTech Printing Service Setup 1.0.0.exe - Follow installer wizard
- App will auto-start on system boot
- Run
- Linux:
- Install
.deb:sudo dpkg -i 6amTech-Printing-Service-1.0.0.deb - Or run
.AppImagedirectly (no installation needed)
- Install
Note: Built apps don't require Node.js or npm to be installed on the target machine.
Remote/Network Setup (Different Machine)
On the machine with printers connected:
-
Edit config (
electron-print-service/config.json): -
Start the service:
- Note the machine's IP address:
On your Laravel server:
Update .env with the remote machine's IP:
Firewall Configuration:
- Allow incoming connections on port 3000
- Windows:
Windows Defender Firewall โ Allow an app - macOS:
System Preferences โ Security & Privacy โ Firewall - Linux:
sudo ufw allow 3000
๐ Usage
Basic Printing
Using Print Profiles
Pre-configured profiles in config/electron-printing.php:
Custom Print Options
PDF Printing
Print from URL
Get Available Printers
Check Service Health
โ๏ธ Configuration
Environment Variables
Custom Print Profiles
Edit config/electron-printing.php:
Use it:
Electron Service Configuration
Edit electron-print-service/config.json:
๐ Network Printing Setup
Scenario 1: Laravel + Electron on Same Machine
Scenario 2: Laravel on Server, Electron on Workstation
Workstation (with printers):
- IP:
192.168.1.100 -
Edit
electron-print-service/config.json: - Start service:
npm start
Laravel Server:
Scenario 3: Multiple Workstations
Each workstation runs its own Electron service:
Workstation 1 (Kitchen):
Workstation 2 (Counter):
Laravel:
๐ API Reference
๐งช Testing
๐ Troubleshooting
Service Not Connecting
Error: Print service error: Connection refused
Solutions:
-
Check if Electron service is running:
- Verify
PRINT_SERVICE_URLin.env - Check firewall settings
- For network printing, ensure
listenIPis0.0.0.0
Printer Not Found
Error: Printer name not recognized
Solutions:
-
Get available printers:
- Use exact printer name from the list
- Install printer drivers on the machine running Electron service
- Use
nullfor system default printer
Payload Too Large
Error: 413 Payload Too Large
Solution:
Restart both Laravel and Electron service.
Print Quality Issues
Solutions:
- Use correct profile for your printer type
- Adjust
scaleFactor(default: 100) - Enable
printBackground: truefor colored content - Check printer driver settings
Port Already in Use
Error: Port 3000 is already in use
Solution - Find and kill the process:
macOS/Linux:
Windows:
Change Port:
Edit electron-print-service/config.json:
Then update Laravel .env:
Network Printing Not Working
Solutions:
- Verify IP address:
ping 192.168.1.100 - Check firewall allows port 3000
- Ensure
listenIP: "0.0.0.0"in Electron config - Test locally first:
http://localhost:3000/health
Electron App Won't Open
macOS
Problem: "App can't be opened because it is from an unidentified developer"
Solution:
Problem: App crashes on startup
Solution:
- Check Console.app for error logs
- Ensure printer drivers are installed
- Try running from source:
cd electron-print-service && npm start
Windows
Problem: "Windows protected your PC" warning
Solution:
- Click "More info"
- Click "Run anyway"
- Or: Right-click installer โ Properties โ Unblock โ Apply
Problem: App won't start after installation
Solution:
-
Check if port 3000 is already in use:
- Run as Administrator
- Check Windows Defender logs
- Reinstall with antivirus temporarily disabled
Linux
Problem: AppImage won't run
Solution:
Problem: .deb installation fails
Solution:
Problem: App runs but no system tray icon
Solution:
๐ฏ Features
โ
Silent Printing - No print dialogs
โ
Multiple Formats - HTML, Blade, URL, PDF
โ
Print Profiles - Pre-configured settings
โ
Network Support - Print from any device
โ
Thermal Printers - 80mm, 58mm receipts
โ
Standard Printers - A4, Letter, Labels
โ
Cross-Platform - Windows, macOS, Linux
โ
Large Files - Configurable payload size
๐ Resources
- Complete Documentation - Advanced features and guides
- GitHub Repository - Source code
- Packagist - Package releases
๐ License
MIT License - see LICENSE.md
๐จโ๐ป Credits
Developed by: Mainul Islam
Organization: 6amTech
GitHub: @mainulBUBT
Email: [email protected]
โญ Support
If this package helps your project, give it a โญ on GitHub!
Made with โค๏ธ for the Laravel community
All versions of laravel-electron-printing with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0