kduma/lpd

There is no license information available for the latest version (v0.2.0) of this package.

LPD Client for PHP

Maintainers

Package info

github.com/kduma-OSS/PHP-LPD

pkg:composer/kduma/lpd

Statistics

Installs: 1 097

Dependents: 1

Suggesters: 0

Stars: 0

v0.2.0 2026-04-08 15:08 UTC

This package is auto-updated.

Last update: 2026-04-08 15:09:28 UTC


README

Latest Stable Version Total Downloads License

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();