php-lpr/examples/print.php

17 lines
314 B
PHP
Raw Permalink Normal View History

2017-10-31 17:10:39 +00:00
<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\Lpr\PrintJob;
$job = new PrintJob("image.png");
// Configure
$job->setPrinter("QL-570");
$job->setMedia("A4");
// Additional options can be set like this
$job->setOption("fit-to-page", true);
// Invoke lpr to print the image
$job->submit();