PHP code example of klausderkleber / ipp

1. Go to this page and download the library: Download klausderkleber/ipp 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/ */

    

klausderkleber / ipp example snippets


$printer = new \obray\IPP\Printer(
  {printer-uri},
  {username}, // optional
  {password},    // optional
  {curlOptions} // optional
);
$response = $printer->printJob({raw document}, {attributes});

$printer = new \obray\IPP\Printer(
  {printer-uri},
  {username}, // optional
  {password},    // optional
  {curlOptions} // optional
);
$attributes = $printer->getPrinterAttributes();

$printer = new \obray\IPP\Printer(
  {printer-uri},
  {username}, // optional
  {password}, // optional
  {curlOptions}, // optional
);
$attributes = $printer->printJob(
   {raw document},
   123, // optional request ID
   [
     'document-format': 'application/pdf'
   ]
);

$printer = new \obray\IPP\Printer(
  {printer-uri},
  {username},   // optional
  {password},    // optional
  {curlOptions} // optional
);

$response = $printer->printJob(
  {raw document},
  {request-id},  // optional
  {[attributes]} // optional
);

$response = $printer->validateJob({request-id}, {[attributes]});

$response = $printer->getPrinterAttributes({request-id});

$response = $printer->getJobs({request-id});

$response = $printer->pausePrinter({request-id});

$response = $printer->resumePrinter({request-id});

$response = $printer->purgeJobs({request-id});

$response = $job->cancelJob({request-id});

$response = $job->getJobAttributes({request-id});

$response = $job->holdJob({request-id});

$response = $job->releaseJob({request-id});

$response = $job->restartJob({request-id});