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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-electron-printing

Laravel Electron Printing

Latest Version on Packagist Total Downloads GitHub Tests Action Status

๐Ÿ–จ๏ธ 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:

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.

Step 5: Start the Electron Service

Option A: Run from Source (Development)

The service will:

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:

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:

  1. Edit config (electron-print-service/config.json):

  2. Start the service:

  3. Note the machine's IP address:

On your Laravel server:

Update .env with the remote machine's IP:

Firewall Configuration:


๐Ÿš€ 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):

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:

  1. Check if Electron service is running:

  2. Verify PRINT_SERVICE_URL in .env
  3. Check firewall settings
  4. For network printing, ensure listenIP is 0.0.0.0

Printer Not Found

Error: Printer name not recognized

Solutions:

  1. Get available printers:

  2. Use exact printer name from the list
  3. Install printer drivers on the machine running Electron service
  4. Use null for system default printer

Payload Too Large

Error: 413 Payload Too Large

Solution:

Restart both Laravel and Electron service.

Print Quality Issues

Solutions:

  1. Use correct profile for your printer type
  2. Adjust scaleFactor (default: 100)
  3. Enable printBackground: true for colored content
  4. 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:

  1. Verify IP address: ping 192.168.1.100
  2. Check firewall allows port 3000
  3. Ensure listenIP: "0.0.0.0" in Electron config
  4. 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:

  1. Check Console.app for error logs
  2. Ensure printer drivers are installed
  3. Try running from source: cd electron-print-service && npm start

Windows

Problem: "Windows protected your PC" warning

Solution:

  1. Click "More info"
  2. Click "Run anyway"
  3. Or: Right-click installer โ†’ Properties โ†’ Unblock โ†’ Apply

Problem: App won't start after installation

Solution:

  1. Check if port 3000 is already in use:

  2. Run as Administrator
  3. Check Windows Defender logs
  4. 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


๐Ÿ“ 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

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1|^8.2|^8.3
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 6amtech/laravel-electron-printing contains the following files

Loading the files please wait ...