Download the PHP package abdullah-life/laravel-zebra-image-printer without Composer
On this page you can find all versions of the php package abdullah-life/laravel-zebra-image-printer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download abdullah-life/laravel-zebra-image-printer
More information about abdullah-life/laravel-zebra-image-printer
Files in abdullah-life/laravel-zebra-image-printer
Download abdullah-life/laravel-zebra-image-printer
More information about abdullah-life/laravel-zebra-image-printer
Files in abdullah-life/laravel-zebra-image-printer
Vendor abdullah-life
Package laravel-zebra-image-printer
Short Description Laravel package for printing PNG images to Zebra thermal printers via ZPL
License MIT
Package laravel-zebra-image-printer
Short Description Laravel package for printing PNG images to Zebra thermal printers via ZPL
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-zebra-image-printer
Laravel Zebra Image Printer
A minimal Laravel package for printing PNG images to Zebra thermal printers using ZPL.
Features
- Print PNG images directly to Zebra thermal printers
- Support for local files and remote URLs
- Configurable margins, DPI, and darkness
- Full page width with automatic scaling
- Direct thermal and thermal transfer support
- Simple facade interface
Requirements
- PHP 7.4+
- Laravel 9.x, 10.x, 11.x, or 12.x
- ImageMagick (
convertcommand)
Installation
-
Install via Composer:
-
Publish configuration:
-
Configure your printer in
.env: - Install ImageMagick:
Usage
Using Facade
Using Dependency Injection
Advanced Usage
Configuration
Edit config/zebra-printer.php:
API Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
print() |
string $imagePath, float $marginCm = 1 |
bool |
Print image with margin |
convert() |
string $imagePath, float $marginCm = 0 |
string |
Convert PNG to ZPL |
sendToPrinter() |
string $zpl, ?string $ip = null, ?int $port = null |
bool |
Send ZPL to printer |
isOnline() |
?string $ip = null, ?int $port = null |
bool |
Check if printer is online |
Margin Behavior
When you specify a margin (e.g., 1 cm):
- Image uses 100% of page width minus margins on both sides
- Height automatically scales to maintain aspect ratio
- Content starts from top with specified margin
Example with 1cm margin on 4" printer (203 DPI):
- Page width: 832 dots (4 inches)
- Margin: 79 dots (1cm) on each side
- Image width: 674 dots (832 - 158)
- Height: Scaled proportionally
Troubleshooting
Printer Not Printing
ImageMagick Not Found
Blank Labels
- Verify printer mode (direct thermal vs thermal transfer)
- Check if ribbon is installed (for thermal transfer)
- Increase darkness in config
License
MIT
Author
Abdullah (@abdullah-life)
All versions of laravel-zebra-image-printer with dependencies
PHP Build Version
Package Version
The package abdullah-life/laravel-zebra-image-printer contains the following files
Loading the files please wait ...