kduma / lpd
There is no license information available for the latest version (v0.2.0) of this package.
LPD Client for PHP
v0.2.0
2026-04-08 15:08 UTC
Requires
- php: ^8.3
- ext-mbstring: *
- ext-sockets: *
This package is auto-updated.
Last update: 2026-04-08 15:09:28 UTC
README
LPD (Line Printer Daemon) client and server implementation in pure PHP.
Full documentation: opensource.duma.sh/libraries/php/lpd
Requirements
- PHP
^8.3
Installation
composer require kduma/lpd
Usage
Client
$configuration = new KDuma\LPD\Client\Configuration( address: '192.168.1.100', queue: 'PASSTHRU', port: 515, timeout: 30, ); $job = new KDuma\LPD\Client\Jobs\TextJob("Hello, Printer!"); (new KDuma\LPD\Client\PrintService($configuration))->sendJob($job);
Server
(new KDuma\LPD\Server\Server()) ->setAddress('0.0.0.0') ->setPort(515) ->setHandler(function (string $data, mixed $ctrl): void { echo $data; }) ->run();