1. Go to this page and download the library: Download kduma/lpd library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kduma / lpd example snippets
php
(new KDuma\LPD\Server\Server())
->setAddress($address)
->setPort($port)
->setMaxConnections($max_connections)
->setHandler(function ($incoming_data, $ctrl) {
echo $incoming_data; // Do something with it!
})
->run();
php
$job = new KDuma\LPD\Client\Jobs\FileJob("my_raw_file.txt");
php
$configuration = new KDuma\LPD\Client\Configuration($address, $queue_name, $port, $timeout);
$print_service = new KDuma\LPD\Client\PrintService($configuration);
$print_service->sendJob($job);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.